Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderMap = map[string]ProviderConfig{
"Mistral": {
Name: "Mistral",
BaseURL: "https://api.mistral.ai/v1",
},
"LiteLLM": {
Name: "LiteLLM",
BaseURL: "http://localhost:4000",
},
"Groq": {
Name: "Groq",
BaseURL: "https://api.groq.com/openai/v1",
},
"GrokAI": {
Name: "GrokAI",
BaseURL: "https://api.x.ai/v1",
},
"DeepSeek": {
Name: "DeepSeek",
BaseURL: "https://api.deepseek.com",
},
"Cerebras": {
Name: "Cerebras",
BaseURL: "https://api.cerebras.ai/v1",
},
"OpenRouter": {
Name: "OpenRouter",
BaseURL: "https://openrouter.ai/api/v1",
},
"SiliconCloud": {
Name: "SiliconCloud",
BaseURL: "https://api.siliconflow.cn/v1",
},
}
ProviderMap is a map of provider name to ProviderConfig for O(1) lookup
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client is the common structure for all OpenAI-compatible providers
func CreateClient ¶
CreateClient creates a new client for a provider by name
func NewClient ¶
func NewClient(providerConfig ProviderConfig) *Client
NewClient creates a new OpenAI-compatible client for the specified provider
type ProviderConfig ¶
ProviderConfig defines the configuration for an OpenAI-compatible API provider
func GetProviderByName ¶
func GetProviderByName(name string) (ProviderConfig, bool)
GetProviderByName returns the provider configuration for a given name with O(1) lookup
Click to show internal directories.
Click to hide internal directories.