This commit is contained in:
parent
74882e37f8
commit
dc9f4e33dd
21
test/llm.ts
21
test/llm.ts
@ -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)
|
@ -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",
|
||||
},
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user