clarified choices type in CompletionsResponse to the correct api standard of being an array of choices
This commit is contained in:
@@ -15,8 +15,8 @@ export type message = {
|
|||||||
name: string
|
name: string
|
||||||
},
|
},
|
||||||
id: string,
|
id: string,
|
||||||
index: number?,
|
index: number?, -- according to x.ai's documentation, this is 'integer | null' so i guess it can for some reason not exist?
|
||||||
type: 'function'
|
type: 'function'?
|
||||||
}
|
}
|
||||||
}?
|
}?
|
||||||
}
|
}
|
||||||
@@ -26,7 +26,7 @@ export type CompletionsResponse = {
|
|||||||
object: 'chat.completion',
|
object: 'chat.completion',
|
||||||
created: number,
|
created: number,
|
||||||
model: string,
|
model: string,
|
||||||
choices: {
|
choices: { {
|
||||||
index: number,
|
index: number,
|
||||||
message: message,
|
message: message,
|
||||||
finish_reason: "stop" | "length" | "function_call" | "content_filter" | "null",
|
finish_reason: "stop" | "length" | "function_call" | "content_filter" | "null",
|
||||||
@@ -48,7 +48,7 @@ export type CompletionsResponse = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}?
|
}?
|
||||||
},
|
} },
|
||||||
citations: { string }?,
|
citations: { string }?,
|
||||||
system_fingerprint: string?,
|
system_fingerprint: string?,
|
||||||
usage: {
|
usage: {
|
||||||
|
|||||||
Reference in New Issue
Block a user