大家好,我是 Ai 学习的老章。
Ollama 最近又搞了几个大新闻,不仅在免费云端模型里加入了强大的 Qwen3-VL,还推出了能让大模型联网的网页搜索 API。作为 Ollama 的忠实用户,我必须得带大家深入体验一下。
还记得我之前介绍的 Ollama 可以启动云端大模型了,免费额度 吗?当时我们体验了 gpt-oss 和 deepseek-v3.1 等云端模型。现在,这个家庭又迎来了一位新成员:Qwen3-VL。
Qwen3-VL 是一个非常强大的视觉语言模型,它的多模态能力相当惊人。官方介绍它具备以下几点能力:
现在,除了之前的几个云端模型,我们又多了一个选择:
使用方法和之前一样,登录 Ollama 账号后,直接在命令行运行:
ollama run qwen3-vl:235b-cloud
或者在 Python 中通过 API 调用。比如,下面这个例子展示了如何使用 Qwen3-VL 来翻译菜单:
from ollama import Client
client = Client(
host="https://ollama.com",
headers={'Authorization': 'YOUR_API_KEY'}
)
response = client.chat(
model='qwen3-vl:235b-cloud',
messages=[
{
'role': 'user',
'content': 'Translate the menu in the image to English.',
'images': ['https://files.ollama.com/qwen3-vl/menu-example.png']
},
]
)
print(response['message']['content'])
这对于需要强大视觉理解能力的应用来说,绝对是一个福音。
另一个重磅更新是网页搜索 API。这个功能可以让 Ollama 的模型(无论是本地还是云端)连接到互联网,获取最新的信息。
这个 API 提供了两个主要功能:
同样,你需要一个免费的 Ollama 账户和 API 密钥。
值得一提的是,这个网页搜索功能还可以直接接入现有的 MCP(Model Control Protocol) 客户端,例如 OpenAI Codex、cline、Goose 等。这意味着你可以在你习惯的工具中,无缝地为你的模型插上联网的翅膀。
下面是一个使用 curl 调用网页搜索的例子:
curl -X POST "https://ollama.com/api/search"
-H "Authorization: Bearer YOUR_API_KEY"
-H "Content-Type: application/json"
-d '{
"query": "latest news on generative ai"
}'
返回的结果会包含一系列网页的标题、URL 和摘要。
我们也可以用它来构建一个简单的研究代理。比如,我们可以先搜索一个主题,然后用 fetch API 来阅读其中一篇文章的全文。
import os
from ollama import Client
client = Client(
host="https://ollama.com",
headers={'Authorization': os.environ.get("OLLAMA_API_KEY")}
)
# 1. Search the web
search_results = client.search(query="What is the latest news on Qwen3-VL?")
if not search_results:
print("No search results found.")
else:
# 2. Fetch the content of the first result
first_url = search_results[0]['url']
fetched_content = client.fetch(url=first_url)
# 3. Use a model to summarize the content
summary_response = client.chat(
model='qwen3:7b', # Using a local model for summarization
messages=[
{
'role': 'system',
'content': 'You are a helpful assistant that summarizes web pages.'
},
{
'role': 'user',
'content': f"Please summarize the following content:
{fetched_content['content']}"
}
]
)
print(summary_response['message']['content'])
这个功能极大地扩展了 Ollama 的应用场景,让我们可以构建出能够实时获取信息的智能体。
总的来说,Ollama 的这两个更新都非常实用。免费的云端视觉模型和网页搜索 API,让普通开发者也能轻松用上最前沿的 AI 能力。我非常期待看到社区里会出现哪些有趣的应用。
好了,今天的分享就到这里。我们下篇文章再见!
制作不易,如果这篇文章觉得对你有用,可否点个关注。给我个三连击:点赞、转发和在看。若可以再给我加个,谢谢你看我的文章,我们下篇再见!
更新时间:2025-10-19
本站资料均由网友自行发布提供,仅用于学习交流。如有版权问题,请与我联系,QQ:4156828
© CopyRight 2020-=date("Y",time());?> All Rights Reserved. Powered By 71396.com 闽ICP备11008920号
闽公网安备35020302034903号