From 3bda3984a4058bad2b98aace56dcc4c1d0bfd2ea Mon Sep 17 00:00:00 2001 From: Han Xiao Date: Mon, 3 Feb 2025 13:27:27 +0800 Subject: [PATCH 1/2] Update README.md --- README.md | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index ab46ac4..894ed14 100644 --- a/README.md +++ b/README.md @@ -11,16 +11,16 @@ Query: `"who is the biggest? cohere, jina ai, voyage?"` - 13 steps We use gemini for llm, brave for search, jina reader for reading a webpage. ```bash -export GOOGLE_API_KEY=... # ask han -export BRAVE_API_KEY=... # brave provide free key, ask han -export JINA_API_KEY=jina_... # get from jina.ai +export GOOGLE_API_KEY=... # for gemini api, ask han +export JINA_API_KEY=jina_... # free jina api key, get from jina.ai/reader +export BRAVE_API_KEY=... # brave search provide free key, ask han git clone https://github.com/jina-ai/node-DeepResearch.git cd node-DeepResearch npm install ``` -## Example +## Examples ``` # example: no tool calling npm run dev "1+1=" @@ -32,10 +32,10 @@ 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: many-step, ambiguious question +# example: 13-step, ambiguious question (no def of "big") npm run dev "who is bigger? cohere, jina ai, voyage?" -# example: open question, long chain of thoughts +# 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?" ``` @@ -81,9 +81,11 @@ The server will emit the following event types: Example events: ``` -data: {"type":"progress","data":"Step 1 / Budget used 10%"} -data: {"type":"progress","data":"Step 2 / Budget used 25%"} -data: {"type":"answer","data":{"action":"answer","answer":"Paris is the capital of France","references":[]}} +data: {"type":"progress","trackers":{"tokenUsage":74950,"tokenBreakdown":{"agent":64631,"read":10319},"actionState":{"action":"search","thoughts":"The provided text mentions several investors in Jina AI but doesn't specify ownership percentages. A direct search for ownership percentages is needed to answer the question definitively.","URLTargets":[],"answer":"","questionsToAnswer":[],"references":[],"searchQuery":"Jina AI investor ownership percentages"},"step":7,"badAttempts":0,"gaps":[]}} + +data: {"type":"progress","trackers":{"tokenUsage":74950,"tokenBreakdown":{"agent":64631,"read":10319},"actionState":{"action":"search","thoughts":"The provided text mentions several investors in Jina AI's funding rounds but doesn't specify ownership percentages. A search focusing on equity stakes and ownership percentages held by each investor will provide the necessary information to answer the main question.","URLTargets":[],"answer":"","questionsToAnswer":[],"references":[],"searchQuery":"Jina AI investor equity percentage ownership stake"},"step":8,"badAttempts":0,"gaps":[]}} + +data: {"type":"progress","trackers":{"tokenUsage":88096,"tokenBreakdown":{"agent":77777,"read":10319},"actionState":{"action":"search","thoughts":"The provided text mentions several investors in Jina AI's funding rounds but doesn't specify ownership percentages. A search focusing on equity stakes and ownership percentages held by each investor will provide the necessary information to answer the main question.","URLTargets":[],"answer":"","questionsToAnswer":[],"references":[],"searchQuery":"Jina AI investor equity percentage ownership stake"},"step":8,"badAttempts":0,"gaps":[]}} ``` From 9508eb3c7c52556de78c3795701547dedc493300 Mon Sep 17 00:00:00 2001 From: Han Xiao Date: Mon, 3 Feb 2025 13:35:04 +0800 Subject: [PATCH 2/2] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 894ed14..576592d 100644 --- a/README.md +++ b/README.md @@ -8,12 +8,12 @@ Query: `"who is the biggest? cohere, jina ai, voyage?"` - 13 steps ## Install -We use gemini for llm, brave for search, jina reader for reading a webpage. +We use gemini for llm, brave/duckduckgo for search, jina reader for reading a webpage. ```bash export GOOGLE_API_KEY=... # for gemini api, ask han -export JINA_API_KEY=jina_... # free jina api key, get from jina.ai/reader -export BRAVE_API_KEY=... # brave search provide free key, ask han +export JINA_API_KEY=jina_... # free jina api key, get from https://jina.ai/reader +export BRAVE_API_KEY=... # (optional, when not given it uses duckduckgo) brave search provide free key, ask han git clone https://github.com/jina-ai/node-DeepResearch.git cd node-DeepResearch