-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
When executing GraphService.stream_graph, the process fails during thread-name generation because messages_str contains plain strings rather than objects with a .text attribute. This results in the following exception:
AttributeError: 'str' object has no attribute 'text'
Where It Occurs
Inside graph_service.py:
if meta["is_new_thread"] and self.config.thread_name_generator_path:
messages_str = [msg.text() for msg in messages_str]
thread_name = await self._save_thread_name(
config, config["thread_id"], messages_str
)
meta["thread_name"] = thread_nameWhat’s Happening
Earlier in the stream handler, messages_str is populated with chunk.message.text(), converting entries into raw strings.
Later, the thread-name generator assumes each item is a message object and tries to call .text() again, causing the failure.
Expected Behavior
Thread naming should work regardless of whether messages are:
- model objects
- plain strings
Actual Behavior
Execution crashes with:
AttributeError: 'str' object has no attribute 'text'
Additional Notes
Pydantic V2.11 deprecation warnings also appear, though unrelated.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working