Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions generated_types.json
Original file line number Diff line number Diff line change
Expand Up @@ -1124,6 +1124,27 @@
"enum": [
"file"
]
},
"cache_control": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"ephemeral"
]
},
"ttl": {
"type": "string",
"enum": [
"5m",
"1h"
]
}
},
"required": [
"type"
]
}
},
"required": [
Expand Down Expand Up @@ -1176,6 +1197,27 @@
"enum": [
"image_url"
]
},
"cache_control": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"ephemeral"
]
},
"ttl": {
"type": "string",
"enum": [
"5m",
"1h"
]
}
},
"required": [
"type"
]
}
},
"required": [
Expand Down Expand Up @@ -1205,6 +1247,13 @@
"enum": [
"ephemeral"
]
},
"ttl": {
"type": "string",
"enum": [
"5m",
"1h"
]
}
},
"required": [
Expand Down Expand Up @@ -1238,6 +1287,13 @@
"enum": [
"ephemeral"
]
},
"ttl": {
"type": "string",
"enum": [
"5m",
"1h"
]
}
},
"required": [
Expand Down
14 changes: 14 additions & 0 deletions py/src/braintrust/_generated_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,23 +352,36 @@ class ChatCompletionContentPartFileFile(TypedDict):
file_id: NotRequired[str | None]


class ChatCompletionContentPartFileWithTitleCacheControl(TypedDict):
type: Literal['ephemeral']
ttl: NotRequired[Literal['5m', '1h'] | None]


class ChatCompletionContentPartFileWithTitle(TypedDict):
file: ChatCompletionContentPartFileFile
type: Literal['file']
cache_control: NotRequired[ChatCompletionContentPartFileWithTitleCacheControl | None]


class ChatCompletionContentPartImageWithTitleImageUrl(TypedDict):
url: str
detail: NotRequired[Literal['auto'] | Literal['low'] | Literal['high'] | None]


class ChatCompletionContentPartImageWithTitleCacheControl(TypedDict):
type: Literal['ephemeral']
ttl: NotRequired[Literal['5m', '1h'] | None]


class ChatCompletionContentPartImageWithTitle(TypedDict):
image_url: ChatCompletionContentPartImageWithTitleImageUrl
type: Literal['image_url']
cache_control: NotRequired[ChatCompletionContentPartImageWithTitleCacheControl | None]


class ChatCompletionContentPartTextCacheControl(TypedDict):
type: Literal['ephemeral']
ttl: NotRequired[Literal['5m', '1h'] | None]


class ChatCompletionContentPartText(TypedDict):
Expand All @@ -379,6 +392,7 @@ class ChatCompletionContentPartText(TypedDict):

class ChatCompletionContentPartTextWithTitleCacheControl(TypedDict):
type: Literal['ephemeral']
ttl: NotRequired[Literal['5m', '1h'] | None]


class ChatCompletionContentPartTextWithTitle(TypedDict):
Expand Down
2 changes: 1 addition & 1 deletion py/src/braintrust/generated_types.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Auto-generated file (content hash 0ba4b792e8f1345d) -- do not modify"""
"""Auto-generated file (content hash 7817da7abc7229e4) -- do not modify"""

from ._generated_types import (
Acl,
Expand Down