Use provider enum

This commit is contained in:
ngoc 2026-01-18 13:27:55 +07:00
parent a8a425d334
commit 0bb2e5b3c6
No known key found for this signature in database
GPG Key ID: 51FE6110113A5C32
1 changed files with 4 additions and 3 deletions

View File

@ -8,6 +8,7 @@ import { existsSync, readFileSync } from "fs";
import { resolve } from "path";
import { makeClient } from "alkahest-ts";
import { fixtures } from "alkahest-ts";
import { ProviderName } from "../../nla";
// Helper function to display usage
function displayHelp() {
@ -186,7 +187,7 @@ async function main() {
// Add all available providers
if (openaiApiKey) {
llmClient.llm.addProvider({
providerName: "OpenAI",
providerName: ProviderName.OpenAI,
apiKey: openaiApiKey,
perplexityApiKey: perplexityApiKey,
});
@ -195,7 +196,7 @@ async function main() {
if (anthropicApiKey) {
llmClient.llm.addProvider({
providerName: "Anthropic",
providerName: ProviderName.Anthropic,
apiKey: anthropicApiKey,
perplexityApiKey: perplexityApiKey,
});
@ -204,7 +205,7 @@ async function main() {
if (openrouterApiKey) {
llmClient.llm.addProvider({
providerName: "OpenRouter",
providerName: ProviderName.OpenRouter,
apiKey: openrouterApiKey,
perplexityApiKey: perplexityApiKey,
});