-
Notifications
You must be signed in to change notification settings - Fork 16.3k
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
schema_json fail with Pydantic BaseModel in langchain-core==0.3.0.dev4 #26250
Comments
* This allows pydantic to correctly resolve annotations necessary for building pydantic models dynamically. * Makes a small fix for RunnableWithMessageHistory which was fetching the OutputType from the RunnableLambda that was yielding another RunnableLambda. This doesn't propagate the output of the RunnableAssign fully (i.e., with concrete type information etc.) Resolves issue: #26250
After fix it doesn't crash, but also doesn't return the expected schema, so the fix is only partial. Users will still need to overwrite it using with_types (which is generally recommended) I'll double check, but believe this is actually not a regression, but an existing issue in 0.2x as well |
) - This allows pydantic to correctly resolve annotations necessary when using openai new param `json_schema` Resolves issue: #26250 --------- Co-authored-by: Eugene Yurtsev <[email protected]> Co-authored-by: Bagatur <[email protected]>
…gchain-ai#26307) - This allows pydantic to correctly resolve annotations necessary when using openai new param `json_schema` Resolves issue: langchain-ai#26250 --------- Co-authored-by: Eugene Yurtsev <[email protected]> Co-authored-by: Bagatur <[email protected]>
Hi, @liuhetian. 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! |
Checked other resources
Example Code
Error Message and Stack Trace (if applicable)
PydanticUserError:
_oai_structured_outputs_parser_output
is not fully defined; you should definePydanticBaseModel
, then call_oai_structured_outputs_parser_output.model_rebuild()
.Description
meet this question when using langserve
add_routes(app, mychain, path='/faq')
System Info
langchain-core==0.3.0.dev4
langchain-openai==0.2.0.dev2
pydantic==2.9.1
pydantic-extra-types==2.5.0
pydantic-settings==2.2.1
pydantic_core==2.23.3
python=3.12
The text was updated successfully, but these errors were encountered: