←新闻详情

Ollama Blog更新于 10月14日 09:24

Ollama 新增工具调用支持,兼容 Llama 3.1 等模型

Tool support · Ollama Blog

AI 导读

Ollama 宣布支持工具调用,模型可借助已知工具回答提示词,从而完成更复杂的任务或与外部世界交互。在 Ollama API 的 tools 字段中提供可用工具列表后,受支持模型会返回 tool_calls 响应,工具结果可通过 tool 角色的消息回传。支持模型包括 Llama 3.1、Mistral Nemo、Firefunction v2 和 Command-R +,其 OpenAI 兼容端点也已支持工具,并支持流式工具调用与强制指定工具。

推荐理由

精选AI 评分 60

Ollama 官方说明工具调用接入方式与支持模型,读者可据此判断本地模型能否接入外部工具。

主题

标签

正文

当前显示原文,中文全文译文尚未就绪。

July 25, 2024

Ollama now supports tool calling with popular models such as Llama 3.1. This enables a model to answer a given prompt using tool(s) it knows about, making it possible for models to perform more complex tasks or interact with the outside world.

Example tools include:

Functions and APIs; Web browsing; Code interpreter; much more!

Tool calling

To enable tool calling, provide a list of available tools via the tools field in Ollama’s API.

Supported models will now answer with a tool_calls response. Tool responses can be provided via messages with the tool role. See API documentation for more information.

Supported models

A list of supported models can be found under the Tools category on the models page:

Llama 3.1; Mistral Nemo; Firefunction v2; Command-R +

Note: please check if you have the latest model by running ollama pull

OpenAI compatibility

Ollama’s OpenAI compatible endpoint also now supports tools, making it possible to switch to using Llama 3.1 and other models.

Streaming tool calls: stream tool calls back to begin taking action faster when multiple tools are returned; Tool choice: force a model to use a tool

Let’s build together

We are so excited to bring you tool support, and see what you build with it!

If you have any feedback, please do not hesitate to tell us either in our Discord or via hello@ollama.com.

来源

Ollama Blog