From afa8ef7a635fadc570ce945114563c410265a4dd Mon Sep 17 00:00:00 2001 From: cotran Date: Wed, 23 Oct 2024 17:15:37 -0700 Subject: [PATCH] fix --- crates/common/src/consts.rs | 1 + crates/prompt_gateway/src/hallucination.rs | 10 ++++++---- crates/prompt_gateway/src/stream_context.rs | 7 +++---- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/crates/common/src/consts.rs b/crates/common/src/consts.rs index 8f59e981..533b8a69 100644 --- a/crates/common/src/consts.rs +++ b/crates/common/src/consts.rs @@ -25,3 +25,4 @@ 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 I’m missing some information. Could you provide the following details"; diff --git a/crates/prompt_gateway/src/hallucination.rs b/crates/prompt_gateway/src/hallucination.rs index 62b119ac..c4425957 100644 --- a/crates/prompt_gateway/src/hallucination.rs +++ b/crates/prompt_gateway/src/hallucination.rs @@ -1,6 +1,6 @@ use common::{ common_types::open_ai::Message, - consts::{ARCH_MODEL_PREFIX, ASSISTANT_ROLE, USER_ROLE}, + consts::{ARCH_MODEL_PREFIX, USER_ROLE, HALLUCINATION_TEMPLATE}, }; pub fn extract_messages_for_hallucination(messages: &Vec) -> Vec { @@ -18,9 +18,11 @@ pub fn extract_messages_for_hallucination(messages: &Vec) -> Vec