[ERROR] ValueError: Unsupported chat history format: <class 'str'>. Full chat history: #25854
Replies: 2 comments 1 reply
-
@vinayburam Hello there! I'm here to assist you with any issues you might be experiencing. If you need help solving bugs, answering questions, or becoming a contributor, I'm here to help while we wait for a human maintainer. The error "ValueError: Unsupported chat history format: <class 'str'>" occurs because the chat history is not in the expected format. The supported format for the chat history is a list of tuples, where each tuple contains two strings, or a list of Here is how you can modify your
Choose one of the above methods based on your preference. The first method converts the chat history to a list of tuples, while the second method converts it to a list of This should resolve the error and allow your |
Beta Was this translation helpful? Give feedback.
-
Thanks it worked. but when i am using history with langchain getting the same resopnse again and again for diff quries> History from run chain function [('User: who is the suplier for Distributor liquid and gas handling, seals, MRO\nBot: \nUser: who is the suplier for Distributor liquid and gas handling, seals, MRO\nBot: Category: Electrical & Mechanical OEM|Fluid and Gas Distribution (OEM)|Fluid and Gas Static Components|o-rings, seals & gaskets \nSupplierName: eeeee \nDescription: Distributor liquid and gas handling, seals, MRO \nPrimary Contact: Mmmmm l \nAlternate Contact: Dddd \nGlobal Contact: Miiii \nUser: Distributor liquid and gas handling, seals, MRO give me primary contact\nBot: \nUser: Distributor liquid and gas handling, seals, MRO give me primary contact\nBot: Solution:\n\n### Summary Response\n\nCategory: 661 Electrical & Mechanical OEM|Fluid and Gas Distribution (OEM)|Fluid and Gas Static Components\n\nSupplierName: eeee\n\nDescription: Distributor liquid and gas handling, seals, MRO\n\nPrimary Contact: Macintyre, Paul\n\nAlternate Contact: Ddddd\n\nGlobal Contact: Miiii\n\n---\n\n### Handling No Results\n- If no relevant result was found, consider looking into:\n - Supplier contact information for other categories within Electrical & Mechanical OEM.\n - Additional details on Fluid and Gas Distribution components.\n - Contact information for other suppliers listed in the provided excerpts.\nUser: what is category for this\nBot: ', '')] Here in the above resopnse you can see i am getting same resopnse for each query |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Checked other resources
Commit to Help
Example Code
Description
when i m trying to pass the chat history getting unsupported [ERROR] ValueError: Unsupported chat history format: <class 'str'>. Full chat history:
can you please help which format is supported
System Info
ok
Beta Was this translation helpful? Give feedback.
All reactions