From e21959140f71d190a9f5e6c4307239b5c8d56ff0 Mon Sep 17 00:00:00 2001 From: retoor Date: Fri, 20 Dec 2024 22:43:24 +0100 Subject: [PATCH] Update. --- src/rbabel/agent.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rbabel/agent.py b/src/rbabel/agent.py index f8ac734..7221213 100644 --- a/src/rbabel/agent.py +++ b/src/rbabel/agent.py @@ -148,8 +148,9 @@ class Agent: response_messages = self.client.beta.threads.messages.list( thread_id=self.thread.id ).data - last_message = response_messages[0] + last_message = response_messages[0].content[0].text.value self.messages.append({"role": "assistant", "content": last_message}) + print(last_message) yield str(last_message) async def chatp(self, message: str) -> str: