BOHE commited on
Commit
4e1ac28
·
1 Parent(s): 3683948
Files changed (1) hide show
  1. api/main.go +3 -3
api/main.go CHANGED
@@ -343,7 +343,7 @@ func Handler(w http.ResponseWriter, r *http.Request) {
343
  q.Add("queryTraceId", chatId)
344
  q.Add("conversationTurnId", conversationTurnId)
345
  q.Add("traceId", traceId)
346
- q.Add("q", openAIReq.Messages[0].Content)
347
  q.Add("page", "1")
348
  q.Add("count", "10")
349
  q.Add("safeSearch", "Moderate")
@@ -351,12 +351,12 @@ func Handler(w http.ResponseWriter, r *http.Request) {
351
  q.Add("enable_worklow_generation_ux", "true")
352
  q.Add("domain", "youchat")
353
  q.Add("use_personalization_extraction", "true")
354
- q.Add("pastChatLength", fmt.Sprintf("%d", len(chatHistory)-1))
355
  q.Add("selectedChatMode", "custom")
356
  q.Add("selectedAiModel", mapModelName(openAIReq.Model))
357
  q.Add("enable_agent_clarification_questions", "true")
358
  q.Add("use_nested_youchat_updates", "true")
359
- q.Add("chat", string(chatHistoryJSON))
360
  youReq.URL.RawQuery = q.Encode()
361
 
362
  fmt.Printf("构建的请求 URL: %s\n", youReq.URL.String())
 
343
  q.Add("queryTraceId", chatId)
344
  q.Add("conversationTurnId", conversationTurnId)
345
  q.Add("traceId", traceId)
346
+ q.Add("q", fmt.Sprintf("Please review the attached file: %s", uploadResp.UserFilename))
347
  q.Add("page", "1")
348
  q.Add("count", "10")
349
  q.Add("safeSearch", "Moderate")
 
351
  q.Add("enable_worklow_generation_ux", "true")
352
  q.Add("domain", "youchat")
353
  q.Add("use_personalization_extraction", "true")
354
+ q.Add("pastChatLength", "0")
355
  q.Add("selectedChatMode", "custom")
356
  q.Add("selectedAiModel", mapModelName(openAIReq.Model))
357
  q.Add("enable_agent_clarification_questions", "true")
358
  q.Add("use_nested_youchat_updates", "true")
359
+ q.Add("chat", "[]") // 设置为空数组
360
  youReq.URL.RawQuery = q.Encode()
361
 
362
  fmt.Printf("构建的请求 URL: %s\n", youReq.URL.String())