wip
This commit is contained in:
parent
8e8484f875
commit
4fb1550e7d
8 changed files with 2412 additions and 4 deletions
|
|
@ -1 +1,2 @@
|
|||
export const BATCH_CONFIG = { size: 4, maxRetries: 3 } as const;
|
||||
// Runtime-populated by pipeline.ts after CLI initialization
|
||||
export const BATCH_CONFIG = { size: 4, maxRetries: 3 };
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
import type { OnlineProvider } from "./providers.js";
|
||||
|
||||
export type LlmProvider = "local" | OnlineProvider;
|
||||
|
||||
// Runtime-populated by pipeline.ts after CLI initialization
|
||||
export const LLM_CONFIG = {
|
||||
provider: "local" as "local" | "openrouter" | "deepseek" | "gemini",
|
||||
provider: "local" as LlmProvider,
|
||||
url: "http://127.0.0.1:8080/v1/chat/completions",
|
||||
model: undefined as string | undefined,
|
||||
} as const;
|
||||
};
|
||||
|
|
|
|||
58
data-pipeline/config/providers.ts
Normal file
58
data-pipeline/config/providers.ts
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
export type ProviderMeta = {
|
||||
name: string;
|
||||
envVar: string;
|
||||
url: string;
|
||||
requiresKey: boolean;
|
||||
models: string[];
|
||||
};
|
||||
|
||||
// 1. Explicitly define the literal union
|
||||
export type OnlineProvider = "gemini" | "deepseek" | "openrouter" | "groq";
|
||||
|
||||
// 2. Use the union to type the Record
|
||||
export const ONLINE_PROVIDERS: Record<OnlineProvider, ProviderMeta> = {
|
||||
gemini: {
|
||||
name: "Gemini",
|
||||
envVar: "GEMINI_API_KEY",
|
||||
url: "https://generativelanguage.googleapis.com/v1beta",
|
||||
requiresKey: true,
|
||||
models: ["gemini-2.5-flash", "gemini-2.5-pro"],
|
||||
},
|
||||
deepseek: {
|
||||
name: "DeepSeek",
|
||||
envVar: "DEEPSEEK_API_KEY",
|
||||
url: "https://api.deepseek.com/v1/chat/completions",
|
||||
requiresKey: true,
|
||||
models: ["deepseek-chat", "deepseek-reasoner"],
|
||||
},
|
||||
openrouter: {
|
||||
name: "OpenRouter",
|
||||
envVar: "OPENROUTER_API_KEY",
|
||||
url: "https://openrouter.ai/api/v1/chat/completions",
|
||||
requiresKey: true,
|
||||
models: [
|
||||
"openai/gpt-oss-120b:free",
|
||||
"google/gemma-4-31b-it:free",
|
||||
"qwen/qwen3-next-80b-a3b-instruct:free",
|
||||
"meta-llama/llama-3.3-70b-instruct:free",
|
||||
"anthropic/claude-sonnet-4",
|
||||
"google/gemini-2.5-flash",
|
||||
"deepseek/deepseek-chat-v3",
|
||||
],
|
||||
},
|
||||
groq: {
|
||||
name: "Groq",
|
||||
envVar: "GROQ_API_KEY",
|
||||
url: "https://api.groq.com/openai/v1/chat/completions",
|
||||
requiresKey: true,
|
||||
models: ["llama-3.3-70b-versatile", "gemma2-9b-it", "mixtral-8x7b-32768"],
|
||||
},
|
||||
};
|
||||
|
||||
export const LOCAL_PROVIDER: ProviderMeta = {
|
||||
name: "Local (llama.cpp / ollama / lm-studio)",
|
||||
envVar: "",
|
||||
url: "http://127.0.0.1:8080/v1/chat/completions",
|
||||
requiresKey: false,
|
||||
models: [],
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue