From 70e31977df2d493935a946eaa7465f1d9eabcd86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=A1vio=20Code=C3=A7o=20Coelho?= Date: Fri, 31 May 2024 17:52:22 -0300 Subject: [PATCH] reported bug to Instructor project --- base_agent/llminterface.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/base_agent/llminterface.py b/base_agent/llminterface.py index 144b08f..65da0e8 100644 --- a/base_agent/llminterface.py +++ b/base_agent/llminterface.py @@ -128,10 +128,11 @@ def __init__(self, model: str = 'gpt-4o'): else: self.llm = instructor.from_openai( OpenAI( - base_url=os.getenv('OLLAMA_HOST', 'http://127.0.0.1:11434'), + base_url=os.getenv('OLLAMA_HOST', 'http://127.0.0.1:11434/v1'), api_key=os.getenv('OLLAMA_API_KEY', 'ollama') ), - mode=instructor.Mode.JSON + mode=instructor.Mode.JSON, + stream=False ) def reset_chat_history(self):