22 lines
424 B
TypeScript
22 lines
424 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)
|