mirror of
https://github.com/katanemo/plano.git
synced 2026-04-30 19:36:34 +02:00
refactor prompt gateway (#204)
This commit is contained in:
parent
dced8a5708
commit
2f374df034
9 changed files with 500 additions and 441 deletions
|
|
@ -22,11 +22,12 @@ pub enum ServerError {
|
|||
Serialization(serde_json::Error),
|
||||
#[error("{0}")]
|
||||
LogicError(String),
|
||||
#[error("upstream error response authority={authority}, path={path}, status={status}")]
|
||||
#[error("upstream application error host={host}, path={path}, status={status}, body={body}")]
|
||||
Upstream {
|
||||
authority: String,
|
||||
host: String,
|
||||
path: String,
|
||||
status: String,
|
||||
body: String,
|
||||
},
|
||||
#[error("jailbreak detected: {0}")]
|
||||
Jailbreak(String),
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
use crate::{errors::ClientError, stats::{Gauge, IncrementingMetric}};
|
||||
use crate::{
|
||||
errors::ClientError,
|
||||
stats::{Gauge, IncrementingMetric},
|
||||
};
|
||||
use derivative::Derivative;
|
||||
use log::debug;
|
||||
use proxy_wasm::{traits::Context, types::Status};
|
||||
|
|
|
|||
|
|
@ -4,10 +4,10 @@ pub mod common_types;
|
|||
pub mod configuration;
|
||||
pub mod consts;
|
||||
pub mod embeddings;
|
||||
pub mod errors;
|
||||
pub mod http;
|
||||
pub mod llm_providers;
|
||||
pub mod ratelimit;
|
||||
pub mod routing;
|
||||
pub mod stats;
|
||||
pub mod tokenizer;
|
||||
pub mod errors;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue