docs(fireworks,groq,huggingface,mistralai,ollama,openai): x-ref convert_to_openai_tool (#34276)

This commit is contained in:
Mason Daugherty
2025-12-09 19:51:04 -05:00
committed by GitHub
parent 585e12e53b
commit ff6e3558d7
6 changed files with 17 additions and 21 deletions

View File

@@ -669,8 +669,8 @@ class ChatFireworks(BaseChatModel):
Args:
tools: A list of tool definitions to bind to this chat model.
Supports any tool definition handled by
`langchain_core.utils.function_calling.convert_to_openai_tool`.
Supports any tool definition handled by [`convert_to_openai_tool`][langchain_core.utils.function_calling.convert_to_openai_tool].
tool_choice: Which tool to require the model to call.
Must be the name of the single provided function,
`'auto'` to automatically determine which function to call
@@ -679,8 +679,7 @@ class ChatFireworks(BaseChatModel):
`{"type": "function", "function": {"name": <<tool_name>>}}`.
**kwargs: Any additional parameters to pass to
`langchain_fireworks.chat_models.ChatFireworks.bind`
"""
""" # noqa: E501
formatted_tools = [convert_to_openai_tool(tool) for tool in tools]
if tool_choice is not None and tool_choice:
if isinstance(tool_choice, str) and (