From c10deab73d2989542290370c1fa8de4b594d2315 Mon Sep 17 00:00:00 2001 From: Pratyush Shukla Date: Wed, 14 Aug 2024 17:37:32 +0530 Subject: [PATCH] fix incorrect attribute access for the model content --- agentops/llm_tracker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agentops/llm_tracker.py b/agentops/llm_tracker.py index cf3f7fd5..c1362ce2 100644 --- a/agentops/llm_tracker.py +++ b/agentops/llm_tracker.py @@ -727,7 +727,7 @@ async def async_generator(): self.llm_event.prompt_tokens = response.usage.input_tokens self.llm_event.completion = { "role": "assistant", - "content": response.content, + "content": response.content[0].text, } self.llm_event.completion_tokens = response.usage.output_tokens self.llm_event.model = response.model