-
Notifications
You must be signed in to change notification settings - Fork 19k
Open
Open
Copy link
Labels
bugRelated to a bug, vulnerability, unexpected error with an existing featureRelated to a bug, vulnerability, unexpected error with an existing featurelangchainRelated to the package `langchain`Related to the package `langchain`
Description
Checked other resources
- This is a bug, not a usage question.
- I added a clear and descriptive title that summarizes this issue.
- I used the GitHub search to find a similar question and didn't find it.
- I am sure that this is a bug in LangChain rather than my code.
- The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).
- This is not related to the langchain-community package.
- I read what a minimal reproducible example is (https://stackoverflow.com/help/minimal-reproducible-example).
- I posted a self-contained, minimal, reproducible example. A maintainer can copy it and run it AS IS.
Example Code
Such as
class StructuredResponse(BaseModel):
id: str
context: str
agent = create_agent(model=llm, response_format=StructuredResponse)
result = agent.invoke()
Error Message and Stack Trace (if applicable)
The standard result
must include both "message" and "structured_response"; however, currently, it only contains "message."
Description
I have printed the response content; it is also in JSON format, but it only includes the "message." The final AIMessage contains the complete structured result. The "finish_reason" being "stop" indicates that it worked correctly.
System Info
python test.py
Metadata
Metadata
Assignees
Labels
bugRelated to a bug, vulnerability, unexpected error with an existing featureRelated to a bug, vulnerability, unexpected error with an existing featurelangchainRelated to the package `langchain`Related to the package `langchain`