Skip to content

Commit

Permalink
docs: fix with_structured_output examples (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
baskaryan committed Mar 24, 2024
1 parent 51bf9ef commit 5f795a4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libs/vertexai/langchain_google_vertexai/chat_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ class AnswerWithJustification(BaseModel):
answer: str
justification: str
llm = ChatVertexAI(model="gemini-pro", temperature=0)
llm = ChatVertexAI(model_name="gemini-pro", temperature=0)
structured_llm = llm.with_structured_output(AnswerWithJustification)
structured_llm.invoke("What weighs more a pound of bricks or a pound of feathers")
Expand All @@ -665,7 +665,7 @@ class AnswerWithJustification(BaseModel):
answer: str
justification: str
llm = ChatVertexAI(model="gemini-pro", temperature=0)
llm = ChatVertexAI(model_name="gemini-pro", temperature=0)
structured_llm = llm.with_structured_output(AnswerWithJustification, include_raw=True)
structured_llm.invoke("What weighs more a pound of bricks or a pound of feathers")
Expand All @@ -688,7 +688,7 @@ class AnswerWithJustification(BaseModel):
justification: str
dict_schema = convert_to_openai_tool(AnswerWithJustification)
llm = ChatVertexAI(model="gemini-pro", temperature=0)
llm = ChatVertexAI(model_name="gemini-pro", temperature=0)
structured_llm = llm.with_structured_output(dict_schema)
structured_llm.invoke("What weighs more a pound of bricks or a pound of feathers")
Expand Down

0 comments on commit 5f795a4

Please sign in to comment.