egg_server/test/llm.ts
zhaoyingbo e98a93c943
All checks were successful
Egg Server CI/CD / build-image (push) Successful in 46s
Egg Server CI/CD / refresh-image (push) Successful in 18s
Egg Server CI/CD / fast-deploy (push) Successful in 2s
feat(model): 切换至小米内部模型
2024-10-14 08:47:44 +00:00

22 lines
421 B
TypeScript

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-qwen-72b-instruct-int4", {
chatHistory: JSON.stringify(chatHistory),
time: new Date().toLocaleString("zh-CN", { timeZone: "Asia/Shanghai" }),
})
console.log(res)