mirror of
https://github.com/katanemo/plano.git
synced 2026-06-17 15:25:17 +02:00
initial commit
This commit is contained in:
parent
1f95fac4af
commit
1d19f0c2f7
36 changed files with 3003 additions and 109 deletions
|
|
@ -166,6 +166,7 @@ pub struct LlmProvider {
|
|||
pub endpoint: Option<String>,
|
||||
pub port: Option<u16>,
|
||||
pub rate_limits: Option<LlmRatelimit>,
|
||||
pub usage: Option<String>,
|
||||
}
|
||||
|
||||
impl Display for LlmProvider {
|
||||
|
|
|
|||
|
|
@ -27,3 +27,4 @@ pub const HALLUCINATION_TEMPLATE: &str =
|
|||
"It seems I'm missing some information. Could you provide the following details ";
|
||||
pub const OTEL_COLLECTOR_HTTP: &str = "opentelemetry_collector_http";
|
||||
pub const OTEL_POST_PATH: &str = "/v1/traces";
|
||||
pub const LLM_ROUTE_HEADER: &str = "x-arch-llm-route";
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ use std::rc::Rc;
|
|||
|
||||
use crate::{configuration, llm_providers::LlmProviders};
|
||||
use configuration::LlmProvider;
|
||||
use log::info;
|
||||
use rand::{seq::IteratorRandom, thread_rng};
|
||||
|
||||
#[derive(Debug)]
|
||||
|
|
@ -29,6 +30,8 @@ pub fn get_llm_provider(
|
|||
ProviderHint::Name(name) => llm_providers.get(&name),
|
||||
});
|
||||
|
||||
info!("selected provider: maybe_provider: {:?}", maybe_provider);
|
||||
|
||||
if let Some(provider) = maybe_provider {
|
||||
return provider;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue