Skip to content

Commit 1f8940a

Browse files
committed
feat: no openai key
1 parent 9a3d5c5 commit 1f8940a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

libraries/nestjs-libraries/src/agent/agent.graph.insert.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { agentTopics } from '@gitroom/nestjs-libraries/agent/agent.topics';
99
import { PostsService } from '@gitroom/nestjs-libraries/database/prisma/posts/posts.service';
1010

1111
const model = new ChatOpenAI({
12-
apiKey: process.env.OPENAI_API_KEY,
12+
apiKey: process.env.OPENAI_API_KEY || 'sk-proj-',
1313
model: 'gpt-4o-2024-08-06',
1414
temperature: 0,
1515
});

libraries/nestjs-libraries/src/agent/agent.graph.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ const tools = !process.env.TAVILY_API_KEY ? [] : [new TavilySearchResults({ maxR
2020
const toolNode = new ToolNode(tools);
2121

2222
const model = new ChatOpenAI({
23-
apiKey: process.env.OPENAI_API_KEY,
23+
apiKey: process.env.OPENAI_API_KEY || 'sk-proj-',
2424
model: 'gpt-4o-2024-08-06',
2525
temperature: 0.7,
2626
});
2727

2828
const dalle = new DallEAPIWrapper({
29-
apiKey: process.env.OPENAI_API_KEY,
29+
apiKey: process.env.OPENAI_API_KEY || 'sk-proj-',
3030
model: 'dall-e-3',
3131
});
3232

0 commit comments

Comments
 (0)