mirror of
https://github.com/hwchase17/langchain.git
synced 2026-06-09 10:17:00 +00:00
docs(fireworks,groq,huggingface,mistralai,ollama,openai): x-ref convert_to_openai_tool (#34276)
This commit is contained in:
@@ -947,8 +947,8 @@ class ChatHuggingFace(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 or
|
||||
`'auto'` to automatically determine which function to call
|
||||
@@ -956,8 +956,7 @@ class ChatHuggingFace(BaseChatModel):
|
||||
{"type": "function", "function": {"name": <<tool_name>>}}.
|
||||
**kwargs: Any additional parameters to pass to the
|
||||
`langchain.runnable.Runnable` constructor.
|
||||
|
||||
"""
|
||||
""" # noqa: E501
|
||||
formatted_tools = [convert_to_openai_tool(tool) for tool in tools]
|
||||
if tool_choice is not None and tool_choice:
|
||||
if len(formatted_tools) != 1:
|
||||
|
||||
Reference in New Issue
Block a user