node-DeepResearch开源ai程序用于深入调查查询,继续搜索、阅读网页、推理,直到找到答案

​一、软件介绍

文末提供程序和源码下载

node-DeepResearch开源ai程序用于深入调查查询,继续搜索、阅读网页、推理,直到找到答案。

重要提示

与 OpenAI/Gemini/Perfasciity 的"深度研究"不同,我们只专注于通过迭代过程找到正确的答案 。我们不会针对长篇文章进行优化,这是一个完全不同的问题 ------所以如果你需要从深度搜索中获得快速、简洁的答案,你来对地方了。如果您正在寻找像 OpenAI/Gemini/Perplexity 那样的 AI 生成的长报告,那么这不适合您。

二、Try it Yourself 亲自试一试

We host an online deployment of this exact codebase, which allows you to do a vibe-check; or use it as daily productivity tools.

我们托管了这个确切代码库的在线部署,它允许您进行氛围检查;或将其用作日常生产力工具。

https://search.jina.ai

The official API is also available for you to use:

官方 API 也可供您使用:

https://deepsearch.jina.ai/v1/chat/completions

Learn more about the API at https://jina.ai/deepsearch

https://jina.ai/deepsearch 了解有关 API 的更多信息

三、Install 安装

代码文末可直接下载更快速

cd node-DeepResearch

npm install

四、Usage 用法

We use Gemini (latest gemini-2.0-flash) / OpenAI / LocalLLM for reasoning, Jina Reader for searching and reading webpages, you can get a free API key with 1M tokens from jina.ai.

我们使用 Gemini(最新 gemini-2.0-flash )/ OpenAI / LocalLLM 进行推理,使用 Jina Reader 搜索和阅读网页,您可以从 jina.ai 获得带有 1M 令牌的免费 API 密钥。

export GEMINI_API_KEY=... # for gemini

export OPENAI_API_KEY=... # for openai

export LLM_PROVIDER=openai # for openai

export JINA_API_KEY=jina_... # free jina api key, get from https://jina.ai/reader

npm run dev $QUERY

您还可以使用我们的官方 DeepSearch API:

https://deepsearch.jina.ai/v1/chat/completions

You can use it with any OpenAI-compatible client.

您可以将它与任何 OpenAI 兼容的客户端一起使用。

For the authentication Bearer, API key, rate limit, get from https://jina.ai/deepsearch.

对于身份验证 Bearer、API 密钥、速率限制,从 https://jina.ai/deepsearch 获取。

Client integration guidelines

客户端集成准则

If you are building a web/local/mobile client that uses Jina DeepSearch API, here are some design guidelines:

如果您正在构建一个使用 Jina DeepSearch API 的 web/本地/移动客户端,以下是一些设计准则:

Our API is fully compatible with OpenAI API schema, this should greatly simplify the integration process. The model name is jina-deepsearch-v1.

我们的 API 与 OpenAI API 架构完全兼容,这应该会大大简化集成过程。型号名称为 jina-deepsearch-v1 .

Our DeepSearch API is a reasoning+search grounding LLM, so it's best for questions that require deep reasoning and search.

我们的 DeepSearch API 是 reasoning+search grounding LLM,因此最适合需要深度推理和搜索的问题。

Two special tokens are introduced <think>...</think>. Please render them with care.

引入了 <think>...</think> 两个特殊令牌。请小心渲染它们。

Citations are often provided, and in Github-flavored markdown footnote format, e.g. [^1], [^2], ...

通常会提供引文,并且采用 Github 风格的 markdown 脚注格式,例如 [^1] , [^2] , ...

Guide the user to get a Jina API key from https://jina.ai, with 1M free tokens for new API key.

引导用户从 https://jina.ai 获取 Jina API 密钥,新 API 密钥有 1M 免费令牌。

There are rate limits, between 10RPM to 30RPM depending on the API key tier.

存在 10RPM 到 30RPM 之间的速率限制,具体取决于 API 密钥层。

Download Jina AI logo here

在此处下载 Jeena Ae 徽标

Demo 演示

was recorded with gemini-1.5-flash, the latest gemini-2.0-flash leads to much better results!

与 一起录制 gemini-1.5-flash ,最新的 gemini-2.0-flash 结果要好得多!

Query: "what is the latest blog post's title from jina ai?" 3 steps; answer is correct!

查询: "what is the latest blog post's title from jina ai?" 3 个步骤;答案是正确的!

Query: "what is the context length of readerlm-v2?" 2 steps; answer is correct!

查询: "what is the context length of readerlm-v2?" 2 个步骤;答案是正确的!

Query: "list all employees from jina ai that u can find, as many as possible" 11 steps; partially correct! but im not in the list :(

查询: "list all employees from jina ai that u can find, as many as possible" 11 个步骤;部分正确!但我不在列表中:(

Query: "who will be the biggest competitor of Jina AI" 42 steps; future prediction kind, so it's arguably correct! atm Im not seeing weaviate as a competitor, but im open for the future "i told you so" moment.

查询: "who will be the biggest competitor of Jina AI" 42 个步骤;未来预测类型,所以可以说是正确的!ATM 我不认为 weaviate 自己是竞争对手,但我对未来"我告诉过你"的时刻持开放态度。

More examples: 更多示例:

example: no tool calling

npm run dev "1+1="

npm run dev "what is the capital of France?"

example: 2-step

npm run dev "what is the latest news from Jina AI?"

example: 3-step

npm run dev "what is the twitter account of jina ai's founder"

example: 13-step, ambiguious question (no def of "big")

npm run dev "who is bigger? cohere, jina ai, voyage?"

example: open question, research-like, long chain of thoughts

npm run dev "who will be president of US in 2028?"

npm run dev "what should be jina ai strategy for 2025?"

Use Local LLM 使用本地LLM

Note, not every LLM works with our reasoning flow, we need those who support structured output (sometimes called JSON Schema output, object output) well. Feel free to purpose a PR to add more open-source LLMs to the working list.

请注意,并非每个LLM都适用于我们的推理流程,我们需要那些支持结构化输出(有时称为 JSON Schema 输出、对象输出)的人。请随意使用 PR 将更多开源LLMs添加到工作列表中。

If you use Ollama or LMStudio, you can redirect the reasoning request to your local LLM by setting the following environment variables:

如果您使用 Ollama 或 LMStudio,则可以通过设置以下环境变量将推理请求重定向到您的本地LLM:

export LLM_PROVIDER=openai # yes, that's right - for local llm we still use openai client

export OPENAI_BASE_URL=http://127.0.0.1:1234/v1 # your local llm endpoint

export OPENAI_API_KEY=whatever # random string would do, as we don't use it (unless your local LLM has authentication)

export DEFAULT_MODEL_NAME=qwen2.5-7b # your local llm model name

OpenAI-Compatible Server API

OpenAI 兼容的服务器 API

If you have a GUI client that supports OpenAI API (e.g. CherryStudio, Chatbox) , you can simply config it to use this server.

如果您有支持 OpenAI API 的 GUI 客户端(例如 CherryStudio、Chatbox),您只需将其配置为使用此服务器即可。

Start the server: 启动服务器:

Without authentication

npm run serve

With authentication (clients must provide this secret as Bearer token)

npm run serve --secret=your_secret_token

The server will start on http://localhost:3000 with the following endpoint:

服务器将在 http://localhost:3000 上使用以下端点启动:

POST /v1/chat/completions

Without authentication

curl http://localhost:3000/v1/chat/completions \

-H "Content-Type: application/json" \

-d '{

"model": "jina-deepsearch-v1",

"messages": [

{

"role": "user",

"content": "Hello!"

}

]

}'

With authentication (when server is started with --secret)

curl http://localhost:3000/v1/chat/completions \

-H "Content-Type: application/json" \

-H "Authorization: Bearer your_secret_token" \

-d '{

"model": "jina-deepsearch-v1",

"messages": [

{

"role": "user",

"content": "Hello!"

}

],

"stream": true

}'

Response format: 响应格式:

{

"id": "chatcmpl-123",

"object": "chat.completion",

"created": 1677652288,

"model": "jina-deepsearch-v1",

"system_fingerprint": "fp_44709d6fcb",

"choices": [{

"index": 0,

"message": {

"role": "assistant",

"content": "YOUR FINAL ANSWER"

},

"logprobs": null,

"finish_reason": "stop"

}],

"usage": {

"prompt_tokens": 9,

"completion_tokens": 12,

"total_tokens": 21

}

}

For streaming responses (stream: true), the server sends chunks in this format:

对于流式响应 (stream: true),服务器按以下格式发送块:

{

"id": "chatcmpl-123",

"object": "chat.completion.chunk",

"created": 1694268190,

"model": "jina-deepsearch-v1",

"system_fingerprint": "fp_44709d6fcb",

"choices": [{

"index": 0,

"delta": {

"content": "..."

},

"logprobs": null,

"finish_reason": null

}]

}

Note: The think content in streaming responses is wrapped in XML tags:

注意:流式响应中的 think content 包装在 XML 标记中:

<think>

thinking steps...

</think>

final answer

Docker Setup Docker 设置

Build Docker Image 构建 Docker 镜像

To build the Docker image for the application, run the following command:

要为应用程序构建 Docker 镜像,请运行以下命令:

docker build -t deepresearch:latest .

Run Docker Container 运行 Docker 容器

To run the Docker container, use the following command:

要运行 Docker 容器,请使用以下命令:

docker run -p 3000:3000 --env GEMINI_API_KEY=your_gemini_api_key --env JINA_API_KEY=your_jina_api_key deepresearch:latest

Docker Compose

You can also use Docker Compose to manage multi-container applications. To start the application with Docker Compose, run:

您还可以使用 Docker Compose 来管理多容器应用程序。要使用 Docker Compose 启动应用程序,请运行:

docker-compose up

五、How Does it Work? 它是如何工作的?

Not sure a flowchart helps, but here it is:

不确定流程图是否有帮助,但这里是:

六、软件下载

迅雷网盘

本文信息来源于GitHub作者地址:GitHub - jina-ai/node-DeepResearch: Keep searching, reading webpages, reasoning until it finds the answer (or exceeding the token budget)

相关推荐
星越华夏6 小时前
计算机视觉:YOLOv12安装环境
人工智能·yolo·计算机视觉
Yolanda947 小时前
【人工智能】《从零搭建AI问答助手项目(九):Prompt优化》
人工智能·prompt
wj3055853787 小时前
课程 9:模型测试记录与 Prompt 策略
linux·人工智能·python·comfyui
小和尚同志7 小时前
深入使用 skill-creator:结合真实生产级实践
人工智能·aigc
DevSecOps选型指南7 小时前
安全419专访悬镜安全 | 穿越周期在 AI 浪潮中定义数字供应链安全新范式
人工智能
沪漂阿龙7 小时前
面试题详解:GraphRAG 全面解析——知识图谱增强 RAG、Local Search、Global Search、社区摘要、工程落地与评估指标一次讲透
人工智能·知识图谱
WangN27 小时前
Unitree RL Lab 学习笔记【通识】
人工智能·机器学习
haina20198 小时前
海纳AI亮相《科创中国》,解码招聘“智”变之路
人工智能·ai面试·ai招聘
阿星AI工作室8 小时前
刘润年中大课笔记:一句话说清AI落地之战的本质
大数据·人工智能·创业创新·商业
qingfeng154158 小时前
企业微信机器人开发:如何实现自动化与智能运营?
人工智能·python·机器人·自动化·企业微信