diff --git a/libs/client_infinity/infinity_client/infinity_client/api/default/embeddings.py b/libs/client_infinity/infinity_client/infinity_client/api/default/embeddings.py index e2dfd6de..fa1c51bf 100644 --- a/libs/client_infinity/infinity_client/infinity_client/api/default/embeddings.py +++ b/libs/client_infinity/infinity_client/infinity_client/api/default/embeddings.py @@ -74,7 +74,7 @@ def sync_detailed( ) -> Response[Union[HTTPValidationError, OpenAIEmbeddingResult]]: r"""Embeddings - Encode Embeddings. Supports with multimodal inputs. + Encode Embeddings. Supports with multimodal inputs. Aligned with OpenAI Embeddings API. ## Running Text Embeddings ```python @@ -94,7 +94,7 @@ def sync_detailed( # can also be base64 encoded ], # set extra modality to image to process as image - \"infinity_extra_modality\": \"image\" + \"modality\": \"image\" ) ``` @@ -120,7 +120,7 @@ def url_to_base64(url, modality = \"image\"): url, url_to_base64(url, \"audio\") ], # set extra modality to audio to process as audio - \"infinity_extra_modality\": \"audio\" + \"modality\": \"audio\" } ) ``` @@ -134,7 +134,7 @@ def url_to_base64(url, modality = \"image\"): input=[url_to_base64(url, \"audio\")], encoding_format= \"base64\", extra_body={ - \"infinity_extra_modality\": \"audio\" + \"modality\": \"audio\" } ) @@ -143,7 +143,7 @@ def url_to_base64(url, modality = \"image\"): input=[\"the sound of a beep\", \"the sound of a cat\"], encoding_format= \"base64\", extra_body={ - \"infinity_extra_modality\": \"text\" + \"modality\": \"text\" } ) ``` @@ -184,7 +184,7 @@ def sync( ) -> Optional[Union[HTTPValidationError, OpenAIEmbeddingResult]]: r"""Embeddings - Encode Embeddings. Supports with multimodal inputs. + Encode Embeddings. Supports with multimodal inputs. Aligned with OpenAI Embeddings API. ## Running Text Embeddings ```python @@ -204,7 +204,7 @@ def sync( # can also be base64 encoded ], # set extra modality to image to process as image - \"infinity_extra_modality\": \"image\" + \"modality\": \"image\" ) ``` @@ -230,7 +230,7 @@ def url_to_base64(url, modality = \"image\"): url, url_to_base64(url, \"audio\") ], # set extra modality to audio to process as audio - \"infinity_extra_modality\": \"audio\" + \"modality\": \"audio\" } ) ``` @@ -244,7 +244,7 @@ def url_to_base64(url, modality = \"image\"): input=[url_to_base64(url, \"audio\")], encoding_format= \"base64\", extra_body={ - \"infinity_extra_modality\": \"audio\" + \"modality\": \"audio\" } ) @@ -253,7 +253,7 @@ def url_to_base64(url, modality = \"image\"): input=[\"the sound of a beep\", \"the sound of a cat\"], encoding_format= \"base64\", extra_body={ - \"infinity_extra_modality\": \"text\" + \"modality\": \"text\" } ) ``` @@ -289,7 +289,7 @@ async def asyncio_detailed( ) -> Response[Union[HTTPValidationError, OpenAIEmbeddingResult]]: r"""Embeddings - Encode Embeddings. Supports with multimodal inputs. + Encode Embeddings. Supports with multimodal inputs. Aligned with OpenAI Embeddings API. ## Running Text Embeddings ```python @@ -309,7 +309,7 @@ async def asyncio_detailed( # can also be base64 encoded ], # set extra modality to image to process as image - \"infinity_extra_modality\": \"image\" + \"modality\": \"image\" ) ``` @@ -335,7 +335,7 @@ def url_to_base64(url, modality = \"image\"): url, url_to_base64(url, \"audio\") ], # set extra modality to audio to process as audio - \"infinity_extra_modality\": \"audio\" + \"modality\": \"audio\" } ) ``` @@ -349,7 +349,7 @@ def url_to_base64(url, modality = \"image\"): input=[url_to_base64(url, \"audio\")], encoding_format= \"base64\", extra_body={ - \"infinity_extra_modality\": \"audio\" + \"modality\": \"audio\" } ) @@ -358,7 +358,7 @@ def url_to_base64(url, modality = \"image\"): input=[\"the sound of a beep\", \"the sound of a cat\"], encoding_format= \"base64\", extra_body={ - \"infinity_extra_modality\": \"text\" + \"modality\": \"text\" } ) ``` @@ -397,7 +397,7 @@ async def asyncio( ) -> Optional[Union[HTTPValidationError, OpenAIEmbeddingResult]]: r"""Embeddings - Encode Embeddings. Supports with multimodal inputs. + Encode Embeddings. Supports with multimodal inputs. Aligned with OpenAI Embeddings API. ## Running Text Embeddings ```python @@ -417,7 +417,7 @@ async def asyncio( # can also be base64 encoded ], # set extra modality to image to process as image - \"infinity_extra_modality\": \"image\" + \"modality\": \"image\" ) ``` @@ -443,7 +443,7 @@ def url_to_base64(url, modality = \"image\"): url, url_to_base64(url, \"audio\") ], # set extra modality to audio to process as audio - \"infinity_extra_modality\": \"audio\" + \"modality\": \"audio\" } ) ``` @@ -457,7 +457,7 @@ def url_to_base64(url, modality = \"image\"): input=[url_to_base64(url, \"audio\")], encoding_format= \"base64\", extra_body={ - \"infinity_extra_modality\": \"audio\" + \"modality\": \"audio\" } ) @@ -466,7 +466,7 @@ def url_to_base64(url, modality = \"image\"): input=[\"the sound of a beep\", \"the sound of a cat\"], encoding_format= \"base64\", extra_body={ - \"infinity_extra_modality\": \"text\" + \"modality\": \"text\" } ) ``` diff --git a/libs/client_infinity/infinity_client/infinity_client/api/default/embeddings_audio.py b/libs/client_infinity/infinity_client/infinity_client/api/default/embeddings_audio.py index ff2ece66..075b3b5a 100644 --- a/libs/client_infinity/infinity_client/infinity_client/api/default/embeddings_audio.py +++ b/libs/client_infinity/infinity_client/infinity_client/api/default/embeddings_audio.py @@ -64,7 +64,7 @@ def sync_detailed( client: Union[AuthenticatedClient, Client], body: AudioEmbeddingInput, ) -> Response[Union[HTTPValidationError, OpenAIEmbeddingResult]]: - r"""Deprecated: Use `embeddings` with `infinity_extra_modality` set to `audio` + r"""Deprecated: Use `embeddings` with `modality` set to `audio` Encode Embeddings from Audio files @@ -84,7 +84,7 @@ def sync_detailed( ``` Args: - body (AudioEmbeddingInput): # LEGACY + body (AudioEmbeddingInput): LEGACY, DO NO LONGER UPDATE Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -110,7 +110,7 @@ def sync( client: Union[AuthenticatedClient, Client], body: AudioEmbeddingInput, ) -> Optional[Union[HTTPValidationError, OpenAIEmbeddingResult]]: - r"""Deprecated: Use `embeddings` with `infinity_extra_modality` set to `audio` + r"""Deprecated: Use `embeddings` with `modality` set to `audio` Encode Embeddings from Audio files @@ -130,7 +130,7 @@ def sync( ``` Args: - body (AudioEmbeddingInput): # LEGACY + body (AudioEmbeddingInput): LEGACY, DO NO LONGER UPDATE Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -151,7 +151,7 @@ async def asyncio_detailed( client: Union[AuthenticatedClient, Client], body: AudioEmbeddingInput, ) -> Response[Union[HTTPValidationError, OpenAIEmbeddingResult]]: - r"""Deprecated: Use `embeddings` with `infinity_extra_modality` set to `audio` + r"""Deprecated: Use `embeddings` with `modality` set to `audio` Encode Embeddings from Audio files @@ -171,7 +171,7 @@ async def asyncio_detailed( ``` Args: - body (AudioEmbeddingInput): # LEGACY + body (AudioEmbeddingInput): LEGACY, DO NO LONGER UPDATE Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -195,7 +195,7 @@ async def asyncio( client: Union[AuthenticatedClient, Client], body: AudioEmbeddingInput, ) -> Optional[Union[HTTPValidationError, OpenAIEmbeddingResult]]: - r"""Deprecated: Use `embeddings` with `infinity_extra_modality` set to `audio` + r"""Deprecated: Use `embeddings` with `modality` set to `audio` Encode Embeddings from Audio files @@ -215,7 +215,7 @@ async def asyncio( ``` Args: - body (AudioEmbeddingInput): # LEGACY + body (AudioEmbeddingInput): LEGACY, DO NO LONGER UPDATE Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/libs/client_infinity/infinity_client/infinity_client/api/default/embeddings_image.py b/libs/client_infinity/infinity_client/infinity_client/api/default/embeddings_image.py index 9bceddb9..a65f21c4 100644 --- a/libs/client_infinity/infinity_client/infinity_client/api/default/embeddings_image.py +++ b/libs/client_infinity/infinity_client/infinity_client/api/default/embeddings_image.py @@ -64,7 +64,7 @@ def sync_detailed( client: Union[AuthenticatedClient, Client], body: ImageEmbeddingInput, ) -> Response[Union[HTTPValidationError, OpenAIEmbeddingResult]]: - r"""Deprecated: Use `embeddings` with `infinity_extra_modality` set to `image` + r"""Deprecated: Use `embeddings` with `modality` set to `image` Encode Embeddings from Image files @@ -83,7 +83,7 @@ def sync_detailed( ``` Args: - body (ImageEmbeddingInput): # LEGACY + body (ImageEmbeddingInput): LEGACY, DO NO LONGER UPDATE Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -109,7 +109,7 @@ def sync( client: Union[AuthenticatedClient, Client], body: ImageEmbeddingInput, ) -> Optional[Union[HTTPValidationError, OpenAIEmbeddingResult]]: - r"""Deprecated: Use `embeddings` with `infinity_extra_modality` set to `image` + r"""Deprecated: Use `embeddings` with `modality` set to `image` Encode Embeddings from Image files @@ -128,7 +128,7 @@ def sync( ``` Args: - body (ImageEmbeddingInput): # LEGACY + body (ImageEmbeddingInput): LEGACY, DO NO LONGER UPDATE Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -149,7 +149,7 @@ async def asyncio_detailed( client: Union[AuthenticatedClient, Client], body: ImageEmbeddingInput, ) -> Response[Union[HTTPValidationError, OpenAIEmbeddingResult]]: - r"""Deprecated: Use `embeddings` with `infinity_extra_modality` set to `image` + r"""Deprecated: Use `embeddings` with `modality` set to `image` Encode Embeddings from Image files @@ -168,7 +168,7 @@ async def asyncio_detailed( ``` Args: - body (ImageEmbeddingInput): # LEGACY + body (ImageEmbeddingInput): LEGACY, DO NO LONGER UPDATE Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -192,7 +192,7 @@ async def asyncio( client: Union[AuthenticatedClient, Client], body: ImageEmbeddingInput, ) -> Optional[Union[HTTPValidationError, OpenAIEmbeddingResult]]: - r"""Deprecated: Use `embeddings` with `infinity_extra_modality` set to `image` + r"""Deprecated: Use `embeddings` with `modality` set to `image` Encode Embeddings from Image files @@ -211,7 +211,7 @@ async def asyncio( ``` Args: - body (ImageEmbeddingInput): # LEGACY + body (ImageEmbeddingInput): LEGACY, DO NO LONGER UPDATE Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/libs/client_infinity/infinity_client/infinity_client/api/default/rerank.py b/libs/client_infinity/infinity_client/infinity_client/api/default/rerank.py index 6eadbe5f..d7b821fb 100644 --- a/libs/client_infinity/infinity_client/infinity_client/api/default/rerank.py +++ b/libs/client_infinity/infinity_client/infinity_client/api/default/rerank.py @@ -66,7 +66,7 @@ def sync_detailed( ) -> Response[Union[HTTPValidationError, ReRankResult]]: r"""Rerank - Rerank documents + Rerank documents. Aligned with Cohere API (https://docs.cohere.com/reference/rerank) ```python import requests @@ -107,7 +107,7 @@ def sync( ) -> Optional[Union[HTTPValidationError, ReRankResult]]: r"""Rerank - Rerank documents + Rerank documents. Aligned with Cohere API (https://docs.cohere.com/reference/rerank) ```python import requests @@ -143,7 +143,7 @@ async def asyncio_detailed( ) -> Response[Union[HTTPValidationError, ReRankResult]]: r"""Rerank - Rerank documents + Rerank documents. Aligned with Cohere API (https://docs.cohere.com/reference/rerank) ```python import requests @@ -182,7 +182,7 @@ async def asyncio( ) -> Optional[Union[HTTPValidationError, ReRankResult]]: r"""Rerank - Rerank documents + Rerank documents. Aligned with Cohere API (https://docs.cohere.com/reference/rerank) ```python import requests diff --git a/libs/client_infinity/infinity_client/infinity_client/models/__init__.py b/libs/client_infinity/infinity_client/infinity_client/models/__init__.py index 8a58b644..662aaa70 100644 --- a/libs/client_infinity/infinity_client/infinity_client/models/__init__.py +++ b/libs/client_infinity/infinity_client/infinity_client/models/__init__.py @@ -14,11 +14,11 @@ from .model_info_object import ModelInfoObject from .model_info_owned_by import ModelInfoOwnedBy from .open_ai_embedding_input_audio import OpenAIEmbeddingInputAudio -from .open_ai_embedding_input_audio_infinity_extra_modality import OpenAIEmbeddingInputAudioInfinityExtraModality +from .open_ai_embedding_input_audio_modality import OpenAIEmbeddingInputAudioModality from .open_ai_embedding_input_image import OpenAIEmbeddingInputImage -from .open_ai_embedding_input_image_infinity_extra_modality import OpenAIEmbeddingInputImageInfinityExtraModality +from .open_ai_embedding_input_image_modality import OpenAIEmbeddingInputImageModality from .open_ai_embedding_input_text import OpenAIEmbeddingInputText -from .open_ai_embedding_input_text_infinity_extra_modality import OpenAIEmbeddingInputTextInfinityExtraModality +from .open_ai_embedding_input_text_modality import OpenAIEmbeddingInputTextModality from .open_ai_embedding_result import OpenAIEmbeddingResult from .open_ai_embedding_result_object import OpenAIEmbeddingResultObject from .open_ai_model_info import OpenAIModelInfo @@ -46,11 +46,11 @@ "ModelInfoObject", "ModelInfoOwnedBy", "OpenAIEmbeddingInputAudio", - "OpenAIEmbeddingInputAudioInfinityExtraModality", + "OpenAIEmbeddingInputAudioModality", "OpenAIEmbeddingInputImage", - "OpenAIEmbeddingInputImageInfinityExtraModality", + "OpenAIEmbeddingInputImageModality", "OpenAIEmbeddingInputText", - "OpenAIEmbeddingInputTextInfinityExtraModality", + "OpenAIEmbeddingInputTextModality", "OpenAIEmbeddingResult", "OpenAIEmbeddingResultObject", "OpenAIModelInfo", diff --git a/libs/client_infinity/infinity_client/infinity_client/models/audio_embedding_input.py b/libs/client_infinity/infinity_client/infinity_client/models/audio_embedding_input.py index 11986996..8e601350 100644 --- a/libs/client_infinity/infinity_client/infinity_client/models/audio_embedding_input.py +++ b/libs/client_infinity/infinity_client/infinity_client/models/audio_embedding_input.py @@ -11,7 +11,7 @@ @_attrs_define class AudioEmbeddingInput: - """# LEGACY + """LEGACY, DO NO LONGER UPDATE Attributes: input_ (Union[List[str], str]): diff --git a/libs/client_infinity/infinity_client/infinity_client/models/image_embedding_input.py b/libs/client_infinity/infinity_client/infinity_client/models/image_embedding_input.py index c91d1ff4..693c74d0 100644 --- a/libs/client_infinity/infinity_client/infinity_client/models/image_embedding_input.py +++ b/libs/client_infinity/infinity_client/infinity_client/models/image_embedding_input.py @@ -11,7 +11,7 @@ @_attrs_define class ImageEmbeddingInput: - """# LEGACY + """LEGACY, DO NO LONGER UPDATE Attributes: input_ (Union[List[str], str]): diff --git a/libs/client_infinity/infinity_client/infinity_client/models/open_ai_embedding_input_audio.py b/libs/client_infinity/infinity_client/infinity_client/models/open_ai_embedding_input_audio.py index 0653500d..0369c880 100644 --- a/libs/client_infinity/infinity_client/infinity_client/models/open_ai_embedding_input_audio.py +++ b/libs/client_infinity/infinity_client/infinity_client/models/open_ai_embedding_input_audio.py @@ -4,9 +4,7 @@ from attrs import field as _attrs_field from ..models.embedding_encoding_format import EmbeddingEncodingFormat -from ..models.open_ai_embedding_input_audio_infinity_extra_modality import ( - OpenAIEmbeddingInputAudioInfinityExtraModality, -) +from ..models.open_ai_embedding_input_audio_modality import OpenAIEmbeddingInputAudioModality from ..types import UNSET, Unset T = TypeVar("T", bound="OpenAIEmbeddingInputAudio") @@ -20,17 +18,14 @@ class OpenAIEmbeddingInputAudio: model (Union[Unset, str]): Default: 'default/not-specified'. encoding_format (Union[Unset, EmbeddingEncodingFormat]): user (Union[None, Unset, str]): - infinity_extra_modality (Union[Unset, OpenAIEmbeddingInputAudioInfinityExtraModality]): Default: - OpenAIEmbeddingInputAudioInfinityExtraModality.AUDIO. + modality (Union[Unset, OpenAIEmbeddingInputAudioModality]): Default: OpenAIEmbeddingInputAudioModality.AUDIO. """ input_: Union[List[str], str] model: Union[Unset, str] = "default/not-specified" encoding_format: Union[Unset, EmbeddingEncodingFormat] = UNSET user: Union[None, Unset, str] = UNSET - infinity_extra_modality: Union[ - Unset, OpenAIEmbeddingInputAudioInfinityExtraModality - ] = OpenAIEmbeddingInputAudioInfinityExtraModality.AUDIO + modality: Union[Unset, OpenAIEmbeddingInputAudioModality] = OpenAIEmbeddingInputAudioModality.AUDIO additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: @@ -57,9 +52,9 @@ def to_dict(self) -> Dict[str, Any]: else: user = self.user - infinity_extra_modality: Union[Unset, str] = UNSET - if not isinstance(self.infinity_extra_modality, Unset): - infinity_extra_modality = self.infinity_extra_modality.value + modality: Union[Unset, str] = UNSET + if not isinstance(self.modality, Unset): + modality = self.modality.value field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) @@ -74,8 +69,8 @@ def to_dict(self) -> Dict[str, Any]: field_dict["encoding_format"] = encoding_format if user is not UNSET: field_dict["user"] = user - if infinity_extra_modality is not UNSET: - field_dict["infinity_extra_modality"] = infinity_extra_modality + if modality is not UNSET: + field_dict["modality"] = modality return field_dict @@ -123,19 +118,19 @@ def _parse_user(data: object) -> Union[None, Unset, str]: user = _parse_user(d.pop("user", UNSET)) - _infinity_extra_modality = d.pop("infinity_extra_modality", UNSET) - infinity_extra_modality: Union[Unset, OpenAIEmbeddingInputAudioInfinityExtraModality] - if isinstance(_infinity_extra_modality, Unset): - infinity_extra_modality = UNSET + _modality = d.pop("modality", UNSET) + modality: Union[Unset, OpenAIEmbeddingInputAudioModality] + if isinstance(_modality, Unset): + modality = UNSET else: - infinity_extra_modality = OpenAIEmbeddingInputAudioInfinityExtraModality(_infinity_extra_modality) + modality = OpenAIEmbeddingInputAudioModality(_modality) open_ai_embedding_input_audio = cls( input_=input_, model=model, encoding_format=encoding_format, user=user, - infinity_extra_modality=infinity_extra_modality, + modality=modality, ) open_ai_embedding_input_audio.additional_properties = d diff --git a/libs/client_infinity/infinity_client/infinity_client/models/open_ai_embedding_input_audio_infinity_extra_modality.py b/libs/client_infinity/infinity_client/infinity_client/models/open_ai_embedding_input_audio_modality.py similarity index 61% rename from libs/client_infinity/infinity_client/infinity_client/models/open_ai_embedding_input_audio_infinity_extra_modality.py rename to libs/client_infinity/infinity_client/infinity_client/models/open_ai_embedding_input_audio_modality.py index 257de996..c18b1f50 100644 --- a/libs/client_infinity/infinity_client/infinity_client/models/open_ai_embedding_input_audio_infinity_extra_modality.py +++ b/libs/client_infinity/infinity_client/infinity_client/models/open_ai_embedding_input_audio_modality.py @@ -1,7 +1,7 @@ from enum import Enum -class OpenAIEmbeddingInputAudioInfinityExtraModality(str, Enum): +class OpenAIEmbeddingInputAudioModality(str, Enum): AUDIO = "audio" def __str__(self) -> str: diff --git a/libs/client_infinity/infinity_client/infinity_client/models/open_ai_embedding_input_image.py b/libs/client_infinity/infinity_client/infinity_client/models/open_ai_embedding_input_image.py index d2b70311..b036ad0e 100644 --- a/libs/client_infinity/infinity_client/infinity_client/models/open_ai_embedding_input_image.py +++ b/libs/client_infinity/infinity_client/infinity_client/models/open_ai_embedding_input_image.py @@ -4,9 +4,7 @@ from attrs import field as _attrs_field from ..models.embedding_encoding_format import EmbeddingEncodingFormat -from ..models.open_ai_embedding_input_image_infinity_extra_modality import ( - OpenAIEmbeddingInputImageInfinityExtraModality, -) +from ..models.open_ai_embedding_input_image_modality import OpenAIEmbeddingInputImageModality from ..types import UNSET, Unset T = TypeVar("T", bound="OpenAIEmbeddingInputImage") @@ -20,17 +18,14 @@ class OpenAIEmbeddingInputImage: model (Union[Unset, str]): Default: 'default/not-specified'. encoding_format (Union[Unset, EmbeddingEncodingFormat]): user (Union[None, Unset, str]): - infinity_extra_modality (Union[Unset, OpenAIEmbeddingInputImageInfinityExtraModality]): Default: - OpenAIEmbeddingInputImageInfinityExtraModality.IMAGE. + modality (Union[Unset, OpenAIEmbeddingInputImageModality]): Default: OpenAIEmbeddingInputImageModality.IMAGE. """ input_: Union[List[str], str] model: Union[Unset, str] = "default/not-specified" encoding_format: Union[Unset, EmbeddingEncodingFormat] = UNSET user: Union[None, Unset, str] = UNSET - infinity_extra_modality: Union[ - Unset, OpenAIEmbeddingInputImageInfinityExtraModality - ] = OpenAIEmbeddingInputImageInfinityExtraModality.IMAGE + modality: Union[Unset, OpenAIEmbeddingInputImageModality] = OpenAIEmbeddingInputImageModality.IMAGE additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: @@ -57,9 +52,9 @@ def to_dict(self) -> Dict[str, Any]: else: user = self.user - infinity_extra_modality: Union[Unset, str] = UNSET - if not isinstance(self.infinity_extra_modality, Unset): - infinity_extra_modality = self.infinity_extra_modality.value + modality: Union[Unset, str] = UNSET + if not isinstance(self.modality, Unset): + modality = self.modality.value field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) @@ -74,8 +69,8 @@ def to_dict(self) -> Dict[str, Any]: field_dict["encoding_format"] = encoding_format if user is not UNSET: field_dict["user"] = user - if infinity_extra_modality is not UNSET: - field_dict["infinity_extra_modality"] = infinity_extra_modality + if modality is not UNSET: + field_dict["modality"] = modality return field_dict @@ -123,19 +118,19 @@ def _parse_user(data: object) -> Union[None, Unset, str]: user = _parse_user(d.pop("user", UNSET)) - _infinity_extra_modality = d.pop("infinity_extra_modality", UNSET) - infinity_extra_modality: Union[Unset, OpenAIEmbeddingInputImageInfinityExtraModality] - if isinstance(_infinity_extra_modality, Unset): - infinity_extra_modality = UNSET + _modality = d.pop("modality", UNSET) + modality: Union[Unset, OpenAIEmbeddingInputImageModality] + if isinstance(_modality, Unset): + modality = UNSET else: - infinity_extra_modality = OpenAIEmbeddingInputImageInfinityExtraModality(_infinity_extra_modality) + modality = OpenAIEmbeddingInputImageModality(_modality) open_ai_embedding_input_image = cls( input_=input_, model=model, encoding_format=encoding_format, user=user, - infinity_extra_modality=infinity_extra_modality, + modality=modality, ) open_ai_embedding_input_image.additional_properties = d diff --git a/libs/client_infinity/infinity_client/infinity_client/models/open_ai_embedding_input_image_infinity_extra_modality.py b/libs/client_infinity/infinity_client/infinity_client/models/open_ai_embedding_input_image_modality.py similarity index 61% rename from libs/client_infinity/infinity_client/infinity_client/models/open_ai_embedding_input_image_infinity_extra_modality.py rename to libs/client_infinity/infinity_client/infinity_client/models/open_ai_embedding_input_image_modality.py index 20a57588..def53598 100644 --- a/libs/client_infinity/infinity_client/infinity_client/models/open_ai_embedding_input_image_infinity_extra_modality.py +++ b/libs/client_infinity/infinity_client/infinity_client/models/open_ai_embedding_input_image_modality.py @@ -1,7 +1,7 @@ from enum import Enum -class OpenAIEmbeddingInputImageInfinityExtraModality(str, Enum): +class OpenAIEmbeddingInputImageModality(str, Enum): IMAGE = "image" def __str__(self) -> str: diff --git a/libs/client_infinity/infinity_client/infinity_client/models/open_ai_embedding_input_text.py b/libs/client_infinity/infinity_client/infinity_client/models/open_ai_embedding_input_text.py index 2396a2f8..c68d1456 100644 --- a/libs/client_infinity/infinity_client/infinity_client/models/open_ai_embedding_input_text.py +++ b/libs/client_infinity/infinity_client/infinity_client/models/open_ai_embedding_input_text.py @@ -4,7 +4,7 @@ from attrs import field as _attrs_field from ..models.embedding_encoding_format import EmbeddingEncodingFormat -from ..models.open_ai_embedding_input_text_infinity_extra_modality import OpenAIEmbeddingInputTextInfinityExtraModality +from ..models.open_ai_embedding_input_text_modality import OpenAIEmbeddingInputTextModality from ..types import UNSET, Unset T = TypeVar("T", bound="OpenAIEmbeddingInputText") @@ -19,17 +19,14 @@ class OpenAIEmbeddingInputText: model (Union[Unset, str]): Default: 'default/not-specified'. encoding_format (Union[Unset, EmbeddingEncodingFormat]): user (Union[None, Unset, str]): - infinity_extra_modality (Union[Unset, OpenAIEmbeddingInputTextInfinityExtraModality]): Default: - OpenAIEmbeddingInputTextInfinityExtraModality.TEXT. + modality (Union[Unset, OpenAIEmbeddingInputTextModality]): Default: OpenAIEmbeddingInputTextModality.TEXT. """ input_: Union[List[str], str] model: Union[Unset, str] = "default/not-specified" encoding_format: Union[Unset, EmbeddingEncodingFormat] = UNSET user: Union[None, Unset, str] = UNSET - infinity_extra_modality: Union[ - Unset, OpenAIEmbeddingInputTextInfinityExtraModality - ] = OpenAIEmbeddingInputTextInfinityExtraModality.TEXT + modality: Union[Unset, OpenAIEmbeddingInputTextModality] = OpenAIEmbeddingInputTextModality.TEXT additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: @@ -52,9 +49,9 @@ def to_dict(self) -> Dict[str, Any]: else: user = self.user - infinity_extra_modality: Union[Unset, str] = UNSET - if not isinstance(self.infinity_extra_modality, Unset): - infinity_extra_modality = self.infinity_extra_modality.value + modality: Union[Unset, str] = UNSET + if not isinstance(self.modality, Unset): + modality = self.modality.value field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) @@ -69,8 +66,8 @@ def to_dict(self) -> Dict[str, Any]: field_dict["encoding_format"] = encoding_format if user is not UNSET: field_dict["user"] = user - if infinity_extra_modality is not UNSET: - field_dict["infinity_extra_modality"] = infinity_extra_modality + if modality is not UNSET: + field_dict["modality"] = modality return field_dict @@ -109,19 +106,19 @@ def _parse_user(data: object) -> Union[None, Unset, str]: user = _parse_user(d.pop("user", UNSET)) - _infinity_extra_modality = d.pop("infinity_extra_modality", UNSET) - infinity_extra_modality: Union[Unset, OpenAIEmbeddingInputTextInfinityExtraModality] - if isinstance(_infinity_extra_modality, Unset): - infinity_extra_modality = UNSET + _modality = d.pop("modality", UNSET) + modality: Union[Unset, OpenAIEmbeddingInputTextModality] + if isinstance(_modality, Unset): + modality = UNSET else: - infinity_extra_modality = OpenAIEmbeddingInputTextInfinityExtraModality(_infinity_extra_modality) + modality = OpenAIEmbeddingInputTextModality(_modality) open_ai_embedding_input_text = cls( input_=input_, model=model, encoding_format=encoding_format, user=user, - infinity_extra_modality=infinity_extra_modality, + modality=modality, ) open_ai_embedding_input_text.additional_properties = d diff --git a/libs/client_infinity/infinity_client/infinity_client/models/open_ai_embedding_input_text_infinity_extra_modality.py b/libs/client_infinity/infinity_client/infinity_client/models/open_ai_embedding_input_text_modality.py similarity index 61% rename from libs/client_infinity/infinity_client/infinity_client/models/open_ai_embedding_input_text_infinity_extra_modality.py rename to libs/client_infinity/infinity_client/infinity_client/models/open_ai_embedding_input_text_modality.py index 2d38fd9e..40b0cda8 100644 --- a/libs/client_infinity/infinity_client/infinity_client/models/open_ai_embedding_input_text_infinity_extra_modality.py +++ b/libs/client_infinity/infinity_client/infinity_client/models/open_ai_embedding_input_text_modality.py @@ -1,7 +1,7 @@ from enum import Enum -class OpenAIEmbeddingInputTextInfinityExtraModality(str, Enum): +class OpenAIEmbeddingInputTextModality(str, Enum): TEXT = "text" def __str__(self) -> str: diff --git a/libs/client_infinity/infinity_client/infinity_client/models/rerank_input.py b/libs/client_infinity/infinity_client/infinity_client/models/rerank_input.py index b332229f..f96943ff 100644 --- a/libs/client_infinity/infinity_client/infinity_client/models/rerank_input.py +++ b/libs/client_infinity/infinity_client/infinity_client/models/rerank_input.py @@ -18,6 +18,7 @@ class RerankInput: return_documents (Union[Unset, bool]): Default: False. raw_scores (Union[Unset, bool]): Default: False. model (Union[Unset, str]): Default: 'default/not-specified'. + top_n (Union[None, Unset, int]): """ query: str @@ -25,6 +26,7 @@ class RerankInput: return_documents: Union[Unset, bool] = False raw_scores: Union[Unset, bool] = False model: Union[Unset, str] = "default/not-specified" + top_n: Union[None, Unset, int] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: @@ -38,6 +40,12 @@ def to_dict(self) -> Dict[str, Any]: model = self.model + top_n: Union[None, Unset, int] + if isinstance(self.top_n, Unset): + top_n = UNSET + else: + top_n = self.top_n + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -52,6 +60,8 @@ def to_dict(self) -> Dict[str, Any]: field_dict["raw_scores"] = raw_scores if model is not UNSET: field_dict["model"] = model + if top_n is not UNSET: + field_dict["top_n"] = top_n return field_dict @@ -68,12 +78,22 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: model = d.pop("model", UNSET) + def _parse_top_n(data: object) -> Union[None, Unset, int]: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(Union[None, Unset, int], data) + + top_n = _parse_top_n(d.pop("top_n", UNSET)) + rerank_input = cls( query=query, documents=documents, return_documents=return_documents, raw_scores=raw_scores, model=model, + top_n=top_n, ) rerank_input.additional_properties = d diff --git a/libs/client_infinity/infinity_client/pyproject.toml b/libs/client_infinity/infinity_client/pyproject.toml index 46e56b77..d327210c 100644 --- a/libs/client_infinity/infinity_client/pyproject.toml +++ b/libs/client_infinity/infinity_client/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "infinity_client" -version = "0.0.58" +version = "0.0.62" description = "A client library for accessing ♾️ Infinity - Embedding Inference Server" authors = [] readme = "README.md"