Update internal/types/monica.go
Browse files- internal/types/monica.go +7 -7
internal/types/monica.go
CHANGED
@@ -2,7 +2,7 @@ package types
|
|
2 |
|
3 |
import (
|
4 |
"context"
|
5 |
-
|
6 |
"fmt"
|
7 |
"log"
|
8 |
"strings"
|
@@ -64,7 +64,7 @@ type MessageContent struct {
|
|
64 |
}
|
65 |
|
66 |
// MonicaRequest 为 Monica 自定义 AI 的请求格式
|
67 |
-
|
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 |
-
|
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 |
}
|