The Memory Layer for AI Agents - Drop-in memory infrastructure for AI agents and apps. Context that persists. Built for production.
Python agentic-memoryagentic-memory-systemagentsaiai-agentschatgptgenaillmlong-term-memorymemorymemory-managementpythonragstate-management
Fix OpenAI Assistant (#1393)
Dev Khant00c1fa1ec70d
diff --git a/embedchain/store/assistants.py b/embedchain/store/assistants.pyindex 9098cc7c5..b9ca151ab 100644--- a/embedchain/store/assistants.py+++ b/embedchain/store/assistants.py@@ -8,7 +8,8 @@ from pathlib import Pathfrom typing import castfrom openai import OpenAI-from openai.types.beta.threads import MessageContentText, ThreadMessage+from openai.types.beta.threads import Message+from openai.types.beta.threads.text_content_block import TextContentBlockfrom embedchain import Client, Pipelinefrom embedchain.config import AddConfig@@ -130,8 +131,8 @@ class OpenAIAssistant:@staticmethoddef _format_message(thread_message):- thread_message = cast(ThreadMessage, thread_message)- content = [c.text.value for c in thread_message.content if isinstance(c, MessageContentText)]+ thread_message = cast(Message, thread_message)+ content = [c.text.value for c in thread_message.content if isinstance(c, TextContentBlock)]return " ".join(content)@staticmethod