feat: allow users to configure openai host (#1283)
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
"name": "OpenAI",
|
||||
"description": "Use GPT-4 and other OpenAI models",
|
||||
"models": ["gpt-4o", "gpt-4-turbo","o1"],
|
||||
"required_keys": ["OPENAI_API_KEY"]
|
||||
"required_keys": ["OPENAI_API_KEY", "OPENAI_HOST"]
|
||||
},
|
||||
"anthropic": {
|
||||
"name": "Anthropic",
|
||||
|
||||
@@ -98,7 +98,7 @@ impl Provider for OpenAiProvider {
|
||||
ProviderMetadata::new(
|
||||
"openai",
|
||||
"OpenAI",
|
||||
"GPT-4 and other OpenAI models",
|
||||
"GPT-4 and other OpenAI models, including OpenAI compatible ones",
|
||||
OPEN_AI_DEFAULT_MODEL,
|
||||
OPEN_AI_KNOWN_MODELS
|
||||
.iter()
|
||||
@@ -107,7 +107,7 @@ impl Provider for OpenAiProvider {
|
||||
OPEN_AI_DOC_URL,
|
||||
vec![
|
||||
ConfigKey::new("OPENAI_API_KEY", true, true, None),
|
||||
ConfigKey::new("OPENAI_HOST", false, false, Some("https://api.openai.com")),
|
||||
ConfigKey::new("OPENAI_HOST", true, false, Some("https://api.openai.com")),
|
||||
ConfigKey::new("OPENAI_ORGANIZATION", false, false, None),
|
||||
ConfigKey::new("OPENAI_PROJECT", false, false, None),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user