From c9909973bfe9bba5663ef7a334322b8f82dcabbd Mon Sep 17 00:00:00 2001 From: acer-king Date: Thu, 17 Oct 2024 10:21:32 -0700 Subject: [PATCH] add conversation to gemni --- miner/providers/gemini.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/miner/providers/gemini.py b/miner/providers/gemini.py index 78409e4f..e36af489 100644 --- a/miner/providers/gemini.py +++ b/miner/providers/gemini.py @@ -16,9 +16,10 @@ def __init__(self, synapse): async def _prompt(self, synapse: StreamPrompting, send: Send): stream = [] + prompt = " ".join([m['content'] for m in synapse.messages if m['content']]) try: stream = self.genai_model.generate_content( - str(self.messages), + prompt, stream=True, generation_config=genai.types.GenerationConfig( temperature=self.temperature,