Skip to content

Commit

Permalink
feat(filepurpose): add generic file purpose
Browse files Browse the repository at this point in the history
  • Loading branch information
jezekra1 committed Apr 9, 2024
1 parent 062bcfc commit 9a5d237
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
9 changes: 5 additions & 4 deletions src/genai/schema/_api.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# generated by datamodel-codegen:
# filename: 2024-03-22_openapi_schema
# filename: 2024-04-09_openapi_schema

from __future__ import annotations

Expand Down Expand Up @@ -110,6 +110,7 @@ class FilePurpose(str, Enum):
TEMPLATE = "template"
TUNE_IMPORT = "tune_import"
EXTRACTION = "extraction"
GENERIC_STRUCTURED = "generic_structured"


class FileResult(ApiBaseModel):
Expand Down Expand Up @@ -557,7 +558,7 @@ class BetaTimeSerieLimitRetrieveResponse(ApiBaseModel):


class _FileCreateParametersQuery(ApiBaseModel):
version: Literal["2023-12-15"] = "2023-12-15"
version: Literal["2024-04-09"] = "2024-04-09"


class _FileCreateRequest(ApiBaseModel):
Expand Down Expand Up @@ -591,7 +592,7 @@ class FileIdPatchResponse(ApiBaseModel):


class _FileIdRetrieveParametersQuery(ApiBaseModel):
version: Literal["2023-12-15"] = "2023-12-15"
version: Literal["2024-04-09"] = "2024-04-09"


class FileIdRetrieveResponse(ApiBaseModel):
Expand All @@ -606,7 +607,7 @@ class _FileRetrieveParametersQuery(ApiBaseModel):
search: Optional[str] = None
purpose: Optional[FilePurpose] = None
format_id: Optional[int] = None
version: Literal["2023-12-15"] = "2023-12-15"
version: Literal["2024-04-09"] = "2024-04-09"


class FileRetrieveResponse(ApiBaseModel):
Expand Down
6 changes: 3 additions & 3 deletions src/genai/schema/_endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ class BetaTimeSerieLimitRetrieveEndpoint(ApiEndpoint):
class FileRetrieveEndpoint(ApiEndpoint):
path: str = "/v2/files"
method: str = "GET"
version: str = "2023-12-15"
version: str = "2024-04-09"


class FileCreateEndpoint(ApiEndpoint):
path: str = "/v2/files"
method: str = "POST"
version: str = "2023-12-15"
version: str = "2024-04-09"


class FileIdDeleteEndpoint(ApiEndpoint):
Expand All @@ -69,7 +69,7 @@ class FileIdDeleteEndpoint(ApiEndpoint):
class FileIdRetrieveEndpoint(ApiEndpoint):
path: str = "/v2/files/{id}"
method: str = "GET"
version: str = "2023-12-15"
version: str = "2024-04-09"


class FileIdPatchEndpoint(ApiEndpoint):
Expand Down

0 comments on commit 9a5d237

Please sign in to comment.