langchain-ai / langchain-databricks

MIT License
5 stars 6 forks source link

Removed id key from message_dict while converting messages to dict #7

Closed yashasreddy closed 2 months ago

yashasreddy commented 2 months ago

The message_dict was updated to exclude the message id key, which was found to be unnecessary. This change addressed an issue that arose when passing id from AIMessage resulting in HTTPError: 400 Client Error: Bad request: json: unknown field "id" for url: Response text: {"error_code": "BAD_REQUEST", "message": "Bad request: json: unknown field \"id\"\n"}.

The error described above was encountered while passing the chat history as a dictionary to the LLM, which is utilized for context-aware conversation.