-
Notifications
You must be signed in to change notification settings - Fork 17.2k
Chathuggingface 422 error #24720
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I am experiencing the same issue. |
I'm getting:
using: from langchain_core.utils.function_calling import convert_to_openai_tool
dict_schema = convert_to_openai_tool(ArticleAnalysis)
output_msg = chat_model.bind(max_tokens=8192, temperature=0.0).with_structured_output(dict_schema).invoke(chat_sequence)
chat_sequence.append(output_msg)
md_text = output_msg.content
display_markdown(md_text, raw=True)
display_markdown("**Finish Reason**: " + output_msg.response_metadata["finish_reason"], raw=True)
pprint(output_msg.response_metadata) |
@Jofthomas could this be linked to this issue? Not sure if the |
Hi, @minmin-intel. I'm Dosu, and I'm helping the LangChain team manage their backlog. I'm marking this issue as stale. Issue Summary
Next Steps
Thank you for your understanding and contribution! |
@dosubot Downgrading is not a valid solution. |
@eyurtsev, the user @michael-conrad has indicated that downgrading is not a valid solution for the 422 "Unprocessable entity" error with ChatHuggingFace and HuggingFaceEndpoint. Could you please assist them with this issue? |
Is there any news on this? On the latest versions it's still not working |
Could you provide more details about the specific configuration or parameters you are using with the Hugging Face API? Additionally, any information about the model you are trying to use or any specific changes you made before encountering the error would be helpful. To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
@dosu It's exactly the same as before mentioned by other users in this issue. |
Checked other resources
Example Code
Error Message and Stack Trace (if applicable)
No response
Description
Using ChatHuggingFace with llm being HuggingFaceEndpoint got 422 error "Unprocessable entity" from huggingface-hub Inference client post function, when using the latest versions of langchain and huggigface-hub 0.24.3. Downgrading to the following version, I got the code to run.
The working versions of packages
huggingface_hub==0.24.0
langchain==0.2.9
langchain-core==0.2.21
langchain-huggingface==0.0.3
langchain_community==0.2.7
System Info
The following versions are what caused problems
langchain-community==0.0.38
langchain-core==0.2.19
langchain-huggingface==0.0.3
langchain-openai==0.1.16
huggingface_hub==0.24.3
The text was updated successfully, but these errors were encountered: