Skip to content

Commit

Permalink
add LLM env (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
guo authored Jan 28, 2025
1 parent 0c1663d commit aff4d54
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
6 changes: 4 additions & 2 deletions .env.template
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ DEEPSEEK_API_KEY=your_deepseek_api_key
ANTHROPIC_API_KEY=your_anthropic_api_key
OPENAI_API_KEY=your_openai_api_key

FAST_LLM_MODEL=gpt-4o-mini
LLM_MODEL=deepseek-chat
FAST_LLM_PROVIDER=
FAST_LLM_MODEL=
LLM_PROVIDER=
LLM_MODEL=

API_V2_KEY=your_api_v2_key # for iotex l1 data
7 changes: 5 additions & 2 deletions src/SentientAI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ export class SentientAI {
orchestrator: QueryOrchestrator;

constructor() {
if (!process.env.FAST_LLM_PROVIDER || !process.env.LLM_PROVIDER) {
throw new Error("FAST_LLM_PROVIDER and LLM_PROVIDER must be set");

Check failure on line 13 in src/SentientAI.ts

View workflow job for this annotation

GitHub Actions / test

src/__tests__/SentientAI.test.ts > SentientAI > should return a response

Error: FAST_LLM_PROVIDER and LLM_PROVIDER must be set ❯ new SentientAI src/SentientAI.ts:13:13 ❯ src/__tests__/SentientAI.test.ts:43:20
}
this.orchestrator = new QueryOrchestrator({
tools: [
new NewsAPITool(),
Expand All @@ -19,8 +22,8 @@ export class SentientAI {
new L1DataTool(),
],
llmService: new LLMService({
fastLLMProvider: "openai",
llmProvider: "deepseek",
fastLLMProvider: process.env.FAST_LLM_PROVIDER,
llmProvider: process.env.LLM_PROVIDER,
}),
});
}
Expand Down

0 comments on commit aff4d54

Please sign in to comment.