mirror of
https://github.com/hwchase17/langchain.git
synced 2026-03-18 11:07:36 +00:00
fix(openai): add missing tools param to ChatOpenAI with_structured_output (#34075)
This commit is contained in:
@@ -3018,6 +3018,7 @@ class ChatOpenAI(BaseChatOpenAI): # type: ignore[override]
|
||||
method: Literal["function_calling", "json_mode", "json_schema"] = "json_schema",
|
||||
include_raw: bool = False,
|
||||
strict: bool | None = None,
|
||||
tools: list | None = None,
|
||||
**kwargs: Any,
|
||||
) -> Runnable[LanguageModelInput, _DictOrPydantic]:
|
||||
r"""Model wrapper that returns outputs formatted to match the given schema.
|
||||
@@ -3411,7 +3412,12 @@ class ChatOpenAI(BaseChatOpenAI): # type: ignore[override]
|
||||
|
||||
""" # noqa: E501
|
||||
return super().with_structured_output(
|
||||
schema, method=method, include_raw=include_raw, strict=strict, **kwargs
|
||||
schema,
|
||||
method=method,
|
||||
include_raw=include_raw,
|
||||
strict=strict,
|
||||
tools=tools,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user