tweak: add new ContextOverflowError type (#12777)
This commit is contained in:
parent
d40dffb854
commit
99ea1351ce
6 changed files with 349 additions and 125 deletions
|
|
@ -152,6 +152,14 @@ export type MessageAbortedError = {
|
|||
}
|
||||
}
|
||||
|
||||
export type ContextOverflowError = {
|
||||
name: "ContextOverflowError"
|
||||
data: {
|
||||
message: string
|
||||
responseBody?: string
|
||||
}
|
||||
}
|
||||
|
||||
export type ApiError = {
|
||||
name: "APIError"
|
||||
data: {
|
||||
|
|
@ -176,7 +184,13 @@ export type AssistantMessage = {
|
|||
created: number
|
||||
completed?: number
|
||||
}
|
||||
error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError | ApiError
|
||||
error?:
|
||||
| ProviderAuthError
|
||||
| UnknownError
|
||||
| MessageOutputLengthError
|
||||
| MessageAbortedError
|
||||
| ContextOverflowError
|
||||
| ApiError
|
||||
parentID: string
|
||||
modelID: string
|
||||
providerID: string
|
||||
|
|
@ -820,7 +834,13 @@ export type EventSessionError = {
|
|||
type: "session.error"
|
||||
properties: {
|
||||
sessionID?: string
|
||||
error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError | ApiError
|
||||
error?:
|
||||
| ProviderAuthError
|
||||
| UnknownError
|
||||
| MessageOutputLengthError
|
||||
| MessageAbortedError
|
||||
| ContextOverflowError
|
||||
| ApiError
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue