fix: 模型调用错误
All checks were successful
Egg Server MIflow / build-image (push) Successful in 45s

This commit is contained in:
zhaoyingbo 2024-09-27 02:32:50 +00:00
parent 74882e37f8
commit dc9f4e33dd
2 changed files with 22 additions and 1 deletions

View File

@ -0,0 +1,21 @@
import llm from "../utils/llm"
const chatHistory = [
{
user: "user",
text: "你好",
time: "2022-01-01 00:00:00",
},
{
user: "bot",
text: "你好",
time: "2022-01-01 00:00:01",
},
]
const res = await llm.invoke("summary-gpt-4o", {
chatHistory: JSON.stringify(chatHistory),
time: new Date().toLocaleString("zh-CN", { timeZone: "Asia/Shanghai" }),
})
console.log(res)

View File

@ -35,7 +35,7 @@ const modelMap = {
"gpt-4o": {
model: "gpt-4o",
apiKey: "sk-EhbBTR0QjhH22iLr9aCb04D2B0F44f88A07c2924Eb54CfA4",
baseURL: "https://api.gpt.ge",
baseURL: "https://api.gpt.ge/v1",
},
}