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)

相关推荐
元宇宙时间1 小时前
全球发展币GDEV:从中国出发,走向全球的数字发展合作蓝图
大数据·人工智能·去中心化·区块链
小黄人20251 小时前
自动驾驶安全技术的演进与NVIDIA的创新实践
人工智能·安全·自动驾驶
ZStack开发者社区2 小时前
首批 | 云轴科技ZStack加入施耐德电气技术本地化创新生态
人工智能·科技·云计算
X Y O3 小时前
神经网络初步学习3——数据与损失
人工智能·神经网络·学习
唯创知音3 小时前
玩具语音方案选型决策OTP vs Flash 的成本功耗与灵活性
人工智能·语音识别
Jamence3 小时前
多模态大语言模型arxiv论文略读(151)
论文阅读·人工智能·语言模型·自然语言处理·论文笔记
tongxianchao3 小时前
LaCo: Large Language Model Pruning via Layer Collapse
人工智能·语言模型·剪枝
HyperAI超神经4 小时前
OmniGen2 多模态推理×自我纠正双引擎,引领图像生成新范式;95 万分类标签!TreeOfLife-200M 解锁物种认知新维度
人工智能·数据挖掘·数据集·图像生成·医疗健康·在线教程·数学代码
网安INF4 小时前
深度学习中批标准化与神经网络调优
人工智能·深度学习·神经网络·机器学习
开开心心_Every4 小时前
便捷的电脑自动关机辅助工具
开发语言·人工智能·pdf·c#·电脑·音视频·sublime text