mirror of
https://github.com/jina-ai/node-DeepResearch.git
synced 2025-12-26 06:28:56 +08:00
refactor: improve logging details and context
This commit is contained in:
parent
a179807c5a
commit
4810393923
@ -563,8 +563,7 @@ export async function getResponse(question?: string,
|
||||
} as StepAction;
|
||||
// print allowed and chose action
|
||||
const actionsStr = [allowSearch, allowRead, allowAnswer, allowReflect, allowCoding].map((a, i) => a ? ['search', 'read', 'answer', 'reflect'][i] : null).filter(a => a).join(', ');
|
||||
logDebug(`${currentQuestion}: ${thisStep.action} <- [${actionsStr}]`);
|
||||
logDebug('Step details:', thisStep);
|
||||
logDebug(`Step decision: ${thisStep.action} <- [${actionsStr}]`, { thisStep, currentQuestion });
|
||||
|
||||
context.actionTracker.trackAction({ totalStep, thisStep, gaps });
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@ import { getKnowledgeStr } from "../utils/text-tools";
|
||||
import { getModel } from "../config";
|
||||
import { generateText } from "ai";
|
||||
import { Schemas } from "../utils/schemas";
|
||||
import { logInfo, logError, logDebug, logWarning } from '../logging';
|
||||
import { logInfo, logError, logDebug } from '../logging';
|
||||
|
||||
|
||||
function getPrompt(mdContent: string, allKnowledge: KnowledgeItem[], schema: Schemas): PromptPair {
|
||||
@ -22,6 +22,7 @@ Your task is to revise the provided markdown content (written by your junior int
|
||||
- Write section headers as single phrases without colons (##, ###) to organize long content. Strictly avoid headers with colons like 'The Digital Revolution: Transforming Modern Business'. Instead use 'Digital Transformation in Business'.
|
||||
- Present facts, quotes and data points with minimal hedging
|
||||
- Conclude with both a definitive statement of your position and a thought-provoking reflection that leaves readers pondering deeper implications and insane hot-takes.
|
||||
- Remove all disclaimer and copyright notices at the end of the content.
|
||||
</structure>
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user