dialoguse simulator

pull/55/head
Kye 1 year ago
parent 2150413410
commit c527b18964

@ -1,5 +1,3 @@
from typing import List, Callable
class DialogueSimulator:
def __init__(
@ -17,8 +15,10 @@ class DialogueSimulator:
def start(self, name: str, message: str):
#init conv with a message from name
prompt = f"Name {name} and message: {message}"
for agent in self.agents:
agent.receive(name, message)
agent.run(prompt)
#increment time
self._step += 1

@ -39,7 +39,7 @@ class Worker:
llm=None,
openai: bool = True,
):
self.openai_api_key = openai_api_key
self.openai_api_key = openai_api_keyd
self.temperature = temperature
self.human_in_the_loop = human_in_the_loop
@ -104,7 +104,7 @@ class Worker:
embeddings_model = OpenAIEmbeddings(openai_api_key=self.openai_api_key)
embedding_size = 4096
index = faiss.IndexFlatL2(embedding_size)
self.vectorstore = FAISS(embeddings_model.embed_query, index, InMemoryDocstore({}), {})
except Exception as error:
raise RuntimeError(f"Error setting up memory perhaps try try tuning the embedding size: {error}")

Loading…
Cancel
Save