mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-16 09:22:22 +00:00
fix(types): mark refusal fields read-only and sync API schema
This commit is contained in:
parent
d7d9fa7530
commit
9054cddca2
3 changed files with 4 additions and 8 deletions
|
|
@ -48157,7 +48157,6 @@
|
|||
"type": "object"
|
||||
},
|
||||
"ChatCompletionRefusalObject": {
|
||||
"description": "Assistant content part holding the refusal text of a turn the model declined.",
|
||||
"properties": {
|
||||
"cache_control": {
|
||||
"$ref": "#/components/schemas/ChatCompletionCachedContent"
|
||||
|
|
|
|||
|
|
@ -706,14 +706,14 @@ class ChatCompletionRedactedThinkingBlock(TypedDict, total=False):
|
|||
class OpenAIChatCompletionRefusalObject(TypedDict):
|
||||
"""Assistant content part holding the refusal text of a turn the model declined."""
|
||||
|
||||
type: Literal["refusal"]
|
||||
refusal: str
|
||||
type: ReadOnly[Literal["refusal"]]
|
||||
refusal: ReadOnly[str]
|
||||
|
||||
|
||||
class ChatCompletionRefusalObject(
|
||||
OpenAIChatCompletionRefusalObject, total=False
|
||||
): # litellm wrapper on top of openai object for handling cached content
|
||||
cache_control: ChatCompletionCachedContent
|
||||
cache_control: ReadOnly[ChatCompletionCachedContent]
|
||||
|
||||
|
||||
class ChatCompletionReasoningSummaryTextBlock(TypedDict, total=False):
|
||||
|
|
|
|||
5
ui/litellm-dashboard/src/lib/http/schema.d.ts
generated
vendored
5
ui/litellm-dashboard/src/lib/http/schema.d.ts
generated
vendored
|
|
@ -28953,10 +28953,7 @@ export interface components {
|
|||
} & {
|
||||
[key: string]: unknown;
|
||||
};
|
||||
/**
|
||||
* ChatCompletionRefusalObject
|
||||
* @description Assistant content part holding the refusal text of a turn the model declined.
|
||||
*/
|
||||
/** ChatCompletionRefusalObject */
|
||||
ChatCompletionRefusalObject: {
|
||||
cache_control?: components["schemas"]["ChatCompletionCachedContent"];
|
||||
/** Refusal */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue