Hacker News 中文摘要

RSS订阅

Ollama 网络搜索 -- Ollama Web Search

文章摘要

Ollama推出网页搜索API,提供免费额度,帮助AI模型获取最新网络信息以减少幻觉提高准确性。该功能可通过REST API或Python/JavaScript库使用,支持OpenAI等模型进行长期研究任务。用户需创建API密钥即可开始使用。

文章总结

Ollama推出网页搜索API功能

Ollama最新发布了网页搜索API功能,该服务提供免费基础使用额度,用户可通过Ollama云服务获取更高调用限额。这项功能能为AI模型提供实时网络信息,有效减少幻觉输出并提升回答准确性。

技术实现方面: - 提供REST API接口,并深度集成于Python和JavaScript库 - 支持OpenAI的gpt-oss等模型执行长期研究任务 - 包含网页抓取(web_fetch)功能,可解析单个页面内容

快速入门指南: 1. 在账户设置创建API密钥 2. 支持三种调用方式: - cURL命令直接调用 - Python库(需安装ollama>=0.6.0) - JavaScript库(需安装ollama@>=0.6.0)

开发示例: 展示了如何使用Qwen 3模型构建搜索代理,该代理能自动调用网页搜索工具,进行多轮交互式信息检索。建议使用32000 tokens的上下文长度以获得最佳效果。

推荐模型: - 本地模型:qwen3、gpt-oss - 云模型:qwen3:480b-cloud、gpt-oss:120b-cloud、deepseek-v3.1-cloud

集成方案: - 支持通过Python MCP服务器与Cline、Codex等客户端集成 - 兼容Goose扩展插件

该服务现已开放免费使用,用户可注册账号体验,商业用户可升级订阅获取更高性能服务。

(注:原文中的代码示例、输出结果截图及具体参数配置等技术细节已作简化处理,保留核心功能说明)

评论总结

总结评论内容如下:

  1. 对小型模型更新数据的认可

    • 用户认为该功能解决了小型模型难以更新数据的问题。
      引用:"My biggest gripe with small models has been the inability to keep it informed with new data. Seems like this at least eases the process."
      ("我对小型模型最大的不满是无法更新数据。这个功能似乎至少缓解了这个问题。")
  2. 对Ollama云服务的质疑

    • 用户不理解为何要为本地模型付费,认为与OpenAI等公司相比没有优势。
      引用:"Why would I pay $20/month to use small inferior models instead of using one of the usual AI companies like OpenAI or even Mistral?"
      ("为什么要每月付20美元用小型劣质模型,而不是用OpenAI或Mistral这样的公司?")
      引用:"I thought the point of Ollama was to self-host models."
      ("我以为Ollama的意义是自托管模型。")
  3. 对搜索功能的关注

    • 用户关心搜索功能的实现方式(是否使用Bing/Google)和数据许可问题。
      引用:"Do they pull their own index like brave or are they using Bing/Google in the background?"
      ("他们是像Brave一样自建索引,还是背后用Bing/Google?")
      引用:"Crucially, I want to understand the license that applies to the search results. Can I store them, can I re-publish them?"
      ("关键是我想了解搜索结果的许可。我能存储或重新发布吗?")
  4. 对本地化工具的期待

    • 用户希望Ollama能支持本地工具集成,而非依赖云服务。
      引用:"I wish they would instead focus on local tool use. I could just use my own web search via brave api."
      ("我希望他们专注于本地工具使用。我可以用Brave API自己实现网页搜索。")
      引用:"Any tips on local/enterprise search? I like using ollama locally..."
      ("有什么本地/企业搜索的建议?我喜欢本地用Ollama...")
  5. 对开源和平台中立的担忧

    • 用户担心Ollama近期动向可能背离开源和中立性。
      引用:"I saw ollama as the open source // platform agnostic tool but I worry their recent posturing is going against that."
      ("我曾认为Ollama是开源/平台中立的工具,但担心最近的动向违背了这一点。")
  6. 对本地化替代方案的讨论

    • 用户提出构建本地化迷你搜索引擎的想法。
      引用:"I've been thinking about building a home-local 'mini-Google' that indexes maybe 1,000 websites."
      ("我在考虑构建一个本地'迷你Google',索引约1000个网站。")
  7. 对功能扩展的乐观态度

    • 用户认为网页搜索是第一步,期待未来扩展更多工具功能。
      引用:"This is a nice first step - web search makes sense, and it’s easy to imagine other tools being added next."
      ("这是很好的第一步,网页搜索有意义,未来可能添加更多工具。")