feat: configure deep search llm models
This commit is contained in:
+11
-2
@@ -1,7 +1,10 @@
|
||||
import http from 'node:http';
|
||||
import path from 'node:path';
|
||||
import { pathToFileURL } from 'node:url';
|
||||
import { createDeepSearchEngine } from './deep-search-engine.mjs';
|
||||
import {
|
||||
createDeepSearchEngine,
|
||||
createPortalGatewayResearchLlmResolver,
|
||||
} from './deep-search-engine.mjs';
|
||||
import { createDeepSearchStore } from './deep-search-store.mjs';
|
||||
|
||||
function sendJson(res, status, body) {
|
||||
@@ -83,6 +86,8 @@ export function createDeepSearchHttpServer({
|
||||
const task = engine.start({
|
||||
...input,
|
||||
userId: requestUserId || input.userId || null,
|
||||
llmProviderKeyId: input.llmProviderKeyId || input.llm_provider_key_id || '',
|
||||
llmModel: input.llmModel || input.llm_model || '',
|
||||
});
|
||||
return sendJson(res, 202, {
|
||||
task_id: task.taskId,
|
||||
@@ -163,7 +168,11 @@ export function startDeepSearchServer({
|
||||
logger = console,
|
||||
} = {}) {
|
||||
const store = createDeepSearchStore({ databasePath });
|
||||
const engine = createDeepSearchEngine({ store });
|
||||
const engine = createDeepSearchEngine({
|
||||
store,
|
||||
llm: null,
|
||||
llmResolver: createPortalGatewayResearchLlmResolver(),
|
||||
});
|
||||
const server = createDeepSearchHttpServer({ engine, logger });
|
||||
server.listen(port, host, () => {
|
||||
logger.info?.(`[deep-search] listening on http://${host}:${port}`);
|
||||
|
||||
Reference in New Issue
Block a user