diff --git a/libraries/nestjs-libraries/src/agent/agent.graph.insert.service.ts b/libraries/nestjs-libraries/src/agent/agent.graph.insert.service.ts index a92757658..9d9f46393 100644 --- a/libraries/nestjs-libraries/src/agent/agent.graph.insert.service.ts +++ b/libraries/nestjs-libraries/src/agent/agent.graph.insert.service.ts @@ -9,7 +9,7 @@ import { agentTopics } from '@gitroom/nestjs-libraries/agent/agent.topics'; import { PostsService } from '@gitroom/nestjs-libraries/database/prisma/posts/posts.service'; const model = new ChatOpenAI({ - apiKey: process.env.OPENAI_API_KEY, + apiKey: process.env.OPENAI_API_KEY || 'sk-proj-', model: 'gpt-4o-2024-08-06', temperature: 0, }); diff --git a/libraries/nestjs-libraries/src/agent/agent.graph.service.ts b/libraries/nestjs-libraries/src/agent/agent.graph.service.ts index fb5195ffd..f6ae8013a 100644 --- a/libraries/nestjs-libraries/src/agent/agent.graph.service.ts +++ b/libraries/nestjs-libraries/src/agent/agent.graph.service.ts @@ -20,13 +20,13 @@ const tools = !process.env.TAVILY_API_KEY ? [] : [new TavilySearchResults({ maxR const toolNode = new ToolNode(tools); const model = new ChatOpenAI({ - apiKey: process.env.OPENAI_API_KEY, + apiKey: process.env.OPENAI_API_KEY || 'sk-proj-', model: 'gpt-4o-2024-08-06', temperature: 0.7, }); const dalle = new DallEAPIWrapper({ - apiKey: process.env.OPENAI_API_KEY, + apiKey: process.env.OPENAI_API_KEY || 'sk-proj-', model: 'dall-e-3', });