mirror of
https://github.com/dzhng/deep-research.git
synced 2026-03-22 07:57:16 +08:00
prettier
This commit is contained in:
@@ -14,15 +14,19 @@ const openai = createOpenAI({
|
||||
} as CustomOpenAIProviderSettings);
|
||||
|
||||
const isCustomEndpoint =
|
||||
process.env.OPENAI_ENDPOINT && process.env.OPENAI_ENDPOINT !== 'https://api.openai.com/v1';
|
||||
process.env.OPENAI_ENDPOINT &&
|
||||
process.env.OPENAI_ENDPOINT !== 'https://api.openai.com/v1';
|
||||
const customModel = process.env.OPENAI_MODEL;
|
||||
|
||||
// Models
|
||||
|
||||
export const o3MiniModel = openai(isCustomEndpoint && customModel ? customModel : 'o3-mini', {
|
||||
reasoningEffort: 'medium',
|
||||
structuredOutputs: true,
|
||||
});
|
||||
export const o3MiniModel = openai(
|
||||
isCustomEndpoint && customModel ? customModel : 'o3-mini',
|
||||
{
|
||||
reasoningEffort: 'medium',
|
||||
structuredOutputs: true,
|
||||
},
|
||||
);
|
||||
|
||||
const MinChunkSize = 140;
|
||||
const encoder = getEncoding('o200k_base');
|
||||
|
||||
16
src/run.ts
16
src/run.ts
@@ -25,9 +25,17 @@ async function run() {
|
||||
|
||||
// Get breath and depth parameters
|
||||
const breadth =
|
||||
parseInt(await askQuestion('Enter research breadth (recommended 2-10, default 4): '), 10) || 4;
|
||||
parseInt(
|
||||
await askQuestion(
|
||||
'Enter research breadth (recommended 2-10, default 4): ',
|
||||
),
|
||||
10,
|
||||
) || 4;
|
||||
const depth =
|
||||
parseInt(await askQuestion('Enter research depth (recommended 1-5, default 2): '), 10) || 2;
|
||||
parseInt(
|
||||
await askQuestion('Enter research depth (recommended 1-5, default 2): '),
|
||||
10,
|
||||
) || 2;
|
||||
|
||||
console.log(`Creating research plan...`);
|
||||
|
||||
@@ -63,7 +71,9 @@ ${followUpQuestions.map((q, i) => `Q: ${q}\nA: ${answers[i]}`).join('\n')}
|
||||
});
|
||||
|
||||
console.log(`\n\nLearnings:\n\n${learnings.join('\n')}`);
|
||||
console.log(`\n\nVisited URLs (${visitedUrls.length}):\n\n${visitedUrls.join('\n')}`);
|
||||
console.log(
|
||||
`\n\nVisited URLs (${visitedUrls.length}):\n\n${visitedUrls.join('\n')}`,
|
||||
);
|
||||
console.log('Writing final report...');
|
||||
|
||||
const report = await writeFinalReport({
|
||||
|
||||
Reference in New Issue
Block a user