mirror of
https://github.com/katanemo/plano.git
synced 2026-06-20 15:28:07 +02:00
fixed docs and added ollama as a first-class LLM provider
This commit is contained in:
parent
8d0b468345
commit
f7c9d04da9
16 changed files with 1612 additions and 149 deletions
|
|
@ -173,6 +173,8 @@ pub enum LlmProviderType {
|
|||
TogetherAI,
|
||||
#[serde(rename = "azure_openai")]
|
||||
AzureOpenAI,
|
||||
#[serde(rename = "ollama")]
|
||||
Ollama,
|
||||
}
|
||||
|
||||
impl Display for LlmProviderType {
|
||||
|
|
@ -188,6 +190,7 @@ impl Display for LlmProviderType {
|
|||
LlmProviderType::XAI => write!(f, "xai"),
|
||||
LlmProviderType::TogetherAI => write!(f, "together_ai"),
|
||||
LlmProviderType::AzureOpenAI => write!(f, "azure_openai"),
|
||||
LlmProviderType::Ollama => write!(f, "ollama"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ pub enum ProviderId {
|
|||
AzureOpenAI,
|
||||
XAI,
|
||||
TogetherAI,
|
||||
Ollama,
|
||||
}
|
||||
|
||||
impl From<&str> for ProviderId {
|
||||
|
|
@ -32,6 +33,7 @@ impl From<&str> for ProviderId {
|
|||
"azure_openai" => ProviderId::AzureOpenAI,
|
||||
"xai" => ProviderId::XAI,
|
||||
"together_ai" => ProviderId::TogetherAI,
|
||||
"ollama" => ProviderId::Ollama,
|
||||
_ => panic!("Unknown provider: {}", value),
|
||||
}
|
||||
}
|
||||
|
|
@ -55,7 +57,8 @@ impl ProviderId {
|
|||
| ProviderId::GitHub
|
||||
| ProviderId::AzureOpenAI
|
||||
| ProviderId::XAI
|
||||
| ProviderId::TogetherAI,
|
||||
| ProviderId::TogetherAI
|
||||
| ProviderId::Ollama,
|
||||
SupportedAPIs::AnthropicMessagesAPI(_)) => SupportedAPIs::OpenAIChatCompletions(OpenAIApi::ChatCompletions),
|
||||
|
||||
(ProviderId::OpenAI
|
||||
|
|
@ -67,7 +70,8 @@ impl ProviderId {
|
|||
| ProviderId::GitHub
|
||||
| ProviderId::AzureOpenAI
|
||||
| ProviderId::XAI
|
||||
| ProviderId::TogetherAI,
|
||||
| ProviderId::TogetherAI
|
||||
| ProviderId::Ollama,
|
||||
SupportedAPIs::OpenAIChatCompletions(_)) => SupportedAPIs::OpenAIChatCompletions(OpenAIApi::ChatCompletions),
|
||||
}
|
||||
}
|
||||
|
|
@ -87,6 +91,7 @@ impl Display for ProviderId {
|
|||
ProviderId::AzureOpenAI => write!(f, "azure_openai"),
|
||||
ProviderId::XAI => write!(f, "xai"),
|
||||
ProviderId::TogetherAI => write!(f, "together_ai"),
|
||||
ProviderId::Ollama => write!(f, "ollama"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue