From b40f452c709b93371512545f634fdc185bd38a8a Mon Sep 17 00:00:00 2001 From: njbrake <33383515+njbrake@users.noreply.github.com> Date: Tue, 16 Jun 2026 18:04:38 +0000 Subject: [PATCH 1/2] chore: regenerate SDK client core from Otari OpenAPI spec --- src/otari/_client/__init__.py | 24 +- src/otari/_client/api/__init__.py | 1 + src/otari/_client/api/audio_api.py | 4 +- src/otari/_client/api/batches_api.py | 4 +- src/otari/_client/api/budgets_api.py | 4 +- src/otari/_client/api/chat_api.py | 4 +- src/otari/_client/api/embeddings_api.py | 4 +- src/otari/_client/api/files_api.py | 1464 +++++++++++++++++ src/otari/_client/api/health_api.py | 4 +- src/otari/_client/api/images_api.py | 16 +- src/otari/_client/api/keys_api.py | 4 +- src/otari/_client/api/messages_api.py | 4 +- src/otari/_client/api/models_api.py | 4 +- src/otari/_client/api/moderations_api.py | 4 +- src/otari/_client/api/pricing_api.py | 4 +- src/otari/_client/api/rerank_api.py | 4 +- src/otari/_client/api/responses_api.py | 4 +- src/otari/_client/api/usage_api.py | 4 +- src/otari/_client/api/users_api.py | 4 +- src/otari/_client/api_client.py | 4 +- src/otari/_client/configuration.py | 4 +- src/otari/_client/exceptions.py | 4 +- src/otari/_client/models/__init__.py | 13 +- .../_client/models/audio_speech_request.py | 6 +- .../_client/models/batch_request_item.py | 4 +- src/otari/_client/models/budget_response.py | 4 +- src/otari/_client/models/caller.py | 4 +- .../models/cc_chat_completion_audio.py | 4 +- .../models/cc_chat_completion_message.py | 4 +- ...hat_completion_message_custom_tool_call.py | 4 +- ...t_completion_message_function_tool_call.py | 4 +- ...hat_completion_message_tool_calls_inner.py | 4 +- .../cc_chat_completion_token_logprob.py | 4 +- src/otari/_client/models/cc_choice.py | 4 +- .../_client/models/cc_choice_logprobs.py | 4 +- .../models/cc_completion_tokens_details.py | 4 +- .../_client/models/cc_completion_usage.py | 4 +- src/otari/_client/models/cc_custom.py | 4 +- src/otari/_client/models/cc_function.py | 4 +- src/otari/_client/models/cc_function_call.py | 4 +- .../models/cc_prompt_tokens_details.py | 4 +- src/otari/_client/models/cc_top_logprob.py | 4 +- .../cck_chat_completion_token_logprob.py | 4 +- src/otari/_client/models/cck_choice_delta.py | 4 +- .../models/cck_choice_delta_function_call.py | 4 +- .../models/cck_choice_delta_tool_call.py | 4 +- .../cck_choice_delta_tool_call_function.py | 4 +- .../_client/models/cck_choice_logprobs.py | 4 +- src/otari/_client/models/cck_chunk_choice.py | 4 +- .../models/cck_completion_tokens_details.py | 4 +- .../_client/models/cck_completion_usage.py | 4 +- .../models/cck_prompt_tokens_details.py | 4 +- src/otari/_client/models/cck_top_logprob.py | 4 +- src/otari/_client/models/chat_completion.py | 6 +- .../_client/models/chat_completion_chunk.py | 4 +- .../_client/models/chat_completion_request.py | 96 +- .../_client/models/chat_message_input.py | 4 +- src/otari/_client/models/content.py | 4 +- src/otari/_client/models/content1.py | 4 +- src/otari/_client/models/content2.py | 4 +- .../_client/models/content2_any_of_inner.py | 4 +- src/otari/_client/models/content3.py | 4 +- src/otari/_client/models/content4.py | 4 +- src/otari/_client/models/content5.py | 4 +- src/otari/_client/models/content6.py | 4 +- src/otari/_client/models/content7.py | 4 +- src/otari/_client/models/content8.py | 4 +- src/otari/_client/models/content9_inner.py | 4 +- .../_client/models/content_any_of_inner.py | 4 +- src/otari/_client/models/conversation.py | 144 ++ .../_client/models/count_tokens_request.py | 4 +- .../_client/models/count_tokens_response.py | 4 +- .../_client/models/create_batch_request.py | 4 +- .../_client/models/create_budget_request.py | 4 +- .../models/create_embedding_response.py | 4 +- .../_client/models/create_key_request.py | 4 +- .../_client/models/create_key_response.py | 4 +- .../_client/models/create_user_request.py | 4 +- src/otari/_client/models/emb_embedding.py | 4 +- src/otari/_client/models/emb_usage.py | 4 +- src/otari/_client/models/embedding_request.py | 4 +- src/otari/_client/models/guardrail_config.py | 6 +- .../_client/models/http_validation_error.py | 4 +- .../models/image_generation_request.py | 6 +- src/otari/_client/models/images_response.py | 195 +++ src/otari/_client/models/img_image.py | 120 ++ src/otari/_client/models/img_usage.py | 122 ++ .../models/img_usage_input_tokens_details.py | 103 ++ .../models/img_usage_output_tokens_details.py | 103 ++ src/otari/_client/models/input.py | 4 +- src/otari/_client/models/input1.py | 6 +- src/otari/_client/models/key_info.py | 4 +- src/otari/_client/models/location_inner.py | 4 +- src/otari/_client/models/mcp_server_config.py | 6 +- src/otari/_client/models/message_response.py | 4 +- src/otari/_client/models/messages_request.py | 12 +- src/otari/_client/models/model.py | 4 +- .../_client/models/model_list_response.py | 4 +- src/otari/_client/models/model_object.py | 4 +- .../_client/models/model_pricing_info.py | 4 +- .../_client/models/moderation_request.py | 4 +- .../_client/models/moderation_response.py | 4 +- src/otari/_client/models/moderation_result.py | 4 +- .../_client/models/mr_base64_pdf_source.py | 4 +- .../mr_bash_code_execution_output_block.py | 4 +- .../mr_bash_code_execution_result_block.py | 4 +- ...r_bash_code_execution_tool_result_block.py | 4 +- ...r_bash_code_execution_tool_result_error.py | 4 +- src/otari/_client/models/mr_cache_creation.py | 4 +- .../models/mr_citation_char_location.py | 4 +- .../mr_citation_content_block_location.py | 4 +- .../models/mr_citation_page_location.py | 4 +- .../_client/models/mr_citations_config.py | 4 +- .../mr_citations_search_result_location.py | 4 +- ...mr_citations_web_search_result_location.py | 4 +- .../models/mr_code_execution_output_block.py | 4 +- .../models/mr_code_execution_result_block.py | 4 +- .../mr_code_execution_tool_result_block.py | 4 +- .../mr_code_execution_tool_result_error.py | 4 +- src/otari/_client/models/mr_container.py | 4 +- .../models/mr_container_upload_block.py | 4 +- src/otari/_client/models/mr_direct_caller.py | 4 +- src/otari/_client/models/mr_document_block.py | 4 +- ...r_encrypted_code_execution_result_block.py | 4 +- .../_client/models/mr_plain_text_source.py | 4 +- .../models/mr_redacted_thinking_block.py | 4 +- .../_client/models/mr_refusal_stop_details.py | 4 +- .../_client/models/mr_server_tool_caller.py | 4 +- .../models/mr_server_tool_caller20260120.py | 4 +- .../_client/models/mr_server_tool_usage.py | 4 +- .../models/mr_server_tool_use_block.py | 4 +- src/otari/_client/models/mr_text_block.py | 4 +- .../models/mr_text_block_citations_inner.py | 4 +- ...itor_code_execution_create_result_block.py | 4 +- ...code_execution_str_replace_result_block.py | 4 +- ...editor_code_execution_tool_result_block.py | 4 +- ...editor_code_execution_tool_result_error.py | 4 +- ...editor_code_execution_view_result_block.py | 4 +- src/otari/_client/models/mr_thinking_block.py | 4 +- .../_client/models/mr_tool_reference_block.py | 4 +- .../mr_tool_search_tool_result_block.py | 4 +- .../mr_tool_search_tool_result_error.py | 4 +- ...mr_tool_search_tool_search_result_block.py | 4 +- src/otari/_client/models/mr_tool_use_block.py | 4 +- src/otari/_client/models/mr_usage.py | 4 +- .../_client/models/mr_web_fetch_block.py | 4 +- .../models/mr_web_fetch_tool_result_block.py | 4 +- .../mr_web_fetch_tool_result_error_block.py | 4 +- .../models/mr_web_search_result_block.py | 4 +- .../models/mr_web_search_tool_result_block.py | 4 +- .../models/mr_web_search_tool_result_error.py | 4 +- src/otari/_client/models/msg_audio.py | 4 +- ...chat_completion_assistant_message_param.py | 4 +- ...hat_completion_content_part_image_param.py | 4 +- ...mpletion_content_part_input_audio_param.py | 4 +- ...t_completion_content_part_refusal_param.py | 4 +- ...chat_completion_content_part_text_param.py | 4 +- ...chat_completion_developer_message_param.py | 4 +- ..._chat_completion_function_message_param.py | 4 +- ...mpletion_message_custom_tool_call_param.py | 4 +- ...letion_message_function_tool_call_param.py | 4 +- ...sg_chat_completion_system_message_param.py | 4 +- .../msg_chat_completion_tool_message_param.py | 4 +- .../msg_chat_completion_user_message_param.py | 4 +- src/otari/_client/models/msg_custom.py | 4 +- src/otari/_client/models/msg_file.py | 4 +- src/otari/_client/models/msg_file_file.py | 4 +- src/otari/_client/models/msg_function.py | 4 +- src/otari/_client/models/msg_function_call.py | 4 +- src/otari/_client/models/msg_image_url.py | 4 +- src/otari/_client/models/msg_input_audio.py | 4 +- src/otari/_client/models/pricing_response.py | 4 +- src/otari/_client/models/rerank_request.py | 4 +- src/otari/_client/models/rerank_response.py | 4 +- src/otari/_client/models/responses_request.py | 198 ++- src/otari/_client/models/rr_rerank_meta.py | 4 +- src/otari/_client/models/rr_rerank_result.py | 4 +- src/otari/_client/models/rr_rerank_usage.py | 4 +- .../_client/models/set_pricing_request.py | 4 +- src/otari/_client/models/source.py | 4 +- .../_client/models/{system1.py => stop.py} | 32 +- src/otari/_client/models/system.py | 6 +- src/otari/_client/models/tool_calls_inner.py | 4 +- src/otari/_client/models/tool_choice.py | 4 +- src/otari/_client/models/tool_choice1.py | 144 ++ .../_client/models/update_budget_request.py | 4 +- .../_client/models/update_key_request.py | 4 +- .../_client/models/update_user_request.py | 4 +- src/otari/_client/models/usage_entry.py | 4 +- .../_client/models/usage_log_response.py | 4 +- src/otari/_client/models/user_response.py | 4 +- src/otari/_client/models/validation_error.py | 4 +- src/otari/_client/rest.py | 4 +- 193 files changed, 3099 insertions(+), 410 deletions(-) create mode 100644 src/otari/_client/api/files_api.py create mode 100644 src/otari/_client/models/conversation.py create mode 100644 src/otari/_client/models/images_response.py create mode 100644 src/otari/_client/models/img_image.py create mode 100644 src/otari/_client/models/img_usage.py create mode 100644 src/otari/_client/models/img_usage_input_tokens_details.py create mode 100644 src/otari/_client/models/img_usage_output_tokens_details.py rename src/otari/_client/models/{system1.py => stop.py} (81%) create mode 100644 src/otari/_client/models/tool_choice1.py diff --git a/src/otari/_client/__init__.py b/src/otari/_client/__init__.py index c5f9792..035880b 100644 --- a/src/otari/_client/__init__.py +++ b/src/otari/_client/__init__.py @@ -3,9 +3,9 @@ # flake8: noqa """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -23,6 +23,7 @@ "BudgetsApi", "ChatApi", "EmbeddingsApi", + "FilesApi", "HealthApi", "ImagesApi", "KeysApi", @@ -89,6 +90,7 @@ "Content8", "Content9Inner", "ContentAnyOfInner", + "Conversation", "CountTokensRequest", "CountTokensResponse", "CreateBatchRequest", @@ -102,7 +104,12 @@ "EmbeddingRequest", "GuardrailConfig", "HTTPValidationError", + "IMGImage", + "IMGUsage", + "IMGUsageInputTokensDetails", + "IMGUsageOutputTokensDetails", "ImageGenerationRequest", + "ImagesResponse", "Input", "Input1", "KeyInfo", @@ -194,10 +201,11 @@ "ResponsesRequest", "SetPricingRequest", "Source", + "Stop", "System", - "System1", "ToolCallsInner", "ToolChoice", + "ToolChoice1", "UpdateBudgetRequest", "UpdateKeyRequest", "UpdateUserRequest", @@ -213,6 +221,7 @@ from otari._client.api.budgets_api import BudgetsApi as BudgetsApi from otari._client.api.chat_api import ChatApi as ChatApi from otari._client.api.embeddings_api import EmbeddingsApi as EmbeddingsApi +from otari._client.api.files_api import FilesApi as FilesApi from otari._client.api.health_api import HealthApi as HealthApi from otari._client.api.images_api import ImagesApi as ImagesApi from otari._client.api.keys_api import KeysApi as KeysApi @@ -283,6 +292,7 @@ from otari._client.models.content8 import Content8 as Content8 from otari._client.models.content9_inner import Content9Inner as Content9Inner from otari._client.models.content_any_of_inner import ContentAnyOfInner as ContentAnyOfInner +from otari._client.models.conversation import Conversation as Conversation from otari._client.models.count_tokens_request import CountTokensRequest as CountTokensRequest from otari._client.models.count_tokens_response import CountTokensResponse as CountTokensResponse from otari._client.models.create_batch_request import CreateBatchRequest as CreateBatchRequest @@ -296,7 +306,12 @@ from otari._client.models.embedding_request import EmbeddingRequest as EmbeddingRequest from otari._client.models.guardrail_config import GuardrailConfig as GuardrailConfig from otari._client.models.http_validation_error import HTTPValidationError as HTTPValidationError +from otari._client.models.img_image import IMGImage as IMGImage +from otari._client.models.img_usage import IMGUsage as IMGUsage +from otari._client.models.img_usage_input_tokens_details import IMGUsageInputTokensDetails as IMGUsageInputTokensDetails +from otari._client.models.img_usage_output_tokens_details import IMGUsageOutputTokensDetails as IMGUsageOutputTokensDetails from otari._client.models.image_generation_request import ImageGenerationRequest as ImageGenerationRequest +from otari._client.models.images_response import ImagesResponse as ImagesResponse from otari._client.models.input import Input as Input from otari._client.models.input1 import Input1 as Input1 from otari._client.models.key_info import KeyInfo as KeyInfo @@ -388,10 +403,11 @@ from otari._client.models.responses_request import ResponsesRequest as ResponsesRequest from otari._client.models.set_pricing_request import SetPricingRequest as SetPricingRequest from otari._client.models.source import Source as Source +from otari._client.models.stop import Stop as Stop from otari._client.models.system import System as System -from otari._client.models.system1 import System1 as System1 from otari._client.models.tool_calls_inner import ToolCallsInner as ToolCallsInner from otari._client.models.tool_choice import ToolChoice as ToolChoice +from otari._client.models.tool_choice1 import ToolChoice1 as ToolChoice1 from otari._client.models.update_budget_request import UpdateBudgetRequest as UpdateBudgetRequest from otari._client.models.update_key_request import UpdateKeyRequest as UpdateKeyRequest from otari._client.models.update_user_request import UpdateUserRequest as UpdateUserRequest diff --git a/src/otari/_client/api/__init__.py b/src/otari/_client/api/__init__.py index 460b2a7..ae486dd 100644 --- a/src/otari/_client/api/__init__.py +++ b/src/otari/_client/api/__init__.py @@ -6,6 +6,7 @@ from otari._client.api.budgets_api import BudgetsApi from otari._client.api.chat_api import ChatApi from otari._client.api.embeddings_api import EmbeddingsApi +from otari._client.api.files_api import FilesApi from otari._client.api.health_api import HealthApi from otari._client.api.images_api import ImagesApi from otari._client.api.keys_api import KeysApi diff --git a/src/otari/_client/api/audio_api.py b/src/otari/_client/api/audio_api.py index 2418145..6f3d93e 100644 --- a/src/otari/_client/api/audio_api.py +++ b/src/otari/_client/api/audio_api.py @@ -1,7 +1,7 @@ """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/api/batches_api.py b/src/otari/_client/api/batches_api.py index 64614c8..7de0059 100644 --- a/src/otari/_client/api/batches_api.py +++ b/src/otari/_client/api/batches_api.py @@ -1,7 +1,7 @@ """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/api/budgets_api.py b/src/otari/_client/api/budgets_api.py index a78e6b0..a84ade2 100644 --- a/src/otari/_client/api/budgets_api.py +++ b/src/otari/_client/api/budgets_api.py @@ -1,7 +1,7 @@ """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/api/chat_api.py b/src/otari/_client/api/chat_api.py index 8e4b9aa..f628a2e 100644 --- a/src/otari/_client/api/chat_api.py +++ b/src/otari/_client/api/chat_api.py @@ -1,7 +1,7 @@ """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/api/embeddings_api.py b/src/otari/_client/api/embeddings_api.py index dc1879a..cae5575 100644 --- a/src/otari/_client/api/embeddings_api.py +++ b/src/otari/_client/api/embeddings_api.py @@ -1,7 +1,7 @@ """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/api/files_api.py b/src/otari/_client/api/files_api.py new file mode 100644 index 0000000..436f36f --- /dev/null +++ b/src/otari/_client/api/files_api.py @@ -0,0 +1,1464 @@ +""" + otari + + Otari, an OpenAI-compatible LLM gateway with API key management + + The version of the OpenAPI document: 0.0.0-dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import StrictStr +from typing import Any, Dict, Optional + +from otari._client.api_client import ApiClient, RequestSerialized +from otari._client.api_response import ApiResponse +from otari._client.rest import RESTResponseType + + +class FilesApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def create_file_v1_files_post( + self, + file: StrictStr, + purpose: Optional[StrictStr] = None, + user: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Dict[str, object]: + """Create File + + OpenAI-compatible file upload endpoint. + + :param file: (required) + :type file: str + :param purpose: + :type purpose: str + :param user: + :type user: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_file_v1_files_post_serialize( + file=file, + purpose=purpose, + user=user, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Dict[str, object]", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_file_v1_files_post_with_http_info( + self, + file: StrictStr, + purpose: Optional[StrictStr] = None, + user: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Dict[str, object]]: + """Create File + + OpenAI-compatible file upload endpoint. + + :param file: (required) + :type file: str + :param purpose: + :type purpose: str + :param user: + :type user: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_file_v1_files_post_serialize( + file=file, + purpose=purpose, + user=user, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Dict[str, object]", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_file_v1_files_post_without_preload_content( + self, + file: StrictStr, + purpose: Optional[StrictStr] = None, + user: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create File + + OpenAI-compatible file upload endpoint. + + :param file: (required) + :type file: str + :param purpose: + :type purpose: str + :param user: + :type user: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_file_v1_files_post_serialize( + file=file, + purpose=purpose, + user=user, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Dict[str, object]", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_file_v1_files_post_serialize( + self, + file, + purpose, + user, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + if file is not None: + _form_params.append(('file', file)) + if purpose is not None: + _form_params.append(('purpose', purpose)) + if user is not None: + _form_params.append(('user', user)) + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'multipart/form-data' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/files', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def delete_file_v1_files_file_id_delete( + self, + file_id: StrictStr, + user: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Dict[str, object]: + """Delete File + + Soft-delete a file's metadata and remove its bytes from the backend. + + :param file_id: (required) + :type file_id: str + :param user: + :type user: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_file_v1_files_file_id_delete_serialize( + file_id=file_id, + user=user, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Dict[str, object]", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_file_v1_files_file_id_delete_with_http_info( + self, + file_id: StrictStr, + user: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Dict[str, object]]: + """Delete File + + Soft-delete a file's metadata and remove its bytes from the backend. + + :param file_id: (required) + :type file_id: str + :param user: + :type user: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_file_v1_files_file_id_delete_serialize( + file_id=file_id, + user=user, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Dict[str, object]", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_file_v1_files_file_id_delete_without_preload_content( + self, + file_id: StrictStr, + user: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete File + + Soft-delete a file's metadata and remove its bytes from the backend. + + :param file_id: (required) + :type file_id: str + :param user: + :type user: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_file_v1_files_file_id_delete_serialize( + file_id=file_id, + user=user, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Dict[str, object]", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_file_v1_files_file_id_delete_serialize( + self, + file_id, + user, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if file_id is not None: + _path_params['file_id'] = file_id + # process the query parameters + if user is not None: + + _query_params.append(('user', user)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v1/files/{file_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_file_content_v1_files_file_id_content_get( + self, + file_id: StrictStr, + user: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """Get File Content + + Download the raw bytes of a file. + + :param file_id: (required) + :type file_id: str + :param user: + :type user: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_file_content_v1_files_file_id_content_get_serialize( + file_id=file_id, + user=user, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_file_content_v1_files_file_id_content_get_with_http_info( + self, + file_id: StrictStr, + user: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """Get File Content + + Download the raw bytes of a file. + + :param file_id: (required) + :type file_id: str + :param user: + :type user: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_file_content_v1_files_file_id_content_get_serialize( + file_id=file_id, + user=user, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_file_content_v1_files_file_id_content_get_without_preload_content( + self, + file_id: StrictStr, + user: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get File Content + + Download the raw bytes of a file. + + :param file_id: (required) + :type file_id: str + :param user: + :type user: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_file_content_v1_files_file_id_content_get_serialize( + file_id=file_id, + user=user, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_file_content_v1_files_file_id_content_get_serialize( + self, + file_id, + user, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if file_id is not None: + _path_params['file_id'] = file_id + # process the query parameters + if user is not None: + + _query_params.append(('user', user)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/files/{file_id}/content', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_file_v1_files_file_id_get( + self, + file_id: StrictStr, + user: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Dict[str, object]: + """Get File + + Retrieve metadata for a single file. + + :param file_id: (required) + :type file_id: str + :param user: + :type user: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_file_v1_files_file_id_get_serialize( + file_id=file_id, + user=user, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Dict[str, object]", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_file_v1_files_file_id_get_with_http_info( + self, + file_id: StrictStr, + user: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Dict[str, object]]: + """Get File + + Retrieve metadata for a single file. + + :param file_id: (required) + :type file_id: str + :param user: + :type user: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_file_v1_files_file_id_get_serialize( + file_id=file_id, + user=user, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Dict[str, object]", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_file_v1_files_file_id_get_without_preload_content( + self, + file_id: StrictStr, + user: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get File + + Retrieve metadata for a single file. + + :param file_id: (required) + :type file_id: str + :param user: + :type user: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_file_v1_files_file_id_get_serialize( + file_id=file_id, + user=user, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Dict[str, object]", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_file_v1_files_file_id_get_serialize( + self, + file_id, + user, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if file_id is not None: + _path_params['file_id'] = file_id + # process the query parameters + if user is not None: + + _query_params.append(('user', user)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/files/{file_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_files_v1_files_get( + self, + user: Optional[StrictStr] = None, + purpose: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Dict[str, object]: + """List Files + + List the authenticated user's uploaded files. + + :param user: + :type user: str + :param purpose: + :type purpose: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_files_v1_files_get_serialize( + user=user, + purpose=purpose, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Dict[str, object]", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def list_files_v1_files_get_with_http_info( + self, + user: Optional[StrictStr] = None, + purpose: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Dict[str, object]]: + """List Files + + List the authenticated user's uploaded files. + + :param user: + :type user: str + :param purpose: + :type purpose: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_files_v1_files_get_serialize( + user=user, + purpose=purpose, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Dict[str, object]", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def list_files_v1_files_get_without_preload_content( + self, + user: Optional[StrictStr] = None, + purpose: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Files + + List the authenticated user's uploaded files. + + :param user: + :type user: str + :param purpose: + :type purpose: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_files_v1_files_get_serialize( + user=user, + purpose=purpose, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Dict[str, object]", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_files_v1_files_get_serialize( + self, + user, + purpose, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if user is not None: + + _query_params.append(('user', user)) + + if purpose is not None: + + _query_params.append(('purpose', purpose)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/files', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/src/otari/_client/api/health_api.py b/src/otari/_client/api/health_api.py index 4248817..669c1ca 100644 --- a/src/otari/_client/api/health_api.py +++ b/src/otari/_client/api/health_api.py @@ -1,7 +1,7 @@ """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/api/images_api.py b/src/otari/_client/api/images_api.py index f5b26ab..6cfb870 100644 --- a/src/otari/_client/api/images_api.py +++ b/src/otari/_client/api/images_api.py @@ -1,7 +1,7 @@ """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -15,8 +15,8 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from typing import Any from otari._client.models.image_generation_request import ImageGenerationRequest +from otari._client.models.images_response import ImagesResponse from otari._client.api_client import ApiClient, RequestSerialized from otari._client.api_response import ApiResponse @@ -52,7 +52,7 @@ def create_image_v1_images_generations_post( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> object: + ) -> ImagesResponse: """Create Image OpenAI-compatible image generation endpoint. Authentication modes: - Master key + user field: Use specified user (must exist) - API key + user field: Use specified user (must exist) - API key without user field: Use virtual user created with API key @@ -90,7 +90,7 @@ def create_image_v1_images_generations_post( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "object", + '200': "ImagesResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -120,7 +120,7 @@ def create_image_v1_images_generations_post_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[object]: + ) -> ApiResponse[ImagesResponse]: """Create Image OpenAI-compatible image generation endpoint. Authentication modes: - Master key + user field: Use specified user (must exist) - API key + user field: Use specified user (must exist) - API key without user field: Use virtual user created with API key @@ -158,7 +158,7 @@ def create_image_v1_images_generations_post_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "object", + '200': "ImagesResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -226,7 +226,7 @@ def create_image_v1_images_generations_post_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "object", + '200': "ImagesResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( diff --git a/src/otari/_client/api/keys_api.py b/src/otari/_client/api/keys_api.py index 1a9432b..f56483f 100644 --- a/src/otari/_client/api/keys_api.py +++ b/src/otari/_client/api/keys_api.py @@ -1,7 +1,7 @@ """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/api/messages_api.py b/src/otari/_client/api/messages_api.py index 0d7dd03..5044b01 100644 --- a/src/otari/_client/api/messages_api.py +++ b/src/otari/_client/api/messages_api.py @@ -1,7 +1,7 @@ """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/api/models_api.py b/src/otari/_client/api/models_api.py index 6b43e30..9dada8b 100644 --- a/src/otari/_client/api/models_api.py +++ b/src/otari/_client/api/models_api.py @@ -1,7 +1,7 @@ """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/api/moderations_api.py b/src/otari/_client/api/moderations_api.py index e8e0cee..b5359c7 100644 --- a/src/otari/_client/api/moderations_api.py +++ b/src/otari/_client/api/moderations_api.py @@ -1,7 +1,7 @@ """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/api/pricing_api.py b/src/otari/_client/api/pricing_api.py index a735ba8..89935f2 100644 --- a/src/otari/_client/api/pricing_api.py +++ b/src/otari/_client/api/pricing_api.py @@ -1,7 +1,7 @@ """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/api/rerank_api.py b/src/otari/_client/api/rerank_api.py index 78cf4df..13e2d00 100644 --- a/src/otari/_client/api/rerank_api.py +++ b/src/otari/_client/api/rerank_api.py @@ -1,7 +1,7 @@ """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/api/responses_api.py b/src/otari/_client/api/responses_api.py index 36f6a1c..330d110 100644 --- a/src/otari/_client/api/responses_api.py +++ b/src/otari/_client/api/responses_api.py @@ -1,7 +1,7 @@ """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/api/usage_api.py b/src/otari/_client/api/usage_api.py index 7782989..ae174f6 100644 --- a/src/otari/_client/api/usage_api.py +++ b/src/otari/_client/api/usage_api.py @@ -1,7 +1,7 @@ """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/api/users_api.py b/src/otari/_client/api/users_api.py index b105597..dff3cde 100644 --- a/src/otari/_client/api/users_api.py +++ b/src/otari/_client/api/users_api.py @@ -1,7 +1,7 @@ """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/api_client.py b/src/otari/_client/api_client.py index d8d0b13..1906753 100644 --- a/src/otari/_client/api_client.py +++ b/src/otari/_client/api_client.py @@ -1,7 +1,7 @@ """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/configuration.py b/src/otari/_client/configuration.py index 5cd7bc4..dac0797 100644 --- a/src/otari/_client/configuration.py +++ b/src/otari/_client/configuration.py @@ -1,7 +1,7 @@ """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/exceptions.py b/src/otari/_client/exceptions.py index 2a606c6..60f1842 100644 --- a/src/otari/_client/exceptions.py +++ b/src/otari/_client/exceptions.py @@ -1,7 +1,7 @@ """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/__init__.py b/src/otari/_client/models/__init__.py index a180f04..371ba6f 100644 --- a/src/otari/_client/models/__init__.py +++ b/src/otari/_client/models/__init__.py @@ -2,9 +2,9 @@ # flake8: noqa """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -59,6 +59,7 @@ from otari._client.models.content8 import Content8 from otari._client.models.content9_inner import Content9Inner from otari._client.models.content_any_of_inner import ContentAnyOfInner +from otari._client.models.conversation import Conversation from otari._client.models.count_tokens_request import CountTokensRequest from otari._client.models.count_tokens_response import CountTokensResponse from otari._client.models.create_batch_request import CreateBatchRequest @@ -72,7 +73,12 @@ from otari._client.models.embedding_request import EmbeddingRequest from otari._client.models.guardrail_config import GuardrailConfig from otari._client.models.http_validation_error import HTTPValidationError +from otari._client.models.img_image import IMGImage +from otari._client.models.img_usage import IMGUsage +from otari._client.models.img_usage_input_tokens_details import IMGUsageInputTokensDetails +from otari._client.models.img_usage_output_tokens_details import IMGUsageOutputTokensDetails from otari._client.models.image_generation_request import ImageGenerationRequest +from otari._client.models.images_response import ImagesResponse from otari._client.models.input import Input from otari._client.models.input1 import Input1 from otari._client.models.key_info import KeyInfo @@ -164,10 +170,11 @@ from otari._client.models.responses_request import ResponsesRequest from otari._client.models.set_pricing_request import SetPricingRequest from otari._client.models.source import Source +from otari._client.models.stop import Stop from otari._client.models.system import System -from otari._client.models.system1 import System1 from otari._client.models.tool_calls_inner import ToolCallsInner from otari._client.models.tool_choice import ToolChoice +from otari._client.models.tool_choice1 import ToolChoice1 from otari._client.models.update_budget_request import UpdateBudgetRequest from otari._client.models.update_key_request import UpdateKeyRequest from otari._client.models.update_user_request import UpdateUserRequest diff --git a/src/otari/_client/models/audio_speech_request.py b/src/otari/_client/models/audio_speech_request.py index 0cc33ee..d4bb85e 100644 --- a/src/otari/_client/models/audio_speech_request.py +++ b/src/otari/_client/models/audio_speech_request.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -25,7 +25,7 @@ class AudioSpeechRequest(BaseModel): """ - OpenAI-compatible audio speech (TTS) request. + OpenAI-compatible audio speech (TTS) request. The speech fields are derived from any-llm's ``AudioSpeechParams`` (see ``_schema_derive``) so the schema cannot silently drop a param any-llm forwards. ``user`` is gateway-only (billing / auth scoping); it is not an any-llm param and is stripped before the request is forwarded. """ # noqa: E501 input: StrictStr instructions: Optional[StrictStr] = None diff --git a/src/otari/_client/models/batch_request_item.py b/src/otari/_client/models/batch_request_item.py index 149a48d..1bfd5a9 100644 --- a/src/otari/_client/models/batch_request_item.py +++ b/src/otari/_client/models/batch_request_item.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/budget_response.py b/src/otari/_client/models/budget_response.py index 2b4d473..d96a9cf 100644 --- a/src/otari/_client/models/budget_response.py +++ b/src/otari/_client/models/budget_response.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/caller.py b/src/otari/_client/models/caller.py index a3a2d72..5e2cd83 100644 --- a/src/otari/_client/models/caller.py +++ b/src/otari/_client/models/caller.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/cc_chat_completion_audio.py b/src/otari/_client/models/cc_chat_completion_audio.py index 88acc49..05b0623 100644 --- a/src/otari/_client/models/cc_chat_completion_audio.py +++ b/src/otari/_client/models/cc_chat_completion_audio.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/cc_chat_completion_message.py b/src/otari/_client/models/cc_chat_completion_message.py index 4d78a63..1590978 100644 --- a/src/otari/_client/models/cc_chat_completion_message.py +++ b/src/otari/_client/models/cc_chat_completion_message.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/cc_chat_completion_message_custom_tool_call.py b/src/otari/_client/models/cc_chat_completion_message_custom_tool_call.py index cab3b5b..170020d 100644 --- a/src/otari/_client/models/cc_chat_completion_message_custom_tool_call.py +++ b/src/otari/_client/models/cc_chat_completion_message_custom_tool_call.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/cc_chat_completion_message_function_tool_call.py b/src/otari/_client/models/cc_chat_completion_message_function_tool_call.py index fd1c101..89b94a4 100644 --- a/src/otari/_client/models/cc_chat_completion_message_function_tool_call.py +++ b/src/otari/_client/models/cc_chat_completion_message_function_tool_call.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/cc_chat_completion_message_tool_calls_inner.py b/src/otari/_client/models/cc_chat_completion_message_tool_calls_inner.py index 2fd774f..5409aa0 100644 --- a/src/otari/_client/models/cc_chat_completion_message_tool_calls_inner.py +++ b/src/otari/_client/models/cc_chat_completion_message_tool_calls_inner.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/cc_chat_completion_token_logprob.py b/src/otari/_client/models/cc_chat_completion_token_logprob.py index 5443004..1608033 100644 --- a/src/otari/_client/models/cc_chat_completion_token_logprob.py +++ b/src/otari/_client/models/cc_chat_completion_token_logprob.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/cc_choice.py b/src/otari/_client/models/cc_choice.py index 2a23c8c..9c97311 100644 --- a/src/otari/_client/models/cc_choice.py +++ b/src/otari/_client/models/cc_choice.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/cc_choice_logprobs.py b/src/otari/_client/models/cc_choice_logprobs.py index 7bb4175..48ec8d8 100644 --- a/src/otari/_client/models/cc_choice_logprobs.py +++ b/src/otari/_client/models/cc_choice_logprobs.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/cc_completion_tokens_details.py b/src/otari/_client/models/cc_completion_tokens_details.py index 47caf33..3835562 100644 --- a/src/otari/_client/models/cc_completion_tokens_details.py +++ b/src/otari/_client/models/cc_completion_tokens_details.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/cc_completion_usage.py b/src/otari/_client/models/cc_completion_usage.py index 105ca2f..fa7f7eb 100644 --- a/src/otari/_client/models/cc_completion_usage.py +++ b/src/otari/_client/models/cc_completion_usage.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/cc_custom.py b/src/otari/_client/models/cc_custom.py index 54686ac..952bfce 100644 --- a/src/otari/_client/models/cc_custom.py +++ b/src/otari/_client/models/cc_custom.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/cc_function.py b/src/otari/_client/models/cc_function.py index af06013..28f4e3b 100644 --- a/src/otari/_client/models/cc_function.py +++ b/src/otari/_client/models/cc_function.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/cc_function_call.py b/src/otari/_client/models/cc_function_call.py index 25bb26f..7e6621a 100644 --- a/src/otari/_client/models/cc_function_call.py +++ b/src/otari/_client/models/cc_function_call.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/cc_prompt_tokens_details.py b/src/otari/_client/models/cc_prompt_tokens_details.py index dc36bbb..77fbd52 100644 --- a/src/otari/_client/models/cc_prompt_tokens_details.py +++ b/src/otari/_client/models/cc_prompt_tokens_details.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/cc_top_logprob.py b/src/otari/_client/models/cc_top_logprob.py index f078648..07b46ae 100644 --- a/src/otari/_client/models/cc_top_logprob.py +++ b/src/otari/_client/models/cc_top_logprob.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/cck_chat_completion_token_logprob.py b/src/otari/_client/models/cck_chat_completion_token_logprob.py index cede850..d745840 100644 --- a/src/otari/_client/models/cck_chat_completion_token_logprob.py +++ b/src/otari/_client/models/cck_chat_completion_token_logprob.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/cck_choice_delta.py b/src/otari/_client/models/cck_choice_delta.py index ed4045b..ebdb11d 100644 --- a/src/otari/_client/models/cck_choice_delta.py +++ b/src/otari/_client/models/cck_choice_delta.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/cck_choice_delta_function_call.py b/src/otari/_client/models/cck_choice_delta_function_call.py index b2e0862..c9d4b0f 100644 --- a/src/otari/_client/models/cck_choice_delta_function_call.py +++ b/src/otari/_client/models/cck_choice_delta_function_call.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/cck_choice_delta_tool_call.py b/src/otari/_client/models/cck_choice_delta_tool_call.py index cf7e4e9..424165a 100644 --- a/src/otari/_client/models/cck_choice_delta_tool_call.py +++ b/src/otari/_client/models/cck_choice_delta_tool_call.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/cck_choice_delta_tool_call_function.py b/src/otari/_client/models/cck_choice_delta_tool_call_function.py index 6af39e7..322e1db 100644 --- a/src/otari/_client/models/cck_choice_delta_tool_call_function.py +++ b/src/otari/_client/models/cck_choice_delta_tool_call_function.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/cck_choice_logprobs.py b/src/otari/_client/models/cck_choice_logprobs.py index 14832de..f29fd85 100644 --- a/src/otari/_client/models/cck_choice_logprobs.py +++ b/src/otari/_client/models/cck_choice_logprobs.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/cck_chunk_choice.py b/src/otari/_client/models/cck_chunk_choice.py index 167c5ca..ce33628 100644 --- a/src/otari/_client/models/cck_chunk_choice.py +++ b/src/otari/_client/models/cck_chunk_choice.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/cck_completion_tokens_details.py b/src/otari/_client/models/cck_completion_tokens_details.py index 32073f9..1650fae 100644 --- a/src/otari/_client/models/cck_completion_tokens_details.py +++ b/src/otari/_client/models/cck_completion_tokens_details.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/cck_completion_usage.py b/src/otari/_client/models/cck_completion_usage.py index a04ee69..be68c7e 100644 --- a/src/otari/_client/models/cck_completion_usage.py +++ b/src/otari/_client/models/cck_completion_usage.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/cck_prompt_tokens_details.py b/src/otari/_client/models/cck_prompt_tokens_details.py index 9630316..4918365 100644 --- a/src/otari/_client/models/cck_prompt_tokens_details.py +++ b/src/otari/_client/models/cck_prompt_tokens_details.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/cck_top_logprob.py b/src/otari/_client/models/cck_top_logprob.py index b8173e6..cd28e2f 100644 --- a/src/otari/_client/models/cck_top_logprob.py +++ b/src/otari/_client/models/cck_top_logprob.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/chat_completion.py b/src/otari/_client/models/chat_completion.py index 5e33613..228adfa 100644 --- a/src/otari/_client/models/chat_completion.py +++ b/src/otari/_client/models/chat_completion.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -34,7 +34,7 @@ class ChatCompletion(BaseModel): created: StrictInt model: StrictStr object: StrictStr - service_tier: Optional[StrictStr] = Field(default=None, description="Filter models by provider name") + service_tier: Optional[StrictStr] = None system_fingerprint: Optional[StrictStr] = Field(default=None, description="Filter models by provider name") usage: Optional[CCCompletionUsage] = None additional_properties: Dict[str, Any] = {} diff --git a/src/otari/_client/models/chat_completion_chunk.py b/src/otari/_client/models/chat_completion_chunk.py index 3b6e819..1650b2d 100644 --- a/src/otari/_client/models/chat_completion_chunk.py +++ b/src/otari/_client/models/chat_completion_chunk.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/chat_completion_request.py b/src/otari/_client/models/chat_completion_request.py index 80c0bdf..9c81777 100644 --- a/src/otari/_client/models/chat_completion_request.py +++ b/src/otari/_client/models/chat_completion_request.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -17,13 +17,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional, Union from typing_extensions import Annotated from uuid import UUID from otari._client.models.chat_message_input import ChatMessageInput from otari._client.models.guardrail_config import GuardrailConfig from otari._client.models.mcp_server_config import McpServerConfig +from otari._client.models.stop import Stop from otari._client.models.tool_choice import ToolChoice from typing import Optional, Set from typing_extensions import Self @@ -31,9 +32,12 @@ class ChatCompletionRequest(BaseModel): """ - OpenAI-compatible chat completion request. + OpenAI-compatible chat completion request. The completion-param fields are derived from any-llm's ``CompletionParams`` (see ``_schema_derive``) so the schema cannot silently drop a param any-llm forwards. Fields below either tighten a derived field (``messages``, ``response_format``) or add gateway-internal behavior (``mcp_servers``, ``mcp_server_ids``, ``guardrails``, ``tools_header``, ``max_tool_iterations``) that is stripped before the request is forwarded upstream. """ # noqa: E501 + frequency_penalty: Optional[Union[StrictFloat, StrictInt]] = None guardrails: Optional[Annotated[List[GuardrailConfig], Field(max_length=8)]] = None + logit_bias: Optional[Dict[str, Union[StrictFloat, StrictInt]]] = None + logprobs: Optional[StrictBool] = None max_completion_tokens: Optional[StrictInt] = None max_tokens: Optional[StrictInt] = None max_tool_iterations: Optional[Annotated[int, Field(le=25, strict=True, ge=1)]] = None @@ -41,16 +45,33 @@ class ChatCompletionRequest(BaseModel): mcp_servers: Optional[List[McpServerConfig]] = None messages: Annotated[List[ChatMessageInput], Field(min_length=1)] model: StrictStr + n: Optional[StrictInt] = None + parallel_tool_calls: Optional[StrictBool] = None + presence_penalty: Optional[Union[StrictFloat, StrictInt]] = None + reasoning_effort: Optional[StrictStr] = None response_format: Optional[Dict[str, Any]] = None + seed: Optional[StrictInt] = None + stop: Optional[Stop] = None stream: Optional[StrictBool] = False stream_options: Optional[Dict[str, Any]] = None temperature: Optional[Union[StrictFloat, StrictInt]] = None tool_choice: Optional[ToolChoice] = None tools: Optional[List[Optional[Dict[str, Any]]]] = None - tools_header: Optional[Annotated[str, Field(strict=True, max_length=4000)]] = Field(default=None, description="Optional override for the lead-in that the gateway prepends before the per-tool hint block in the system message. Useful for expressing global tool-selection policy (e.g. 'prefer MCP tools over code_execution'). Falls back to GATEWAY_TOOLS_HEADER env, then to the built-in default.") + tools_header: Optional[Annotated[str, Field(strict=True, max_length=4000)]] = Field(default=None, description="Optional override for the lead-in that the gateway prepends before the per-tool hint block in the system message. Useful for expressing global tool-selection policy (e.g. 'prefer MCP tools over code_execution'). Falls back to OTARI_TOOLS_HEADER env, then to the built-in default.") + top_logprobs: Optional[StrictInt] = None top_p: Optional[Union[StrictFloat, StrictInt]] = None user: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["guardrails", "max_completion_tokens", "max_tokens", "max_tool_iterations", "mcp_server_ids", "mcp_servers", "messages", "model", "response_format", "stream", "stream_options", "temperature", "tool_choice", "tools", "tools_header", "top_p", "user"] + __properties: ClassVar[List[str]] = ["frequency_penalty", "guardrails", "logit_bias", "logprobs", "max_completion_tokens", "max_tokens", "max_tool_iterations", "mcp_server_ids", "mcp_servers", "messages", "model", "n", "parallel_tool_calls", "presence_penalty", "reasoning_effort", "response_format", "seed", "stop", "stream", "stream_options", "temperature", "tool_choice", "tools", "tools_header", "top_logprobs", "top_p", "user"] + + @field_validator('reasoning_effort') + def reasoning_effort_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['none', 'minimal', 'low', 'medium', 'high', 'xhigh', 'max', 'auto']): + raise ValueError("must be one of enum values ('none', 'minimal', 'low', 'medium', 'high', 'xhigh', 'max', 'auto')") + return value model_config = ConfigDict( validate_by_name=True, @@ -112,14 +133,32 @@ def to_dict(self) -> Dict[str, Any]: if _item_messages: _items.append(_item_messages.to_dict()) _dict['messages'] = _items + # override the default output from pydantic by calling `to_dict()` of stop + if self.stop: + _dict['stop'] = self.stop.to_dict() # override the default output from pydantic by calling `to_dict()` of tool_choice if self.tool_choice: _dict['tool_choice'] = self.tool_choice.to_dict() + # set to None if frequency_penalty (nullable) is None + # and model_fields_set contains the field + if self.frequency_penalty is None and "frequency_penalty" in self.model_fields_set: + _dict['frequency_penalty'] = None + # set to None if guardrails (nullable) is None # and model_fields_set contains the field if self.guardrails is None and "guardrails" in self.model_fields_set: _dict['guardrails'] = None + # set to None if logit_bias (nullable) is None + # and model_fields_set contains the field + if self.logit_bias is None and "logit_bias" in self.model_fields_set: + _dict['logit_bias'] = None + + # set to None if logprobs (nullable) is None + # and model_fields_set contains the field + if self.logprobs is None and "logprobs" in self.model_fields_set: + _dict['logprobs'] = None + # set to None if max_completion_tokens (nullable) is None # and model_fields_set contains the field if self.max_completion_tokens is None and "max_completion_tokens" in self.model_fields_set: @@ -145,11 +184,41 @@ def to_dict(self) -> Dict[str, Any]: if self.mcp_servers is None and "mcp_servers" in self.model_fields_set: _dict['mcp_servers'] = None + # set to None if n (nullable) is None + # and model_fields_set contains the field + if self.n is None and "n" in self.model_fields_set: + _dict['n'] = None + + # set to None if parallel_tool_calls (nullable) is None + # and model_fields_set contains the field + if self.parallel_tool_calls is None and "parallel_tool_calls" in self.model_fields_set: + _dict['parallel_tool_calls'] = None + + # set to None if presence_penalty (nullable) is None + # and model_fields_set contains the field + if self.presence_penalty is None and "presence_penalty" in self.model_fields_set: + _dict['presence_penalty'] = None + + # set to None if reasoning_effort (nullable) is None + # and model_fields_set contains the field + if self.reasoning_effort is None and "reasoning_effort" in self.model_fields_set: + _dict['reasoning_effort'] = None + # set to None if response_format (nullable) is None # and model_fields_set contains the field if self.response_format is None and "response_format" in self.model_fields_set: _dict['response_format'] = None + # set to None if seed (nullable) is None + # and model_fields_set contains the field + if self.seed is None and "seed" in self.model_fields_set: + _dict['seed'] = None + + # set to None if stop (nullable) is None + # and model_fields_set contains the field + if self.stop is None and "stop" in self.model_fields_set: + _dict['stop'] = None + # set to None if stream_options (nullable) is None # and model_fields_set contains the field if self.stream_options is None and "stream_options" in self.model_fields_set: @@ -175,6 +244,11 @@ def to_dict(self) -> Dict[str, Any]: if self.tools_header is None and "tools_header" in self.model_fields_set: _dict['tools_header'] = None + # set to None if top_logprobs (nullable) is None + # and model_fields_set contains the field + if self.top_logprobs is None and "top_logprobs" in self.model_fields_set: + _dict['top_logprobs'] = None + # set to None if top_p (nullable) is None # and model_fields_set contains the field if self.top_p is None and "top_p" in self.model_fields_set: @@ -197,7 +271,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "frequency_penalty": obj.get("frequency_penalty"), "guardrails": [GuardrailConfig.from_dict(_item) for _item in obj["guardrails"]] if obj.get("guardrails") is not None else None, + "logit_bias": obj.get("logit_bias"), + "logprobs": obj.get("logprobs"), "max_completion_tokens": obj.get("max_completion_tokens"), "max_tokens": obj.get("max_tokens"), "max_tool_iterations": obj.get("max_tool_iterations"), @@ -205,13 +282,20 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "mcp_servers": [McpServerConfig.from_dict(_item) for _item in obj["mcp_servers"]] if obj.get("mcp_servers") is not None else None, "messages": [ChatMessageInput.from_dict(_item) for _item in obj["messages"]] if obj.get("messages") is not None else None, "model": obj.get("model"), + "n": obj.get("n"), + "parallel_tool_calls": obj.get("parallel_tool_calls"), + "presence_penalty": obj.get("presence_penalty"), + "reasoning_effort": obj.get("reasoning_effort"), "response_format": obj.get("response_format"), + "seed": obj.get("seed"), + "stop": Stop.from_dict(obj["stop"]) if obj.get("stop") is not None else None, "stream": obj.get("stream") if obj.get("stream") is not None else False, "stream_options": obj.get("stream_options"), "temperature": obj.get("temperature"), "tool_choice": ToolChoice.from_dict(obj["tool_choice"]) if obj.get("tool_choice") is not None else None, "tools": obj.get("tools"), "tools_header": obj.get("tools_header"), + "top_logprobs": obj.get("top_logprobs"), "top_p": obj.get("top_p"), "user": obj.get("user") }) diff --git a/src/otari/_client/models/chat_message_input.py b/src/otari/_client/models/chat_message_input.py index 0c59fce..293271c 100644 --- a/src/otari/_client/models/chat_message_input.py +++ b/src/otari/_client/models/chat_message_input.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/content.py b/src/otari/_client/models/content.py index b03a3aa..e82740d 100644 --- a/src/otari/_client/models/content.py +++ b/src/otari/_client/models/content.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/content1.py b/src/otari/_client/models/content1.py index 2bd24ef..621772b 100644 --- a/src/otari/_client/models/content1.py +++ b/src/otari/_client/models/content1.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/content2.py b/src/otari/_client/models/content2.py index b56eebf..bcfe5c0 100644 --- a/src/otari/_client/models/content2.py +++ b/src/otari/_client/models/content2.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/content2_any_of_inner.py b/src/otari/_client/models/content2_any_of_inner.py index 40320a0..ac41fe0 100644 --- a/src/otari/_client/models/content2_any_of_inner.py +++ b/src/otari/_client/models/content2_any_of_inner.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/content3.py b/src/otari/_client/models/content3.py index c684bbe..ad18554 100644 --- a/src/otari/_client/models/content3.py +++ b/src/otari/_client/models/content3.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/content4.py b/src/otari/_client/models/content4.py index e1b3b2f..141f1fa 100644 --- a/src/otari/_client/models/content4.py +++ b/src/otari/_client/models/content4.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/content5.py b/src/otari/_client/models/content5.py index 7139a32..fca05cf 100644 --- a/src/otari/_client/models/content5.py +++ b/src/otari/_client/models/content5.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/content6.py b/src/otari/_client/models/content6.py index 9d80fde..b070cb1 100644 --- a/src/otari/_client/models/content6.py +++ b/src/otari/_client/models/content6.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/content7.py b/src/otari/_client/models/content7.py index 9d8702a..00dac32 100644 --- a/src/otari/_client/models/content7.py +++ b/src/otari/_client/models/content7.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/content8.py b/src/otari/_client/models/content8.py index a745767..912ede7 100644 --- a/src/otari/_client/models/content8.py +++ b/src/otari/_client/models/content8.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/content9_inner.py b/src/otari/_client/models/content9_inner.py index b4fc172..c3291fe 100644 --- a/src/otari/_client/models/content9_inner.py +++ b/src/otari/_client/models/content9_inner.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/content_any_of_inner.py b/src/otari/_client/models/content_any_of_inner.py index d58b39f..190701b 100644 --- a/src/otari/_client/models/content_any_of_inner.py +++ b/src/otari/_client/models/content_any_of_inner.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/conversation.py b/src/otari/_client/models/conversation.py new file mode 100644 index 0000000..a74b39b --- /dev/null +++ b/src/otari/_client/models/conversation.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" + otari + + Otari, an OpenAI-compatible LLM gateway with API key management + + The version of the OpenAPI document: 0.0.0-dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +from inspect import getfullargspec +import json +import pprint +import re # noqa: F401 +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, Dict, Optional +from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict +from typing_extensions import Literal, Self +from pydantic import Field + +CONVERSATION_ANY_OF_SCHEMAS = ["Dict[str, object]", "str"] + +class Conversation(BaseModel): + """ + Conversation + """ + + # data type: str + anyof_schema_1_validator: Optional[StrictStr] = Field(default=None, description="Filter models by provider name") + # data type: Dict[str, object] + anyof_schema_2_validator: Optional[Dict[str, Any]] = None + if TYPE_CHECKING: + actual_instance: Optional[Union[Dict[str, object], str]] = None + else: + actual_instance: Any = None + any_of_schemas: Set[str] = { "Dict[str, object]", "str" } + + model_config = { + "validate_assignment": True, + "protected_namespaces": (), + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_anyof(cls, v): + if v is None: + return v + + instance = Conversation.model_construct() + error_messages = [] + # validate data type: str + try: + instance.anyof_schema_1_validator = v + return v + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # validate data type: Dict[str, object] + try: + instance.anyof_schema_2_validator = v + return v + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + if error_messages: + # no match + raise ValueError("No match found when setting the actual_instance in Conversation with anyOf schemas: Dict[str, object], str. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Dict[str, Any]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + if json_str is None: + return instance + + error_messages = [] + # deserialize data into str + try: + # validation + instance.anyof_schema_1_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.anyof_schema_1_validator + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Dict[str, object] + try: + # validation + instance.anyof_schema_2_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.anyof_schema_2_validator + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if error_messages: + # no match + raise ValueError("No match found when deserializing the JSON string into Conversation with anyOf schemas: Dict[str, object], str. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], Dict[str, object], str]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/src/otari/_client/models/count_tokens_request.py b/src/otari/_client/models/count_tokens_request.py index 74f9ac3..e331db5 100644 --- a/src/otari/_client/models/count_tokens_request.py +++ b/src/otari/_client/models/count_tokens_request.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/count_tokens_response.py b/src/otari/_client/models/count_tokens_response.py index 50f1347..744ad13 100644 --- a/src/otari/_client/models/count_tokens_response.py +++ b/src/otari/_client/models/count_tokens_response.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/create_batch_request.py b/src/otari/_client/models/create_batch_request.py index 0a6f3dc..63571ef 100644 --- a/src/otari/_client/models/create_batch_request.py +++ b/src/otari/_client/models/create_batch_request.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/create_budget_request.py b/src/otari/_client/models/create_budget_request.py index e9f8a41..25512a2 100644 --- a/src/otari/_client/models/create_budget_request.py +++ b/src/otari/_client/models/create_budget_request.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/create_embedding_response.py b/src/otari/_client/models/create_embedding_response.py index 4b1ef54..7af7334 100644 --- a/src/otari/_client/models/create_embedding_response.py +++ b/src/otari/_client/models/create_embedding_response.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/create_key_request.py b/src/otari/_client/models/create_key_request.py index 114145f..c43a498 100644 --- a/src/otari/_client/models/create_key_request.py +++ b/src/otari/_client/models/create_key_request.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/create_key_response.py b/src/otari/_client/models/create_key_response.py index d279801..f94f286 100644 --- a/src/otari/_client/models/create_key_response.py +++ b/src/otari/_client/models/create_key_response.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/create_user_request.py b/src/otari/_client/models/create_user_request.py index 1003904..168bd9a 100644 --- a/src/otari/_client/models/create_user_request.py +++ b/src/otari/_client/models/create_user_request.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/emb_embedding.py b/src/otari/_client/models/emb_embedding.py index 4cef120..e5af620 100644 --- a/src/otari/_client/models/emb_embedding.py +++ b/src/otari/_client/models/emb_embedding.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/emb_usage.py b/src/otari/_client/models/emb_usage.py index 4bbc5be..bbb1871 100644 --- a/src/otari/_client/models/emb_usage.py +++ b/src/otari/_client/models/emb_usage.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/embedding_request.py b/src/otari/_client/models/embedding_request.py index 4ab6215..1e8dc68 100644 --- a/src/otari/_client/models/embedding_request.py +++ b/src/otari/_client/models/embedding_request.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/guardrail_config.py b/src/otari/_client/models/guardrail_config.py index 89d663d..f6a9560 100644 --- a/src/otari/_client/models/guardrail_config.py +++ b/src/otari/_client/models/guardrail_config.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -26,7 +26,7 @@ class GuardrailConfig(BaseModel): """ - A single guardrail check the caller wants the gateway to enforce. URL safety: when ``url`` is supplied it is validated at parse time with the same SSRF guard used for MCP server URLs (loopback allowed by default for same-host sidecars; gated by ``GATEWAY_MCP_ALLOW_LOOPBACK`` / ``GATEWAY_MCP_ALLOW_PRIVATE_HOSTS``). Most deployments omit ``url`` and rely on the operator-set ``GATEWAY_GUARDRAILS_URL`` instead. + A single guardrail check the caller wants the gateway to enforce. URL safety: when ``url`` is supplied it is validated at parse time with the same SSRF guard used for MCP server URLs (loopback allowed by default for same-host sidecars; gated by ``OTARI_MCP_ALLOW_LOOPBACK`` / ``OTARI_MCP_ALLOW_PRIVATE_HOSTS``). Most deployments omit ``url`` and rely on the operator-set ``OTARI_GUARDRAILS_URL`` instead. """ # noqa: E501 mode: Optional[StrictStr] = 'monitor' on: Optional[List[StrictStr]] = None diff --git a/src/otari/_client/models/http_validation_error.py b/src/otari/_client/models/http_validation_error.py index 9adaa01..7316871 100644 --- a/src/otari/_client/models/http_validation_error.py +++ b/src/otari/_client/models/http_validation_error.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/image_generation_request.py b/src/otari/_client/models/image_generation_request.py index 7452d9f..84ffe0e 100644 --- a/src/otari/_client/models/image_generation_request.py +++ b/src/otari/_client/models/image_generation_request.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -25,7 +25,7 @@ class ImageGenerationRequest(BaseModel): """ - OpenAI-compatible image generation request. + OpenAI-compatible image generation request. Fields are derived from any-llm's ``ImageGenerationParams`` (see ``_schema_derive``) so the schema cannot silently drop a param any-llm forwards. """ # noqa: E501 model: StrictStr n: Optional[StrictInt] = None diff --git a/src/otari/_client/models/images_response.py b/src/otari/_client/models/images_response.py new file mode 100644 index 0000000..0af3d89 --- /dev/null +++ b/src/otari/_client/models/images_response.py @@ -0,0 +1,195 @@ +# coding: utf-8 + +""" + otari + + Otari, an OpenAI-compatible LLM gateway with API key management + + The version of the OpenAPI document: 0.0.0-dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from otari._client.models.img_image import IMGImage +from otari._client.models.img_usage import IMGUsage +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ImagesResponse(BaseModel): + """ + The response from the image generation endpoint. + """ # noqa: E501 + created: StrictInt + background: Optional[StrictStr] = None + data: Optional[List[IMGImage]] = None + output_format: Optional[StrictStr] = None + quality: Optional[StrictStr] = None + size: Optional[StrictStr] = None + usage: Optional[IMGUsage] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["created", "background", "data", "output_format", "quality", "size", "usage"] + + @field_validator('background') + def background_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['transparent', 'opaque']): + raise ValueError("must be one of enum values ('transparent', 'opaque')") + return value + + @field_validator('output_format') + def output_format_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['png', 'webp', 'jpeg']): + raise ValueError("must be one of enum values ('png', 'webp', 'jpeg')") + return value + + @field_validator('quality') + def quality_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['low', 'medium', 'high']): + raise ValueError("must be one of enum values ('low', 'medium', 'high')") + return value + + @field_validator('size') + def size_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['1024x1024', '1024x1536', '1536x1024']): + raise ValueError("must be one of enum values ('1024x1024', '1024x1536', '1536x1024')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ImagesResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of usage + if self.usage: + _dict['usage'] = self.usage.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if background (nullable) is None + # and model_fields_set contains the field + if self.background is None and "background" in self.model_fields_set: + _dict['background'] = None + + # set to None if data (nullable) is None + # and model_fields_set contains the field + if self.data is None and "data" in self.model_fields_set: + _dict['data'] = None + + # set to None if output_format (nullable) is None + # and model_fields_set contains the field + if self.output_format is None and "output_format" in self.model_fields_set: + _dict['output_format'] = None + + # set to None if quality (nullable) is None + # and model_fields_set contains the field + if self.quality is None and "quality" in self.model_fields_set: + _dict['quality'] = None + + # set to None if size (nullable) is None + # and model_fields_set contains the field + if self.size is None and "size" in self.model_fields_set: + _dict['size'] = None + + # set to None if usage (nullable) is None + # and model_fields_set contains the field + if self.usage is None and "usage" in self.model_fields_set: + _dict['usage'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ImagesResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "created": obj.get("created"), + "background": obj.get("background"), + "data": [IMGImage.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "output_format": obj.get("output_format"), + "quality": obj.get("quality"), + "size": obj.get("size"), + "usage": IMGUsage.from_dict(obj["usage"]) if obj.get("usage") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/src/otari/_client/models/img_image.py b/src/otari/_client/models/img_image.py new file mode 100644 index 0000000..1b824a0 --- /dev/null +++ b/src/otari/_client/models/img_image.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + otari + + Otari, an OpenAI-compatible LLM gateway with API key management + + The version of the OpenAPI document: 0.0.0-dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class IMGImage(BaseModel): + """ + Represents the content or the URL of an image generated by the OpenAI API. + """ # noqa: E501 + b64_json: Optional[StrictStr] = Field(default=None, description="Filter models by provider name") + revised_prompt: Optional[StrictStr] = Field(default=None, description="Filter models by provider name") + url: Optional[StrictStr] = Field(default=None, description="Filter models by provider name") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["b64_json", "revised_prompt", "url"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IMGImage from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if b64_json (nullable) is None + # and model_fields_set contains the field + if self.b64_json is None and "b64_json" in self.model_fields_set: + _dict['b64_json'] = None + + # set to None if revised_prompt (nullable) is None + # and model_fields_set contains the field + if self.revised_prompt is None and "revised_prompt" in self.model_fields_set: + _dict['revised_prompt'] = None + + # set to None if url (nullable) is None + # and model_fields_set contains the field + if self.url is None and "url" in self.model_fields_set: + _dict['url'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IMGImage from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "b64_json": obj.get("b64_json"), + "revised_prompt": obj.get("revised_prompt"), + "url": obj.get("url") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/src/otari/_client/models/img_usage.py b/src/otari/_client/models/img_usage.py new file mode 100644 index 0000000..a3d9bd1 --- /dev/null +++ b/src/otari/_client/models/img_usage.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + otari + + Otari, an OpenAI-compatible LLM gateway with API key management + + The version of the OpenAPI document: 0.0.0-dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from otari._client.models.img_usage_input_tokens_details import IMGUsageInputTokensDetails +from otari._client.models.img_usage_output_tokens_details import IMGUsageOutputTokensDetails +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class IMGUsage(BaseModel): + """ + For `gpt-image-1` only, the token usage information for the image generation. + """ # noqa: E501 + input_tokens: StrictInt + input_tokens_details: IMGUsageInputTokensDetails + output_tokens: StrictInt + total_tokens: StrictInt + output_tokens_details: Optional[IMGUsageOutputTokensDetails] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["input_tokens", "input_tokens_details", "output_tokens", "total_tokens", "output_tokens_details"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IMGUsage from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of input_tokens_details + if self.input_tokens_details: + _dict['input_tokens_details'] = self.input_tokens_details.to_dict() + # override the default output from pydantic by calling `to_dict()` of output_tokens_details + if self.output_tokens_details: + _dict['output_tokens_details'] = self.output_tokens_details.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if output_tokens_details (nullable) is None + # and model_fields_set contains the field + if self.output_tokens_details is None and "output_tokens_details" in self.model_fields_set: + _dict['output_tokens_details'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IMGUsage from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "input_tokens": obj.get("input_tokens"), + "input_tokens_details": IMGUsageInputTokensDetails.from_dict(obj["input_tokens_details"]) if obj.get("input_tokens_details") is not None else None, + "output_tokens": obj.get("output_tokens"), + "total_tokens": obj.get("total_tokens"), + "output_tokens_details": IMGUsageOutputTokensDetails.from_dict(obj["output_tokens_details"]) if obj.get("output_tokens_details") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/src/otari/_client/models/img_usage_input_tokens_details.py b/src/otari/_client/models/img_usage_input_tokens_details.py new file mode 100644 index 0000000..50e5876 --- /dev/null +++ b/src/otari/_client/models/img_usage_input_tokens_details.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + otari + + Otari, an OpenAI-compatible LLM gateway with API key management + + The version of the OpenAPI document: 0.0.0-dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class IMGUsageInputTokensDetails(BaseModel): + """ + The input tokens detailed information for the image generation. + """ # noqa: E501 + image_tokens: StrictInt + text_tokens: StrictInt + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["image_tokens", "text_tokens"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IMGUsageInputTokensDetails from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IMGUsageInputTokensDetails from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "image_tokens": obj.get("image_tokens"), + "text_tokens": obj.get("text_tokens") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/src/otari/_client/models/img_usage_output_tokens_details.py b/src/otari/_client/models/img_usage_output_tokens_details.py new file mode 100644 index 0000000..762b237 --- /dev/null +++ b/src/otari/_client/models/img_usage_output_tokens_details.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + otari + + Otari, an OpenAI-compatible LLM gateway with API key management + + The version of the OpenAPI document: 0.0.0-dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class IMGUsageOutputTokensDetails(BaseModel): + """ + The output token details for the image generation. + """ # noqa: E501 + image_tokens: StrictInt + text_tokens: StrictInt + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["image_tokens", "text_tokens"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IMGUsageOutputTokensDetails from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IMGUsageOutputTokensDetails from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "image_tokens": obj.get("image_tokens"), + "text_tokens": obj.get("text_tokens") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/src/otari/_client/models/input.py b/src/otari/_client/models/input.py index 90b6639..9ec3ecf 100644 --- a/src/otari/_client/models/input.py +++ b/src/otari/_client/models/input.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/input1.py b/src/otari/_client/models/input1.py index 47fa16d..0c733ae 100644 --- a/src/otari/_client/models/input1.py +++ b/src/otari/_client/models/input1.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -31,7 +31,7 @@ class Input1(BaseModel): """ # data type: str - anyof_schema_1_validator: Optional[StrictStr] = Field(default=None, description="Filter models by provider name") + anyof_schema_1_validator: Optional[StrictStr] = None # data type: List[str] anyof_schema_2_validator: Optional[List[StrictStr]] = None # data type: List[Dict[str, object]] diff --git a/src/otari/_client/models/key_info.py b/src/otari/_client/models/key_info.py index e018dd0..b3f52f3 100644 --- a/src/otari/_client/models/key_info.py +++ b/src/otari/_client/models/key_info.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/location_inner.py b/src/otari/_client/models/location_inner.py index 502dd3d..da39cc0 100644 --- a/src/otari/_client/models/location_inner.py +++ b/src/otari/_client/models/location_inner.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/mcp_server_config.py b/src/otari/_client/models/mcp_server_config.py index f66ffa0..f1f286c 100644 --- a/src/otari/_client/models/mcp_server_config.py +++ b/src/otari/_client/models/mcp_server_config.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -26,7 +26,7 @@ class McpServerConfig(BaseModel): """ - Inline MCP server configuration accepted on the chat completions request. Streamable HTTP transport. The `url` must be reachable from the gateway process. URL safety is enforced at parse time: * SSRF guard rejects private, link-local, and reserved IP ranges. Loopback is allowed by default (sidecars, dev) — set ``GATEWAY_MCP_ALLOW_LOOPBACK=false`` to disable. * Plain ``http://`` is rejected when ``authorization_token`` is set, to keep bearer tokens off the wire in cleartext. + Inline MCP server configuration accepted on the chat completions request. Streamable HTTP transport. The `url` must be reachable from the gateway process. URL safety is enforced at parse time: * SSRF guard rejects private, link-local, and reserved IP ranges. Loopback is allowed by default (sidecars, dev) — set ``OTARI_MCP_ALLOW_LOOPBACK=false`` to disable. * Plain ``http://`` is rejected when ``authorization_token`` is set, to keep bearer tokens off the wire in cleartext. """ # noqa: E501 allowed_tools: Optional[List[StrictStr]] = None authorization_token: Optional[StrictStr] = None diff --git a/src/otari/_client/models/message_response.py b/src/otari/_client/models/message_response.py index b8f2149..601cc00 100644 --- a/src/otari/_client/models/message_response.py +++ b/src/otari/_client/models/message_response.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/messages_request.py b/src/otari/_client/models/messages_request.py index 1d9e9d7..2722a39 100644 --- a/src/otari/_client/models/messages_request.py +++ b/src/otari/_client/models/messages_request.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -23,14 +23,14 @@ from uuid import UUID from otari._client.models.guardrail_config import GuardrailConfig from otari._client.models.mcp_server_config import McpServerConfig -from otari._client.models.system1 import System1 +from otari._client.models.system import System from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python class MessagesRequest(BaseModel): """ - Anthropic Messages API-compatible request. Gateway-internal fields (``mcp_servers``, ``mcp_server_ids``, ``guardrails``, ``tools_header``, ``max_tool_iterations``) opt the request into gateway-managed MCP / sandbox / web_search / guardrails without changing the upstream wire shape. They're stripped before the request is forwarded. + Anthropic Messages API-compatible request. The wire fields are derived from any-llm's ``MessagesParams`` (see ``_schema_derive``) so the schema cannot silently drop a param any-llm forwards. Gateway-internal fields (``mcp_servers``, ``mcp_server_ids``, ``guardrails``, ``tools_header``, ``max_tool_iterations``) opt the request into gateway-managed MCP / sandbox / web_search / guardrails without changing the upstream wire shape. They're stripped before the request is forwarded. """ # noqa: E501 cache_control: Optional[Dict[str, Any]] = None guardrails: Optional[Annotated[List[GuardrailConfig], Field(max_length=8)]] = None @@ -43,7 +43,7 @@ class MessagesRequest(BaseModel): model: StrictStr stop_sequences: Optional[List[StrictStr]] = None stream: Optional[StrictBool] = False - system: Optional[System1] = None + system: Optional[System] = None temperature: Optional[Union[StrictFloat, StrictInt]] = None thinking: Optional[Dict[str, Any]] = None tool_choice: Optional[Dict[str, Any]] = None @@ -207,7 +207,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "model": obj.get("model"), "stop_sequences": obj.get("stop_sequences"), "stream": obj.get("stream") if obj.get("stream") is not None else False, - "system": System1.from_dict(obj["system"]) if obj.get("system") is not None else None, + "system": System.from_dict(obj["system"]) if obj.get("system") is not None else None, "temperature": obj.get("temperature"), "thinking": obj.get("thinking"), "tool_choice": obj.get("tool_choice"), diff --git a/src/otari/_client/models/model.py b/src/otari/_client/models/model.py index 86ca45a..b4ccbbb 100644 --- a/src/otari/_client/models/model.py +++ b/src/otari/_client/models/model.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/model_list_response.py b/src/otari/_client/models/model_list_response.py index 8c8dedb..3dfaaf5 100644 --- a/src/otari/_client/models/model_list_response.py +++ b/src/otari/_client/models/model_list_response.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/model_object.py b/src/otari/_client/models/model_object.py index 6c58a63..c96fa7f 100644 --- a/src/otari/_client/models/model_object.py +++ b/src/otari/_client/models/model_object.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/model_pricing_info.py b/src/otari/_client/models/model_pricing_info.py index 53b91c6..12f67e1 100644 --- a/src/otari/_client/models/model_pricing_info.py +++ b/src/otari/_client/models/model_pricing_info.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/moderation_request.py b/src/otari/_client/models/moderation_request.py index f88e3e0..aded4b3 100644 --- a/src/otari/_client/models/moderation_request.py +++ b/src/otari/_client/models/moderation_request.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/moderation_response.py b/src/otari/_client/models/moderation_response.py index 1e1e198..b1afb7b 100644 --- a/src/otari/_client/models/moderation_response.py +++ b/src/otari/_client/models/moderation_response.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/moderation_result.py b/src/otari/_client/models/moderation_result.py index 228785d..aeeaaaf 100644 --- a/src/otari/_client/models/moderation_result.py +++ b/src/otari/_client/models/moderation_result.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/mr_base64_pdf_source.py b/src/otari/_client/models/mr_base64_pdf_source.py index 1a75703..4ca361b 100644 --- a/src/otari/_client/models/mr_base64_pdf_source.py +++ b/src/otari/_client/models/mr_base64_pdf_source.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/mr_bash_code_execution_output_block.py b/src/otari/_client/models/mr_bash_code_execution_output_block.py index de705c2..af44d3f 100644 --- a/src/otari/_client/models/mr_bash_code_execution_output_block.py +++ b/src/otari/_client/models/mr_bash_code_execution_output_block.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/mr_bash_code_execution_result_block.py b/src/otari/_client/models/mr_bash_code_execution_result_block.py index 6f0284e..aab683a 100644 --- a/src/otari/_client/models/mr_bash_code_execution_result_block.py +++ b/src/otari/_client/models/mr_bash_code_execution_result_block.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/mr_bash_code_execution_tool_result_block.py b/src/otari/_client/models/mr_bash_code_execution_tool_result_block.py index 2c81ae0..d4503ca 100644 --- a/src/otari/_client/models/mr_bash_code_execution_tool_result_block.py +++ b/src/otari/_client/models/mr_bash_code_execution_tool_result_block.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/mr_bash_code_execution_tool_result_error.py b/src/otari/_client/models/mr_bash_code_execution_tool_result_error.py index 1e778a3..65ce09a 100644 --- a/src/otari/_client/models/mr_bash_code_execution_tool_result_error.py +++ b/src/otari/_client/models/mr_bash_code_execution_tool_result_error.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/mr_cache_creation.py b/src/otari/_client/models/mr_cache_creation.py index 72cf31a..c8702a3 100644 --- a/src/otari/_client/models/mr_cache_creation.py +++ b/src/otari/_client/models/mr_cache_creation.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/mr_citation_char_location.py b/src/otari/_client/models/mr_citation_char_location.py index e89c000..77ee819 100644 --- a/src/otari/_client/models/mr_citation_char_location.py +++ b/src/otari/_client/models/mr_citation_char_location.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/mr_citation_content_block_location.py b/src/otari/_client/models/mr_citation_content_block_location.py index 44eb0ef..82a4130 100644 --- a/src/otari/_client/models/mr_citation_content_block_location.py +++ b/src/otari/_client/models/mr_citation_content_block_location.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/mr_citation_page_location.py b/src/otari/_client/models/mr_citation_page_location.py index f25af13..a439b4d 100644 --- a/src/otari/_client/models/mr_citation_page_location.py +++ b/src/otari/_client/models/mr_citation_page_location.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/mr_citations_config.py b/src/otari/_client/models/mr_citations_config.py index d28a098..a8b0abc 100644 --- a/src/otari/_client/models/mr_citations_config.py +++ b/src/otari/_client/models/mr_citations_config.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/mr_citations_search_result_location.py b/src/otari/_client/models/mr_citations_search_result_location.py index d4c7b24..c4000c5 100644 --- a/src/otari/_client/models/mr_citations_search_result_location.py +++ b/src/otari/_client/models/mr_citations_search_result_location.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/mr_citations_web_search_result_location.py b/src/otari/_client/models/mr_citations_web_search_result_location.py index 0cac01d..ccc3528 100644 --- a/src/otari/_client/models/mr_citations_web_search_result_location.py +++ b/src/otari/_client/models/mr_citations_web_search_result_location.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/mr_code_execution_output_block.py b/src/otari/_client/models/mr_code_execution_output_block.py index f7ec443..f1c4aac 100644 --- a/src/otari/_client/models/mr_code_execution_output_block.py +++ b/src/otari/_client/models/mr_code_execution_output_block.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/mr_code_execution_result_block.py b/src/otari/_client/models/mr_code_execution_result_block.py index d806e2a..2844b19 100644 --- a/src/otari/_client/models/mr_code_execution_result_block.py +++ b/src/otari/_client/models/mr_code_execution_result_block.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/mr_code_execution_tool_result_block.py b/src/otari/_client/models/mr_code_execution_tool_result_block.py index 4425e2c..290943f 100644 --- a/src/otari/_client/models/mr_code_execution_tool_result_block.py +++ b/src/otari/_client/models/mr_code_execution_tool_result_block.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/mr_code_execution_tool_result_error.py b/src/otari/_client/models/mr_code_execution_tool_result_error.py index 9607d88..c248d25 100644 --- a/src/otari/_client/models/mr_code_execution_tool_result_error.py +++ b/src/otari/_client/models/mr_code_execution_tool_result_error.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/mr_container.py b/src/otari/_client/models/mr_container.py index f6138a1..0f21e15 100644 --- a/src/otari/_client/models/mr_container.py +++ b/src/otari/_client/models/mr_container.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/mr_container_upload_block.py b/src/otari/_client/models/mr_container_upload_block.py index 71c88b7..8d4af0e 100644 --- a/src/otari/_client/models/mr_container_upload_block.py +++ b/src/otari/_client/models/mr_container_upload_block.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/mr_direct_caller.py b/src/otari/_client/models/mr_direct_caller.py index 89402a7..82a65f8 100644 --- a/src/otari/_client/models/mr_direct_caller.py +++ b/src/otari/_client/models/mr_direct_caller.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/mr_document_block.py b/src/otari/_client/models/mr_document_block.py index 659ffe3..a71948d 100644 --- a/src/otari/_client/models/mr_document_block.py +++ b/src/otari/_client/models/mr_document_block.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/mr_encrypted_code_execution_result_block.py b/src/otari/_client/models/mr_encrypted_code_execution_result_block.py index 3b19632..0cd2288 100644 --- a/src/otari/_client/models/mr_encrypted_code_execution_result_block.py +++ b/src/otari/_client/models/mr_encrypted_code_execution_result_block.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/mr_plain_text_source.py b/src/otari/_client/models/mr_plain_text_source.py index 0f8c0cf..396af6d 100644 --- a/src/otari/_client/models/mr_plain_text_source.py +++ b/src/otari/_client/models/mr_plain_text_source.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/mr_redacted_thinking_block.py b/src/otari/_client/models/mr_redacted_thinking_block.py index d7f9321..542c1fc 100644 --- a/src/otari/_client/models/mr_redacted_thinking_block.py +++ b/src/otari/_client/models/mr_redacted_thinking_block.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/mr_refusal_stop_details.py b/src/otari/_client/models/mr_refusal_stop_details.py index aa50caf..972ef18 100644 --- a/src/otari/_client/models/mr_refusal_stop_details.py +++ b/src/otari/_client/models/mr_refusal_stop_details.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/mr_server_tool_caller.py b/src/otari/_client/models/mr_server_tool_caller.py index 7d7c1c2..335a283 100644 --- a/src/otari/_client/models/mr_server_tool_caller.py +++ b/src/otari/_client/models/mr_server_tool_caller.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/mr_server_tool_caller20260120.py b/src/otari/_client/models/mr_server_tool_caller20260120.py index 32cefc1..7b52504 100644 --- a/src/otari/_client/models/mr_server_tool_caller20260120.py +++ b/src/otari/_client/models/mr_server_tool_caller20260120.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/mr_server_tool_usage.py b/src/otari/_client/models/mr_server_tool_usage.py index 33e9b68..bfe86f6 100644 --- a/src/otari/_client/models/mr_server_tool_usage.py +++ b/src/otari/_client/models/mr_server_tool_usage.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/mr_server_tool_use_block.py b/src/otari/_client/models/mr_server_tool_use_block.py index 85e3bb8..ffa270f 100644 --- a/src/otari/_client/models/mr_server_tool_use_block.py +++ b/src/otari/_client/models/mr_server_tool_use_block.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/mr_text_block.py b/src/otari/_client/models/mr_text_block.py index 68f23d3..3f045bf 100644 --- a/src/otari/_client/models/mr_text_block.py +++ b/src/otari/_client/models/mr_text_block.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/mr_text_block_citations_inner.py b/src/otari/_client/models/mr_text_block_citations_inner.py index 0f9c048..344c631 100644 --- a/src/otari/_client/models/mr_text_block_citations_inner.py +++ b/src/otari/_client/models/mr_text_block_citations_inner.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/mr_text_editor_code_execution_create_result_block.py b/src/otari/_client/models/mr_text_editor_code_execution_create_result_block.py index aff6721..1c879c0 100644 --- a/src/otari/_client/models/mr_text_editor_code_execution_create_result_block.py +++ b/src/otari/_client/models/mr_text_editor_code_execution_create_result_block.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/mr_text_editor_code_execution_str_replace_result_block.py b/src/otari/_client/models/mr_text_editor_code_execution_str_replace_result_block.py index c87747a..255c474 100644 --- a/src/otari/_client/models/mr_text_editor_code_execution_str_replace_result_block.py +++ b/src/otari/_client/models/mr_text_editor_code_execution_str_replace_result_block.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/mr_text_editor_code_execution_tool_result_block.py b/src/otari/_client/models/mr_text_editor_code_execution_tool_result_block.py index df4a3b9..feba4d0 100644 --- a/src/otari/_client/models/mr_text_editor_code_execution_tool_result_block.py +++ b/src/otari/_client/models/mr_text_editor_code_execution_tool_result_block.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/mr_text_editor_code_execution_tool_result_error.py b/src/otari/_client/models/mr_text_editor_code_execution_tool_result_error.py index 835e761..b8630ed 100644 --- a/src/otari/_client/models/mr_text_editor_code_execution_tool_result_error.py +++ b/src/otari/_client/models/mr_text_editor_code_execution_tool_result_error.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/mr_text_editor_code_execution_view_result_block.py b/src/otari/_client/models/mr_text_editor_code_execution_view_result_block.py index cb3dfa1..19b1062 100644 --- a/src/otari/_client/models/mr_text_editor_code_execution_view_result_block.py +++ b/src/otari/_client/models/mr_text_editor_code_execution_view_result_block.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/mr_thinking_block.py b/src/otari/_client/models/mr_thinking_block.py index a0596bd..f228d93 100644 --- a/src/otari/_client/models/mr_thinking_block.py +++ b/src/otari/_client/models/mr_thinking_block.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/mr_tool_reference_block.py b/src/otari/_client/models/mr_tool_reference_block.py index 0f9190c..5dfce59 100644 --- a/src/otari/_client/models/mr_tool_reference_block.py +++ b/src/otari/_client/models/mr_tool_reference_block.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/mr_tool_search_tool_result_block.py b/src/otari/_client/models/mr_tool_search_tool_result_block.py index ba42f16..843bc98 100644 --- a/src/otari/_client/models/mr_tool_search_tool_result_block.py +++ b/src/otari/_client/models/mr_tool_search_tool_result_block.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/mr_tool_search_tool_result_error.py b/src/otari/_client/models/mr_tool_search_tool_result_error.py index 9d456e6..153e2ac 100644 --- a/src/otari/_client/models/mr_tool_search_tool_result_error.py +++ b/src/otari/_client/models/mr_tool_search_tool_result_error.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/mr_tool_search_tool_search_result_block.py b/src/otari/_client/models/mr_tool_search_tool_search_result_block.py index 7e6ec0d..288f7a3 100644 --- a/src/otari/_client/models/mr_tool_search_tool_search_result_block.py +++ b/src/otari/_client/models/mr_tool_search_tool_search_result_block.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/mr_tool_use_block.py b/src/otari/_client/models/mr_tool_use_block.py index f291389..8c26f31 100644 --- a/src/otari/_client/models/mr_tool_use_block.py +++ b/src/otari/_client/models/mr_tool_use_block.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/mr_usage.py b/src/otari/_client/models/mr_usage.py index d9f799c..c811895 100644 --- a/src/otari/_client/models/mr_usage.py +++ b/src/otari/_client/models/mr_usage.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/mr_web_fetch_block.py b/src/otari/_client/models/mr_web_fetch_block.py index 9008b44..4d5635c 100644 --- a/src/otari/_client/models/mr_web_fetch_block.py +++ b/src/otari/_client/models/mr_web_fetch_block.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/mr_web_fetch_tool_result_block.py b/src/otari/_client/models/mr_web_fetch_tool_result_block.py index be167d8..4f0bc1b 100644 --- a/src/otari/_client/models/mr_web_fetch_tool_result_block.py +++ b/src/otari/_client/models/mr_web_fetch_tool_result_block.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/mr_web_fetch_tool_result_error_block.py b/src/otari/_client/models/mr_web_fetch_tool_result_error_block.py index ae3c349..7ab44a0 100644 --- a/src/otari/_client/models/mr_web_fetch_tool_result_error_block.py +++ b/src/otari/_client/models/mr_web_fetch_tool_result_error_block.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/mr_web_search_result_block.py b/src/otari/_client/models/mr_web_search_result_block.py index 7aea46b..f044cce 100644 --- a/src/otari/_client/models/mr_web_search_result_block.py +++ b/src/otari/_client/models/mr_web_search_result_block.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/mr_web_search_tool_result_block.py b/src/otari/_client/models/mr_web_search_tool_result_block.py index a50cf76..b69c985 100644 --- a/src/otari/_client/models/mr_web_search_tool_result_block.py +++ b/src/otari/_client/models/mr_web_search_tool_result_block.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/mr_web_search_tool_result_error.py b/src/otari/_client/models/mr_web_search_tool_result_error.py index 85797c0..01a33f0 100644 --- a/src/otari/_client/models/mr_web_search_tool_result_error.py +++ b/src/otari/_client/models/mr_web_search_tool_result_error.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/msg_audio.py b/src/otari/_client/models/msg_audio.py index ae38f46..f18858b 100644 --- a/src/otari/_client/models/msg_audio.py +++ b/src/otari/_client/models/msg_audio.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/msg_chat_completion_assistant_message_param.py b/src/otari/_client/models/msg_chat_completion_assistant_message_param.py index c00d128..dcb2f54 100644 --- a/src/otari/_client/models/msg_chat_completion_assistant_message_param.py +++ b/src/otari/_client/models/msg_chat_completion_assistant_message_param.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/msg_chat_completion_content_part_image_param.py b/src/otari/_client/models/msg_chat_completion_content_part_image_param.py index 5efe5de..bf99579 100644 --- a/src/otari/_client/models/msg_chat_completion_content_part_image_param.py +++ b/src/otari/_client/models/msg_chat_completion_content_part_image_param.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/msg_chat_completion_content_part_input_audio_param.py b/src/otari/_client/models/msg_chat_completion_content_part_input_audio_param.py index 6ea1b92..6d5dc60 100644 --- a/src/otari/_client/models/msg_chat_completion_content_part_input_audio_param.py +++ b/src/otari/_client/models/msg_chat_completion_content_part_input_audio_param.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/msg_chat_completion_content_part_refusal_param.py b/src/otari/_client/models/msg_chat_completion_content_part_refusal_param.py index 05eaf05..c402695 100644 --- a/src/otari/_client/models/msg_chat_completion_content_part_refusal_param.py +++ b/src/otari/_client/models/msg_chat_completion_content_part_refusal_param.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/msg_chat_completion_content_part_text_param.py b/src/otari/_client/models/msg_chat_completion_content_part_text_param.py index 77092fc..e903718 100644 --- a/src/otari/_client/models/msg_chat_completion_content_part_text_param.py +++ b/src/otari/_client/models/msg_chat_completion_content_part_text_param.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/msg_chat_completion_developer_message_param.py b/src/otari/_client/models/msg_chat_completion_developer_message_param.py index 26a85c7..7e2d68a 100644 --- a/src/otari/_client/models/msg_chat_completion_developer_message_param.py +++ b/src/otari/_client/models/msg_chat_completion_developer_message_param.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/msg_chat_completion_function_message_param.py b/src/otari/_client/models/msg_chat_completion_function_message_param.py index 25dc541..541c427 100644 --- a/src/otari/_client/models/msg_chat_completion_function_message_param.py +++ b/src/otari/_client/models/msg_chat_completion_function_message_param.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/msg_chat_completion_message_custom_tool_call_param.py b/src/otari/_client/models/msg_chat_completion_message_custom_tool_call_param.py index 668e929..4494541 100644 --- a/src/otari/_client/models/msg_chat_completion_message_custom_tool_call_param.py +++ b/src/otari/_client/models/msg_chat_completion_message_custom_tool_call_param.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/msg_chat_completion_message_function_tool_call_param.py b/src/otari/_client/models/msg_chat_completion_message_function_tool_call_param.py index e3bfea3..d0c0d6b 100644 --- a/src/otari/_client/models/msg_chat_completion_message_function_tool_call_param.py +++ b/src/otari/_client/models/msg_chat_completion_message_function_tool_call_param.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/msg_chat_completion_system_message_param.py b/src/otari/_client/models/msg_chat_completion_system_message_param.py index 8545409..3ac9008 100644 --- a/src/otari/_client/models/msg_chat_completion_system_message_param.py +++ b/src/otari/_client/models/msg_chat_completion_system_message_param.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/msg_chat_completion_tool_message_param.py b/src/otari/_client/models/msg_chat_completion_tool_message_param.py index 05c7cb7..520fdc4 100644 --- a/src/otari/_client/models/msg_chat_completion_tool_message_param.py +++ b/src/otari/_client/models/msg_chat_completion_tool_message_param.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/msg_chat_completion_user_message_param.py b/src/otari/_client/models/msg_chat_completion_user_message_param.py index 22a41bc..de7944b 100644 --- a/src/otari/_client/models/msg_chat_completion_user_message_param.py +++ b/src/otari/_client/models/msg_chat_completion_user_message_param.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/msg_custom.py b/src/otari/_client/models/msg_custom.py index 745476c..bc452c5 100644 --- a/src/otari/_client/models/msg_custom.py +++ b/src/otari/_client/models/msg_custom.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/msg_file.py b/src/otari/_client/models/msg_file.py index a2a2bb0..c381cf7 100644 --- a/src/otari/_client/models/msg_file.py +++ b/src/otari/_client/models/msg_file.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/msg_file_file.py b/src/otari/_client/models/msg_file_file.py index 22d968d..e9ca9f7 100644 --- a/src/otari/_client/models/msg_file_file.py +++ b/src/otari/_client/models/msg_file_file.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/msg_function.py b/src/otari/_client/models/msg_function.py index 819d208..ff55fc4 100644 --- a/src/otari/_client/models/msg_function.py +++ b/src/otari/_client/models/msg_function.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/msg_function_call.py b/src/otari/_client/models/msg_function_call.py index 4ffa450..ac0d212 100644 --- a/src/otari/_client/models/msg_function_call.py +++ b/src/otari/_client/models/msg_function_call.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/msg_image_url.py b/src/otari/_client/models/msg_image_url.py index 12b3dec..22c94d6 100644 --- a/src/otari/_client/models/msg_image_url.py +++ b/src/otari/_client/models/msg_image_url.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/msg_input_audio.py b/src/otari/_client/models/msg_input_audio.py index 7f70699..c2c5a94 100644 --- a/src/otari/_client/models/msg_input_audio.py +++ b/src/otari/_client/models/msg_input_audio.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/pricing_response.py b/src/otari/_client/models/pricing_response.py index cee74a5..af1cb90 100644 --- a/src/otari/_client/models/pricing_response.py +++ b/src/otari/_client/models/pricing_response.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/rerank_request.py b/src/otari/_client/models/rerank_request.py index 3e210cf..cee0d32 100644 --- a/src/otari/_client/models/rerank_request.py +++ b/src/otari/_client/models/rerank_request.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/rerank_response.py b/src/otari/_client/models/rerank_response.py index 0d78070..88bcd41 100644 --- a/src/otari/_client/models/rerank_response.py +++ b/src/otari/_client/models/rerank_response.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/responses_request.py b/src/otari/_client/models/responses_request.py index 881440a..a37f476 100644 --- a/src/otari/_client/models/responses_request.py +++ b/src/otari/_client/models/responses_request.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -17,32 +17,59 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union from typing_extensions import Annotated from uuid import UUID +from otari._client.models.conversation import Conversation from otari._client.models.guardrail_config import GuardrailConfig from otari._client.models.mcp_server_config import McpServerConfig +from otari._client.models.tool_choice1 import ToolChoice1 from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python class ResponsesRequest(BaseModel): """ - OpenAI Responses API-compatible request. Gateway-internal fields (``mcp_servers``, ``mcp_server_ids``, ``guardrails``, ``tools_header``, ``max_tool_iterations``) opt the request into gateway-managed MCP / sandbox / web_search / guardrails without changing the upstream wire shape. They're stripped before the request is forwarded. + OpenAI Responses API-compatible request. The wire fields are derived from any-llm's ``ResponsesParams`` (see ``_schema_derive``) so the schema cannot silently drop a param any-llm forwards. Gateway-internal fields (``mcp_servers``, ``mcp_server_ids``, ``guardrails``, ``tools_header``, ``max_tool_iterations``) opt the request into gateway-managed MCP / sandbox / web_search / guardrails without changing the upstream wire shape. They're stripped before the request is forwarded. """ # noqa: E501 + background: Optional[StrictBool] = None + conversation: Optional[Conversation] = None + frequency_penalty: Optional[Union[StrictFloat, StrictInt]] = None guardrails: Optional[Annotated[List[GuardrailConfig], Field(max_length=8)]] = None + include: Optional[List[StrictStr]] = None input: Optional[Any] + instructions: Optional[StrictStr] = None + max_output_tokens: Optional[StrictInt] = None + max_tool_calls: Optional[StrictInt] = None max_tool_iterations: Optional[Annotated[int, Field(le=25, strict=True, ge=1)]] = None mcp_server_ids: Optional[List[UUID]] = None mcp_servers: Optional[List[McpServerConfig]] = None + metadata: Optional[Dict[str, StrictStr]] = None model: StrictStr + parallel_tool_calls: Optional[StrictBool] = None + presence_penalty: Optional[Union[StrictFloat, StrictInt]] = None + previous_response_id: Optional[StrictStr] = None + prompt_cache_key: Optional[StrictStr] = None + prompt_cache_retention: Optional[StrictStr] = None + reasoning: Optional[Dict[str, Any]] = None + response_format: Optional[Dict[str, Any]] = None + safety_identifier: Optional[StrictStr] = None + service_tier: Optional[StrictStr] = None + store: Optional[StrictBool] = None stream: Optional[StrictBool] = False + stream_options: Optional[Dict[str, Any]] = None + temperature: Optional[Union[StrictFloat, StrictInt]] = None + text: Optional[Any] = None + tool_choice: Optional[ToolChoice1] = None tools: Optional[List[Dict[str, Any]]] = None tools_header: Optional[StrictStr] = None + top_logprobs: Optional[StrictInt] = None + top_p: Optional[Union[StrictFloat, StrictInt]] = None + truncation: Optional[StrictStr] = None user: Optional[StrictStr] = None additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["guardrails", "input", "max_tool_iterations", "mcp_server_ids", "mcp_servers", "model", "stream", "tools", "tools_header", "user"] + __properties: ClassVar[List[str]] = ["background", "conversation", "frequency_penalty", "guardrails", "include", "input", "instructions", "max_output_tokens", "max_tool_calls", "max_tool_iterations", "mcp_server_ids", "mcp_servers", "metadata", "model", "parallel_tool_calls", "presence_penalty", "previous_response_id", "prompt_cache_key", "prompt_cache_retention", "reasoning", "response_format", "safety_identifier", "service_tier", "store", "stream", "stream_options", "temperature", "text", "tool_choice", "tools", "tools_header", "top_logprobs", "top_p", "truncation", "user"] model_config = ConfigDict( validate_by_name=True, @@ -85,6 +112,9 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of conversation + if self.conversation: + _dict['conversation'] = self.conversation.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in guardrails (list) _items = [] if self.guardrails: @@ -99,21 +129,62 @@ def to_dict(self) -> Dict[str, Any]: if _item_mcp_servers: _items.append(_item_mcp_servers.to_dict()) _dict['mcp_servers'] = _items + # override the default output from pydantic by calling `to_dict()` of text + if self.text: + _dict['text'] = self.text.to_dict() + # override the default output from pydantic by calling `to_dict()` of tool_choice + if self.tool_choice: + _dict['tool_choice'] = self.tool_choice.to_dict() # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: for _key, _value in self.additional_properties.items(): _dict[_key] = _value + # set to None if background (nullable) is None + # and model_fields_set contains the field + if self.background is None and "background" in self.model_fields_set: + _dict['background'] = None + + # set to None if conversation (nullable) is None + # and model_fields_set contains the field + if self.conversation is None and "conversation" in self.model_fields_set: + _dict['conversation'] = None + + # set to None if frequency_penalty (nullable) is None + # and model_fields_set contains the field + if self.frequency_penalty is None and "frequency_penalty" in self.model_fields_set: + _dict['frequency_penalty'] = None + # set to None if guardrails (nullable) is None # and model_fields_set contains the field if self.guardrails is None and "guardrails" in self.model_fields_set: _dict['guardrails'] = None + # set to None if include (nullable) is None + # and model_fields_set contains the field + if self.include is None and "include" in self.model_fields_set: + _dict['include'] = None + # set to None if input (nullable) is None # and model_fields_set contains the field if self.input is None and "input" in self.model_fields_set: _dict['input'] = None + # set to None if instructions (nullable) is None + # and model_fields_set contains the field + if self.instructions is None and "instructions" in self.model_fields_set: + _dict['instructions'] = None + + # set to None if max_output_tokens (nullable) is None + # and model_fields_set contains the field + if self.max_output_tokens is None and "max_output_tokens" in self.model_fields_set: + _dict['max_output_tokens'] = None + + # set to None if max_tool_calls (nullable) is None + # and model_fields_set contains the field + if self.max_tool_calls is None and "max_tool_calls" in self.model_fields_set: + _dict['max_tool_calls'] = None + # set to None if max_tool_iterations (nullable) is None # and model_fields_set contains the field if self.max_tool_iterations is None and "max_tool_iterations" in self.model_fields_set: @@ -129,6 +200,81 @@ def to_dict(self) -> Dict[str, Any]: if self.mcp_servers is None and "mcp_servers" in self.model_fields_set: _dict['mcp_servers'] = None + # set to None if metadata (nullable) is None + # and model_fields_set contains the field + if self.metadata is None and "metadata" in self.model_fields_set: + _dict['metadata'] = None + + # set to None if parallel_tool_calls (nullable) is None + # and model_fields_set contains the field + if self.parallel_tool_calls is None and "parallel_tool_calls" in self.model_fields_set: + _dict['parallel_tool_calls'] = None + + # set to None if presence_penalty (nullable) is None + # and model_fields_set contains the field + if self.presence_penalty is None and "presence_penalty" in self.model_fields_set: + _dict['presence_penalty'] = None + + # set to None if previous_response_id (nullable) is None + # and model_fields_set contains the field + if self.previous_response_id is None and "previous_response_id" in self.model_fields_set: + _dict['previous_response_id'] = None + + # set to None if prompt_cache_key (nullable) is None + # and model_fields_set contains the field + if self.prompt_cache_key is None and "prompt_cache_key" in self.model_fields_set: + _dict['prompt_cache_key'] = None + + # set to None if prompt_cache_retention (nullable) is None + # and model_fields_set contains the field + if self.prompt_cache_retention is None and "prompt_cache_retention" in self.model_fields_set: + _dict['prompt_cache_retention'] = None + + # set to None if reasoning (nullable) is None + # and model_fields_set contains the field + if self.reasoning is None and "reasoning" in self.model_fields_set: + _dict['reasoning'] = None + + # set to None if response_format (nullable) is None + # and model_fields_set contains the field + if self.response_format is None and "response_format" in self.model_fields_set: + _dict['response_format'] = None + + # set to None if safety_identifier (nullable) is None + # and model_fields_set contains the field + if self.safety_identifier is None and "safety_identifier" in self.model_fields_set: + _dict['safety_identifier'] = None + + # set to None if service_tier (nullable) is None + # and model_fields_set contains the field + if self.service_tier is None and "service_tier" in self.model_fields_set: + _dict['service_tier'] = None + + # set to None if store (nullable) is None + # and model_fields_set contains the field + if self.store is None and "store" in self.model_fields_set: + _dict['store'] = None + + # set to None if stream_options (nullable) is None + # and model_fields_set contains the field + if self.stream_options is None and "stream_options" in self.model_fields_set: + _dict['stream_options'] = None + + # set to None if temperature (nullable) is None + # and model_fields_set contains the field + if self.temperature is None and "temperature" in self.model_fields_set: + _dict['temperature'] = None + + # set to None if text (nullable) is None + # and model_fields_set contains the field + if self.text is None and "text" in self.model_fields_set: + _dict['text'] = None + + # set to None if tool_choice (nullable) is None + # and model_fields_set contains the field + if self.tool_choice is None and "tool_choice" in self.model_fields_set: + _dict['tool_choice'] = None + # set to None if tools (nullable) is None # and model_fields_set contains the field if self.tools is None and "tools" in self.model_fields_set: @@ -139,6 +285,21 @@ def to_dict(self) -> Dict[str, Any]: if self.tools_header is None and "tools_header" in self.model_fields_set: _dict['tools_header'] = None + # set to None if top_logprobs (nullable) is None + # and model_fields_set contains the field + if self.top_logprobs is None and "top_logprobs" in self.model_fields_set: + _dict['top_logprobs'] = None + + # set to None if top_p (nullable) is None + # and model_fields_set contains the field + if self.top_p is None and "top_p" in self.model_fields_set: + _dict['top_p'] = None + + # set to None if truncation (nullable) is None + # and model_fields_set contains the field + if self.truncation is None and "truncation" in self.model_fields_set: + _dict['truncation'] = None + # set to None if user (nullable) is None # and model_fields_set contains the field if self.user is None and "user" in self.model_fields_set: @@ -156,15 +317,40 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "background": obj.get("background"), + "conversation": Conversation.from_dict(obj["conversation"]) if obj.get("conversation") is not None else None, + "frequency_penalty": obj.get("frequency_penalty"), "guardrails": [GuardrailConfig.from_dict(_item) for _item in obj["guardrails"]] if obj.get("guardrails") is not None else None, + "include": obj.get("include"), "input": obj.get("input"), + "instructions": obj.get("instructions"), + "max_output_tokens": obj.get("max_output_tokens"), + "max_tool_calls": obj.get("max_tool_calls"), "max_tool_iterations": obj.get("max_tool_iterations"), "mcp_server_ids": obj.get("mcp_server_ids"), "mcp_servers": [McpServerConfig.from_dict(_item) for _item in obj["mcp_servers"]] if obj.get("mcp_servers") is not None else None, + "metadata": obj.get("metadata"), "model": obj.get("model"), + "parallel_tool_calls": obj.get("parallel_tool_calls"), + "presence_penalty": obj.get("presence_penalty"), + "previous_response_id": obj.get("previous_response_id"), + "prompt_cache_key": obj.get("prompt_cache_key"), + "prompt_cache_retention": obj.get("prompt_cache_retention"), + "reasoning": obj.get("reasoning"), + "response_format": obj.get("response_format"), + "safety_identifier": obj.get("safety_identifier"), + "service_tier": obj.get("service_tier"), + "store": obj.get("store"), "stream": obj.get("stream") if obj.get("stream") is not None else False, + "stream_options": obj.get("stream_options"), + "temperature": obj.get("temperature"), + "text": AnyOf.from_dict(obj["text"]) if obj.get("text") is not None else None, + "tool_choice": ToolChoice1.from_dict(obj["tool_choice"]) if obj.get("tool_choice") is not None else None, "tools": obj.get("tools"), "tools_header": obj.get("tools_header"), + "top_logprobs": obj.get("top_logprobs"), + "top_p": obj.get("top_p"), + "truncation": obj.get("truncation"), "user": obj.get("user") }) # store additional fields in additional_properties diff --git a/src/otari/_client/models/rr_rerank_meta.py b/src/otari/_client/models/rr_rerank_meta.py index 865c2a7..63cfb6c 100644 --- a/src/otari/_client/models/rr_rerank_meta.py +++ b/src/otari/_client/models/rr_rerank_meta.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/rr_rerank_result.py b/src/otari/_client/models/rr_rerank_result.py index 9aad3e9..9b32dfa 100644 --- a/src/otari/_client/models/rr_rerank_result.py +++ b/src/otari/_client/models/rr_rerank_result.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/rr_rerank_usage.py b/src/otari/_client/models/rr_rerank_usage.py index d4bd875..c655355 100644 --- a/src/otari/_client/models/rr_rerank_usage.py +++ b/src/otari/_client/models/rr_rerank_usage.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/set_pricing_request.py b/src/otari/_client/models/set_pricing_request.py index 567e9ef..8c2892b 100644 --- a/src/otari/_client/models/set_pricing_request.py +++ b/src/otari/_client/models/set_pricing_request.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/source.py b/src/otari/_client/models/source.py index 33f951b..e83fd31 100644 --- a/src/otari/_client/models/source.py +++ b/src/otari/_client/models/source.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/system1.py b/src/otari/_client/models/stop.py similarity index 81% rename from src/otari/_client/models/system1.py rename to src/otari/_client/models/stop.py index d44f94d..7bc8a12 100644 --- a/src/otari/_client/models/system1.py +++ b/src/otari/_client/models/stop.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,27 +18,27 @@ import pprint import re # noqa: F401 from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, Dict, List, Optional +from typing import List, Optional from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict from typing_extensions import Literal, Self from pydantic import Field -SYSTEM1_ANY_OF_SCHEMAS = ["List[Dict[str, object]]", "str"] +STOP_ANY_OF_SCHEMAS = ["List[str]", "str"] -class System1(BaseModel): +class Stop(BaseModel): """ - System1 + Stop """ # data type: str anyof_schema_1_validator: Optional[StrictStr] = None - # data type: List[Dict[str, object]] - anyof_schema_2_validator: Optional[List[Dict[str, Any]]] = None + # data type: List[str] + anyof_schema_2_validator: Optional[List[StrictStr]] = None if TYPE_CHECKING: - actual_instance: Optional[Union[List[Dict[str, object]], str]] = None + actual_instance: Optional[Union[List[str], str]] = None else: actual_instance: Any = None - any_of_schemas: Set[str] = { "List[Dict[str, object]]", "str" } + any_of_schemas: Set[str] = { "List[str]", "str" } model_config = { "validate_assignment": True, @@ -60,7 +60,7 @@ def actual_instance_must_validate_anyof(cls, v): if v is None: return v - instance = System1.model_construct() + instance = Stop.model_construct() error_messages = [] # validate data type: str try: @@ -68,7 +68,7 @@ def actual_instance_must_validate_anyof(cls, v): return v except (ValidationError, ValueError) as e: error_messages.append(str(e)) - # validate data type: List[Dict[str, object]] + # validate data type: List[str] try: instance.anyof_schema_2_validator = v return v @@ -76,7 +76,7 @@ def actual_instance_must_validate_anyof(cls, v): error_messages.append(str(e)) if error_messages: # no match - raise ValueError("No match found when setting the actual_instance in System1 with anyOf schemas: List[Dict[str, object]], str. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when setting the actual_instance in Stop with anyOf schemas: List[str], str. Details: " + ", ".join(error_messages)) else: return v @@ -101,7 +101,7 @@ def from_json(cls, json_str: str) -> Self: return instance except (ValidationError, ValueError) as e: error_messages.append(str(e)) - # deserialize data into List[Dict[str, object]] + # deserialize data into List[str] try: # validation instance.anyof_schema_2_validator = json.loads(json_str) @@ -113,7 +113,7 @@ def from_json(cls, json_str: str) -> Self: if error_messages: # no match - raise ValueError("No match found when deserializing the JSON string into System1 with anyOf schemas: List[Dict[str, object]], str. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when deserializing the JSON string into Stop with anyOf schemas: List[str], str. Details: " + ", ".join(error_messages)) else: return instance @@ -127,7 +127,7 @@ def to_json(self) -> str: else: return json.dumps(self.actual_instance) - def to_dict(self) -> Optional[Union[Dict[str, Any], List[Dict[str, object]], str]]: + def to_dict(self) -> Optional[Union[Dict[str, Any], List[str], str]]: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None diff --git a/src/otari/_client/models/system.py b/src/otari/_client/models/system.py index 80d4e22..90304b0 100644 --- a/src/otari/_client/models/system.py +++ b/src/otari/_client/models/system.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -31,7 +31,7 @@ class System(BaseModel): """ # data type: str - anyof_schema_1_validator: Optional[StrictStr] = Field(default=None, description="Filter models by provider name") + anyof_schema_1_validator: Optional[StrictStr] = None # data type: List[Dict[str, object]] anyof_schema_2_validator: Optional[List[Dict[str, Any]]] = None if TYPE_CHECKING: diff --git a/src/otari/_client/models/tool_calls_inner.py b/src/otari/_client/models/tool_calls_inner.py index 0136089..bdac489 100644 --- a/src/otari/_client/models/tool_calls_inner.py +++ b/src/otari/_client/models/tool_calls_inner.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/tool_choice.py b/src/otari/_client/models/tool_choice.py index 107d6c6..5031b79 100644 --- a/src/otari/_client/models/tool_choice.py +++ b/src/otari/_client/models/tool_choice.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/tool_choice1.py b/src/otari/_client/models/tool_choice1.py new file mode 100644 index 0000000..c49cee4 --- /dev/null +++ b/src/otari/_client/models/tool_choice1.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" + otari + + Otari, an OpenAI-compatible LLM gateway with API key management + + The version of the OpenAPI document: 0.0.0-dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +from inspect import getfullargspec +import json +import pprint +import re # noqa: F401 +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, Dict, Optional +from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict +from typing_extensions import Literal, Self +from pydantic import Field + +TOOLCHOICE1_ANY_OF_SCHEMAS = ["Dict[str, object]", "str"] + +class ToolChoice1(BaseModel): + """ + ToolChoice1 + """ + + # data type: str + anyof_schema_1_validator: Optional[StrictStr] = None + # data type: Dict[str, object] + anyof_schema_2_validator: Optional[Dict[str, Any]] = None + if TYPE_CHECKING: + actual_instance: Optional[Union[Dict[str, object], str]] = None + else: + actual_instance: Any = None + any_of_schemas: Set[str] = { "Dict[str, object]", "str" } + + model_config = { + "validate_assignment": True, + "protected_namespaces": (), + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_anyof(cls, v): + if v is None: + return v + + instance = ToolChoice1.model_construct() + error_messages = [] + # validate data type: str + try: + instance.anyof_schema_1_validator = v + return v + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # validate data type: Dict[str, object] + try: + instance.anyof_schema_2_validator = v + return v + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + if error_messages: + # no match + raise ValueError("No match found when setting the actual_instance in ToolChoice1 with anyOf schemas: Dict[str, object], str. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Dict[str, Any]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + if json_str is None: + return instance + + error_messages = [] + # deserialize data into str + try: + # validation + instance.anyof_schema_1_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.anyof_schema_1_validator + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Dict[str, object] + try: + # validation + instance.anyof_schema_2_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.anyof_schema_2_validator + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if error_messages: + # no match + raise ValueError("No match found when deserializing the JSON string into ToolChoice1 with anyOf schemas: Dict[str, object], str. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], Dict[str, object], str]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/src/otari/_client/models/update_budget_request.py b/src/otari/_client/models/update_budget_request.py index 8fe3968..b43962d 100644 --- a/src/otari/_client/models/update_budget_request.py +++ b/src/otari/_client/models/update_budget_request.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/update_key_request.py b/src/otari/_client/models/update_key_request.py index bf773cb..a2bfbff 100644 --- a/src/otari/_client/models/update_key_request.py +++ b/src/otari/_client/models/update_key_request.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/update_user_request.py b/src/otari/_client/models/update_user_request.py index cd3fe41..6a90add 100644 --- a/src/otari/_client/models/update_user_request.py +++ b/src/otari/_client/models/update_user_request.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/usage_entry.py b/src/otari/_client/models/usage_entry.py index 6164329..7966543 100644 --- a/src/otari/_client/models/usage_entry.py +++ b/src/otari/_client/models/usage_entry.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/usage_log_response.py b/src/otari/_client/models/usage_log_response.py index e09b186..518d444 100644 --- a/src/otari/_client/models/usage_log_response.py +++ b/src/otari/_client/models/usage_log_response.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/user_response.py b/src/otari/_client/models/user_response.py index b065d87..f6344c0 100644 --- a/src/otari/_client/models/user_response.py +++ b/src/otari/_client/models/user_response.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/models/validation_error.py b/src/otari/_client/models/validation_error.py index cd002e7..5147feb 100644 --- a/src/otari/_client/models/validation_error.py +++ b/src/otari/_client/models/validation_error.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/otari/_client/rest.py b/src/otari/_client/rest.py index c9ab7a9..5d07c8d 100644 --- a/src/otari/_client/rest.py +++ b/src/otari/_client/rest.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - otari-gateway + otari - A clean FastAPI gateway for otari with API key management + Otari, an OpenAI-compatible LLM gateway with API key management The version of the OpenAPI document: 0.0.0-dev Generated by OpenAPI Generator (https://openapi-generator.tech) From 451871282dd5561e33e2b087d3b8d905efeac6d0 Mon Sep 17 00:00:00 2001 From: njbrake Date: Tue, 16 Jun 2026 18:20:33 +0000 Subject: [PATCH 2/2] chore: defer the gateway /v1/files endpoints in the coverage manifest The gateway added a Files API that no SDK shell wraps yet; defer those five endpoints under [excluded] so the endpoint-coverage drift gate passes on this regenerated core. Wrapping the Files API is tracked separately. Co-Authored-By: Claude Opus 4.8 (1M context) --- sdk-endpoints.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sdk-endpoints.txt b/sdk-endpoints.txt index acf2b2a..f5669fa 100644 --- a/sdk-endpoints.txt +++ b/sdk-endpoints.txt @@ -60,3 +60,9 @@ POST /v1/audio/speech # binary, not yet wrapped POST /v1/audio/transcriptions # binary, not yet wrapped POST /v1/images/generations # binary, not yet wrapped GET /v1/models/{model_id} # redundant, list_models covers discovery +# Files API: added to the gateway spec, not yet wrapped by any SDK shell. +POST /v1/files # not yet wrapped +GET /v1/files # not yet wrapped +GET /v1/files/{file_id} # not yet wrapped +GET /v1/files/{file_id}/content # not yet wrapped +DELETE /v1/files/{file_id} # not yet wrapped