Function calling is an interesting use case. It is possible to use function calling via the OpenAI format as long as both the models you are routing to support it. See the compatibility list here: https://docs.
[6]Introduction to function calling:https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/function-calling [7]How to Interact with APIs Using Function Calling in Gemini:https://codelabs.developers.google.com/codelabs/gemini-function-calling#0 [8]Ollama Tool Support:https://ollama.com...
1. Basic Function Calling This example shows how to use a single function with automatic tool choice. from openai import OpenAI client = OpenAI(base_url="http://0.0.0.0:8000/v1", api_key="not-used") MODEL_NAME = "meta/llama-3.1-70b-instruct" # Define available function weather_tool ...
[Bug]: litellm doesn't support function calling model from OpenRouter. bug cause codeactagent couldn't interact with internet solely without ask browser agent for help #337 Sign in to view logs Summary Jobs call-openhands-resolver Run details Usage Workflow file Triggered via issue November...
接口调用:提供多种使用模型的接口,包括 OpenAI 兼容的 RESTful API(包括 Function Calling),RPC,命令行,web UI 等等。方便模型的管理与交互。 集群计算,分布协同: 支持分布式部署,通过内置的资源调度器,让不同大小的模型按需调度到不同机器,充分使用集群资源。 开放生态,无缝对接: 与流行的三方库无缝对接,包括 Lang...
接口调用:提供多种使用模型的接口,包括 OpenAI 兼容的 RESTful API(包括 Function Calling),RPC,命令行,web UI 等等。方便模型的管理与交互。 集群计算,分布协同: 支持分布式部署,通过内置的资源调度器,让不同大小的模型按需调度到不同机器,充分使用集群资源。
我们实现函数 generate_sql ,利用 LLM 的 tool calling 能力,将用户原始的自然语言提问,转化成结构化的标准 SQL。具体函数实现如下: 代码语言:javascript 代码运行次数:0 运行 AI代码解释 def generate_sql(db_schema: str, query: str) -> str: """ 调用LLM,利用工具调用能力,生成SQL语句 :param db_schema...
我们将使用OpenAI聊天模型和"openai-tools" agent,该 agent 将使用OpenAI的 function-calling API来驱动agent 的工具选择和调用。正如我们所看到的,agent 将首先选择哪些表是相关的,然后将这些表的schema和一些示例行添加到prompt中。 from langchain_community.agent_toolkits import create_sql_agent from langchain_op...
接口调用:提供多种使用模型的接口,包括 OpenAI 兼容的 RESTful API(包括 Function Calling),RPC,命令行,web UI 等等。方便模型的管理与交互。 集群计算,分布协同: 支持分布式部署,通过内置的资源调度器,让不同大小的模型按需调度到不同机器,充分使用集群资源。
4. call_fireman: Call this tool to interact with the fireman calling API. This API will call 119 to extinguish the fire. Parameters: [] Use the following format: Thought: you should always think about what to do Action: the action to take, should be one of the above tools[fire_recogni...