Unable to use langchain[anthropic] package for redshift db. BadRequestError: Error code: 400 - {'type': 'error', 'error': {'type': 'invalid_request_error', 'message': 'messages: at least one message is required'}} #30705
Replies: 1 comment
-
fixed |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Checked other resources
Commit to Help
Example Code
Description
I am trying to use the connect my redshift db to a llm (Claude) using langchain and I m following this documentation:
https://python.langchain.com/docs/tutorials/sql_qa/
The code and steps given in the tutorial works fine for Open AI but as soon as i switch to Anthropic's version the same code provided in the tutorial doesn't work. It contantly throws an error
BadRequestError: Error code: 400 - {'type': 'error', 'error': {'type': 'invalid_request_error', 'message': 'messages: at least one message is required'}}
Is this a bug or am i doing it wrong as I haven't changed the main code apart from return statement of function write_query()
System Info
langchain==0.3.23
langchain-anthropic==0.3.10
langchain-community==0.3.21
langchain-core==0.3.51
langchain-openai==0.3.12
langchain-text-splitters==0.3.8
langchainhub==0.1.21
Platform = Windows 11
Python = 3.12
Beta Was this translation helpful? Give feedback.
All reactions