clarified choices type in CompletionsResponse to the correct api standard of being an array of choices

This commit is contained in:
2025-10-05 23:28:16 -06:00
parent eb098ce266
commit 25b57dbd07

View File

@@ -15,8 +15,8 @@ export type message = {
name: string
},
id: string,
index: number?,
type: 'function'
index: number?, -- according to x.ai's documentation, this is 'integer | null' so i guess it can for some reason not exist?
type: 'function'?
}
}?
}
@@ -26,7 +26,7 @@ export type CompletionsResponse = {
object: 'chat.completion',
created: number,
model: string,
choices: {
choices: { {
index: number,
message: message,
finish_reason: "stop" | "length" | "function_call" | "content_filter" | "null",
@@ -48,7 +48,7 @@ export type CompletionsResponse = {
}
}
}?
},
} },
citations: { string }?,
system_fingerprint: string?,
usage: {