fix: 优化markdown解析器
This commit is contained in:
parent
cd7e9b351d
commit
26518569f4
|
|
@ -958,8 +958,13 @@ impl GeminiService {
|
|||
let start_time = std::time::Instant::now();
|
||||
println!("🔍 开始RAG Grounding查询: {}", request.user_input);
|
||||
|
||||
// 获取配置
|
||||
let rag_config = request.config.unwrap_or_default();
|
||||
// 获取配置,确保 system_prompt 不会被覆盖
|
||||
let mut rag_config = request.config.unwrap_or_default();
|
||||
|
||||
// 如果请求的配置没有 system_prompt,使用默认配置的 system_prompt
|
||||
if rag_config.system_prompt.is_none() {
|
||||
rag_config.system_prompt = RagGroundingConfig::default().system_prompt;
|
||||
}
|
||||
|
||||
// 获取访问令牌
|
||||
let access_token = self.get_access_token().await?;
|
||||
|
|
@ -1054,8 +1059,13 @@ impl GeminiService {
|
|||
let start_time = std::time::Instant::now();
|
||||
println!("🔍 开始多轮RAG Grounding查询: {}", request.user_input);
|
||||
|
||||
// 获取配置
|
||||
let rag_config = request.config.unwrap_or_default();
|
||||
// 获取配置,确保 system_prompt 不会被覆盖
|
||||
let mut rag_config = request.config.unwrap_or_default();
|
||||
|
||||
// 如果请求的配置没有 system_prompt,使用默认配置的 system_prompt
|
||||
if rag_config.system_prompt.is_none() {
|
||||
rag_config.system_prompt = RagGroundingConfig::default().system_prompt;
|
||||
}
|
||||
|
||||
// 1. 确定或创建会话
|
||||
let session_id = match &request.session_id {
|
||||
|
|
|
|||
|
|
@ -118,6 +118,7 @@ export const DEFAULT_RAG_GROUNDING_CONFIG: RagGroundingConfig = {
|
|||
model_id: "gemini-2.5-flash",
|
||||
temperature: 1.0,
|
||||
max_output_tokens: 8192,
|
||||
system_prompt: "你是一个短视频情景穿搭分析专家, 根据用户预想的情景输出符合逻辑的情景和模特穿搭描述,必须依据已知的数据返回可能的方案, 并且给出参照的依据;如果没有匹配的数据支持,返回空结果;",
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue