Skip to content

Commit

Permalink
Merge pull request #320 from Sema4AI/fix-missing-assistant-id
Browse files Browse the repository at this point in the history
Fix thread state 500 error (when Retrieval tool is used)
  • Loading branch information
mkorpela authored Apr 25, 2024
2 parents 7bb64a8 + 8014057 commit e1ebc7b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions backend/app/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ async def get_thread_state(*, user_id: str, thread_id: str, assistant_id: str):
"configurable": {
**assistant["config"]["configurable"],
"thread_id": thread_id,
"assistant_id": assistant_id,
}
}
)
Expand All @@ -130,6 +131,7 @@ async def update_thread_state(
"configurable": {
**assistant["config"]["configurable"],
**config["configurable"],
"assistant_id": assistant_id,
}
},
values,
Expand All @@ -151,6 +153,7 @@ async def get_thread_history(*, user_id: str, thread_id: str, assistant_id: str)
"configurable": {
**assistant["config"]["configurable"],
"thread_id": thread_id,
"assistant_id": assistant_id,
}
}
)
Expand Down

0 comments on commit e1ebc7b

Please sign in to comment.