fix: chat message format
This commit is contained in:
parent
c961a85add
commit
35b81f7ba0
1 changed files with 2 additions and 3 deletions
5
index.ts
5
index.ts
|
|
@ -846,8 +846,7 @@ async function chat(text: string, files: PromptFiles = []) {
|
|||
const agent = await resolveAgent()
|
||||
|
||||
const body: Record<string, unknown> = {
|
||||
providerID,
|
||||
modelID,
|
||||
model: { providerID, modelID },
|
||||
...(agent ? { agent } : {}),
|
||||
parts: [
|
||||
{
|
||||
|
|
@ -874,7 +873,7 @@ async function chat(text: string, files: PromptFiles = []) {
|
|||
],
|
||||
}
|
||||
|
||||
const chatRes = await fetch(`${SERVER_URL}/session/${session.id}/chat`, {
|
||||
const chatRes = await fetch(`${SERVER_URL}/session/${session.id}/message`, {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify(body),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue