refactor: 简化会话创建请求结构

移除会话策略和代理配置相关字段,仅保留标题和描述。会话现在作为独立的对话容器,配置由自定义代理在查询时动态提供。
This commit is contained in:
wizardchen
2025-12-31 14:19:10 +08:00
committed by lyingbug
parent d954ba22af
commit c5228acbab
4 changed files with 21 additions and 116 deletions
+2 -19
View File
@@ -111,25 +111,8 @@ func ExampleUsage() {
// 4. Create a session
fmt.Println("\n4. Creating session...")
sessionRequest := &CreateSessionRequest{
KnowledgeBaseID: createdKB.ID,
SessionStrategy: &SessionStrategy{
MaxRounds: 10,
EnableRewrite: true,
FallbackStrategy: "fixed_answer",
FallbackResponse: "Sorry, I cannot answer this question",
EmbeddingTopK: 5,
KeywordThreshold: 0.5,
VectorThreshold: 0.7,
RerankModelID: "rerank_model_id",
RerankTopK: 3,
RerankThreshold: 0.8,
SummaryModelID: "summary_model_id",
SummaryParameters: &SummaryConfig{
Temperature: 0.7,
TopP: 0.9,
MaxTokens: 100,
},
},
Title: "Test Session",
Description: "A test session for knowledge Q&A",
}
session, err := apiClient.CreateSession(context.Background(), sessionRequest)