This commit is contained in:
Adil Hafeez 2024-10-24 17:45:04 -07:00
parent 8e098fb5c0
commit 6eceabf43e
10 changed files with 204 additions and 152 deletions

View file

@ -269,6 +269,9 @@ pub mod open_ai {
.events
.iter()
.map(|response_chunk| {
if response_chunk.choices.is_empty() {
return "".to_string();
}
response_chunk.choices[0]
.delta
.content

View file

@ -25,4 +25,5 @@ pub const ARCH_INTERNAL_CLUSTER_NAME: &str = "arch_internal";
pub const ARCH_UPSTREAM_HOST_HEADER: &str = "x-arch-upstream";
pub const ARCH_LLM_UPSTREAM_LISTENER: &str = "arch_llm_listener";
pub const ARCH_MODEL_PREFIX: &str = "Arch";
pub const HALLUCINATION_TEMPLATE: &str = "It seems Im missing some information. Could you provide the following details ";
pub const HALLUCINATION_TEMPLATE: &str =
"It seems Im missing some information. Could you provide the following details ";