You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I added a very descriptive title to this question.
I searched the LangChain documentation with the integrated search.
I used the GitHub search to find a similar question and didn't find it.
Commit to Help
I commit to help with one of those options 👆
Example Code
classEmailModel(BaseModel):
entity_name: str|None=Field(
default=None,
description="""The name of the entity sending the notice (if present in the message)""",
)
llm=init_chat_model("gemini-2.0-flash", model_provider="google_vertexai", streaming=True)
email_parser_prompt=ChatPromptTemplate.from_messages(
[
(
"system",
""" Parse the date of notice, sending entity name, sending entity phone, sending entity email, project id, site location, violation type, required changes, compliance deadline, and maximum potential fine from the message. If any of the fields aren't present, don't populate them. Try to cast dates into the YYYY-mm-dd format. Don't populate fields if they're not present in the message. Here's the notice message: {message} """,
)
]
)
email_parser_chain= (
email_parser_prompt|lm.with_structured_output(EmailModel)
)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Checked other resources
Commit to Help
Example Code
I have tried the following but to no avail:
error:
langchain==0.3.20
langchain-community==0.3.19
langchain-core==0.3.45
langchain-google-genai==2.1.0
langchain-google-vertexai==2.0.9
langchain-openai==0.3.8
langchain-text-splitters==0.3.6
Beta Was this translation helpful? Give feedback.
All reactions