From bbe48cabf9583acd215d4068835e1ee5bfeeac15 Mon Sep 17 00:00:00 2001 From: Anton Potapov <47938145+Flagro@users.noreply.github.com> Date: Sat, 26 Oct 2024 21:49:50 +0200 Subject: [PATCH] Fix the openai choices model attributes --- bot/rp_bot/ai_agent/ai.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/rp_bot/ai_agent/ai.py b/bot/rp_bot/ai_agent/ai.py index 748790b..c745a26 100644 --- a/bot/rp_bot/ai_agent/ai.py +++ b/bot/rp_bot/ai_agent/ai.py @@ -165,7 +165,7 @@ async def get_reply(self, user_input: str, system_prompt: str) -> str: stream=False, temperature=self.ai_config.TextGeneration.temperature, ) - return response.choices[0].delta.content + return response.choices[0].message.content async def get_streaming_reply( self, user_input: str, system_prompt: str