mirror of
https://github.com/katanemo/plano.git
synced 2026-07-05 15:52:12 +02:00
cleaned up logs and fixed issue with connectivity for llm gateway in weather forecast demo
This commit is contained in:
parent
04208e9cd1
commit
2895a07088
3 changed files with 26 additions and 19 deletions
|
|
@ -22,6 +22,7 @@
|
|||
//! ```
|
||||
|
||||
use crate::{apis::{AnthropicApi, ApiDefinition, OpenAIApi}, ProviderId};
|
||||
use std::fmt;
|
||||
|
||||
/// Unified enum representing all supported API endpoints across providers
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
|
|
@ -30,6 +31,15 @@ pub enum SupportedAPIs {
|
|||
AnthropicMessagesAPI(AnthropicApi),
|
||||
}
|
||||
|
||||
impl fmt::Display for SupportedAPIs {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
match self {
|
||||
SupportedAPIs::OpenAIChatCompletions(api) => write!(f, "OpenAI API ({})", api.endpoint()),
|
||||
SupportedAPIs::AnthropicMessagesAPI(api) => write!(f, "Anthropic API ({})", api.endpoint()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl SupportedAPIs {
|
||||
/// Create a SupportedApi from an endpoint path
|
||||
pub fn from_endpoint(endpoint: &str) -> Option<Self> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue