demo-multiturn / test.py
ashwath-vaithina-ibm's picture
multiturn demo upload
83aabd5 verified
raw
history blame
524 Bytes
from control import recommendation_handler
import numpy as np
prompt_json, _ = recommendation_handler.populate_json()
prompt = """
Hello how are you?
. """
model_id='sentence-transformers/all-MiniLM-L6-v2'
embedding_fn = recommendation_handler.get_embedding_func(inference='local', model_id=model_id)
print(recommendation_handler.split_into_sentences(prompt))
recommendation_json = recommendation_handler.recommend_prompt(prompt, prompt_json, embedding_fn=embedding_fn, get_xy=True)
print(recommendation_json)