Skip to content

Commit

Permalink
vertexai[patch]: Release 1.0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
baskaryan authored Jul 31, 2024
2 parents ec61d99 + aee3fc5 commit 4e80086
Show file tree
Hide file tree
Showing 4 changed files with 226 additions and 243 deletions.
3 changes: 2 additions & 1 deletion libs/vertexai/langchain_google_vertexai/chat_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
from langchain_core.pydantic_v1 import BaseModel, root_validator, Field
from langchain_core.runnables import Runnable, RunnablePassthrough, RunnableGenerator
from langchain_core.utils.function_calling import convert_to_openai_tool
from langchain_core.utils.pydantic import is_basemodel_subclass
from vertexai.generative_models import ( # type: ignore
Tool as VertexTool,
)
Expand Down Expand Up @@ -1674,7 +1675,7 @@ class AnswerWithJustification(BaseModel):
""" # noqa: E501
if kwargs:
raise ValueError(f"Received unsupported arguments {kwargs}")
if isinstance(schema, type) and issubclass(schema, BaseModel):
if isinstance(schema, type) and is_basemodel_subclass(schema):
parser: OutputParserLike = PydanticToolsParser(
tools=[schema], first_tool_only=True
)
Expand Down
Loading

0 comments on commit 4e80086

Please sign in to comment.