mirror of
https://github.com/dzhng/deep-research.git
synced 2026-03-22 07:57:16 +08:00
simplified using other oai models
This commit is contained in:
@@ -13,20 +13,14 @@ const openai = createOpenAI({
|
|||||||
baseURL: process.env.OPENAI_ENDPOINT || 'https://api.openai.com/v1',
|
baseURL: process.env.OPENAI_ENDPOINT || 'https://api.openai.com/v1',
|
||||||
} as CustomOpenAIProviderSettings);
|
} as CustomOpenAIProviderSettings);
|
||||||
|
|
||||||
const isCustomEndpoint =
|
const customModel = process.env.OPENAI_MODEL || 'o3-mini';
|
||||||
process.env.OPENAI_ENDPOINT &&
|
|
||||||
process.env.OPENAI_ENDPOINT !== 'https://api.openai.com/v1';
|
|
||||||
const customModel = process.env.OPENAI_MODEL;
|
|
||||||
|
|
||||||
// Models
|
// Models
|
||||||
|
|
||||||
export const o3MiniModel = openai(
|
export const o3MiniModel = openai(customModel, {
|
||||||
isCustomEndpoint && customModel ? customModel : 'o3-mini',
|
reasoningEffort: customModel.startsWith('o') ? 'medium' : undefined,
|
||||||
{
|
structuredOutputs: true,
|
||||||
reasoningEffort: 'medium',
|
});
|
||||||
structuredOutputs: true,
|
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|
||||||
const MinChunkSize = 140;
|
const MinChunkSize = 140;
|
||||||
const encoder = getEncoding('o200k_base');
|
const encoder = getEncoding('o200k_base');
|
||||||
|
|||||||
Reference in New Issue
Block a user