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
|
||||
},
|
||||
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: {
|
||||
|
||||
Reference in New Issue
Block a user