Skip to content

Commit 26b5788

Browse files
committed
Feature: Enable programmatically pass in api_key besides reading from env
1 parent f55170f commit 26b5788

File tree

2 files changed

+0
-72
lines changed

2 files changed

+0
-72
lines changed

python/cocoindex/llm.py

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -36,48 +36,6 @@ class OpenAiConfig:
3636
project_id: str | None = None
3737

3838

39-
@dataclass
40-
class AnthropicConfig:
41-
"""A specification for an Anthropic LLM."""
42-
43-
kind = "Anthropic"
44-
45-
46-
@dataclass
47-
class GeminiConfig:
48-
"""A specification for a Gemini LLM."""
49-
50-
kind = "Gemini"
51-
52-
53-
@dataclass
54-
class VoyageConfig:
55-
"""A specification for a Voyage LLM."""
56-
57-
kind = "Voyage"
58-
59-
60-
@dataclass
61-
class LiteLlmConfig:
62-
"""A specification for a LiteLLM LLM."""
63-
64-
kind = "LiteLlm"
65-
66-
67-
@dataclass
68-
class OpenRouterConfig:
69-
"""A specification for an OpenRouter LLM."""
70-
71-
kind = "OpenRouter"
72-
73-
74-
@dataclass
75-
class VllmConfig:
76-
"""A specification for a VLLM LLM."""
77-
78-
kind = "Vllm"
79-
80-
8139
@dataclass
8240
class LlmSpec:
8341
"""A specification for a LLM."""
@@ -89,11 +47,5 @@ class LlmSpec:
8947
api_config: (
9048
VertexAiConfig
9149
| OpenAiConfig
92-
| AnthropicConfig
93-
| GeminiConfig
94-
| VoyageConfig
95-
| LiteLlmConfig
96-
| OpenRouterConfig
97-
| VllmConfig
9850
| None
9951
) = None

src/llm/mod.rs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -32,35 +32,11 @@ pub struct OpenAiConfig {
3232
pub project_id: Option<String>,
3333
}
3434

35-
#[derive(Debug, Clone, Serialize, Deserialize)]
36-
pub struct AnthropicConfig {}
37-
38-
#[derive(Debug, Clone, Serialize, Deserialize)]
39-
pub struct GeminiConfig {}
40-
41-
#[derive(Debug, Clone, Serialize, Deserialize)]
42-
pub struct VoyageConfig {}
43-
44-
#[derive(Debug, Clone, Serialize, Deserialize)]
45-
pub struct LiteLlmConfig {}
46-
47-
#[derive(Debug, Clone, Serialize, Deserialize)]
48-
pub struct OpenRouterConfig {}
49-
50-
#[derive(Debug, Clone, Serialize, Deserialize)]
51-
pub struct VllmConfig {}
52-
5335
#[derive(Debug, Clone, Serialize, Deserialize)]
5436
#[serde(tag = "kind")]
5537
pub enum LlmApiConfig {
5638
VertexAi(VertexAiConfig),
5739
OpenAi(OpenAiConfig),
58-
Anthropic(AnthropicConfig),
59-
Gemini(GeminiConfig),
60-
Voyage(VoyageConfig),
61-
LiteLlm(LiteLlmConfig),
62-
OpenRouter(OpenRouterConfig),
63-
Vllm(VllmConfig),
6440
}
6541

6642
#[derive(Debug, Clone, Serialize, Deserialize)]

0 commit comments

Comments
 (0)