coo7 commited on
Commit
dac1960
·
verified ·
1 Parent(s): d5d8dc5

Update internal/types/monica.go

Browse files
Files changed (1) hide show
  1. internal/types/monica.go +7 -7
internal/types/monica.go CHANGED
@@ -2,7 +2,7 @@ package types
2
 
3
  import (
4
  "context"
5
- "encoding/json"
6
  "fmt"
7
  "log"
8
  "strings"
@@ -64,7 +64,7 @@ type MessageContent struct {
64
  }
65
 
66
  // MonicaRequest 为 Monica 自定义 AI 的请求格式
67
- // 注意:以下字段仅示例。真正要与 Monica 对接时,请根据其 API 要求调整字段。
68
  type MonicaRequest struct {
69
  TaskUID string `json:"task_uid"`
70
  BotUID string `json:"bot_uid"`
@@ -324,11 +324,11 @@ func ChatGPTToMonica(chatReq openai.ChatCompletionRequest) (*MonicaRequest, erro
324
  TaskType: "chat",
325
  }
326
 
327
- indent, err := json.MarshalIndent(mReq, "", " ")
328
- if err != nil {
329
- return nil, err
330
- }
331
- log.Printf("send: \n%s\n", indent)
332
 
333
  return mReq, nil
334
  }
 
2
 
3
  import (
4
  "context"
5
+
6
  "fmt"
7
  "log"
8
  "strings"
 
64
  }
65
 
66
  // MonicaRequest 为 Monica 自定义 AI 的请求格式
67
+
68
  type MonicaRequest struct {
69
  TaskUID string `json:"task_uid"`
70
  BotUID string `json:"bot_uid"`
 
324
  TaskType: "chat",
325
  }
326
 
327
+ // indent, err := json.MarshalIndent(mReq, "", " ")
328
+ // if err != nil {
329
+ // return nil, err
330
+ // }
331
+ // log.Printf("send: \n%s\n", indent)
332
 
333
  return mReq, nil
334
  }