Declare known stopReasons, as a kind of documentation
This commit is contained in:
parent
099c2e2be3
commit
f7f0ccff0e
1 changed files with 1 additions and 1 deletions
|
|
@ -868,7 +868,7 @@ export const CreateMessageResultSchema = ResultSchema.extend({
|
|||
/**
|
||||
* The reason why sampling stopped.
|
||||
*/
|
||||
stopReason: z.optional(z.string()),
|
||||
stopReason: z.optional(z.enum(["endTurn", "stopSequence", "maxTokens"]).or(z.string())),
|
||||
role: z.enum(["user", "assistant"]),
|
||||
content: z.discriminatedUnion("type", [
|
||||
TextContentSchema,
|
||||
|
|
|
|||
Loading…
Reference in a new issue