Skip to content

Commit

Permalink
update client (#407)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfeil authored Oct 8, 2024
1 parent 9ab1059 commit 2528349
Show file tree
Hide file tree
Showing 15 changed files with 114 additions and 107 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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\"
)
```
Expand All @@ -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\"
}
)
```
Expand All @@ -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\"
}
)
Expand All @@ -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\"
}
)
```
Expand Down Expand Up @@ -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
Expand All @@ -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\"
)
```
Expand All @@ -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\"
}
)
```
Expand All @@ -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\"
}
)
Expand All @@ -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\"
}
)
```
Expand Down Expand Up @@ -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
Expand All @@ -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\"
)
```
Expand All @@ -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\"
}
)
```
Expand All @@ -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\"
}
)
Expand All @@ -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\"
}
)
```
Expand Down Expand Up @@ -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
Expand All @@ -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\"
)
```
Expand All @@ -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\"
}
)
```
Expand All @@ -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\"
}
)
Expand All @@ -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\"
}
)
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand All @@ -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
Expand All @@ -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.
Expand All @@ -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
Expand All @@ -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.
Expand All @@ -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
Expand All @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand All @@ -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
Expand All @@ -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.
Expand All @@ -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
Expand All @@ -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.
Expand All @@ -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
Expand All @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -46,11 +46,11 @@
"ModelInfoObject",
"ModelInfoOwnedBy",
"OpenAIEmbeddingInputAudio",
"OpenAIEmbeddingInputAudioInfinityExtraModality",
"OpenAIEmbeddingInputAudioModality",
"OpenAIEmbeddingInputImage",
"OpenAIEmbeddingInputImageInfinityExtraModality",
"OpenAIEmbeddingInputImageModality",
"OpenAIEmbeddingInputText",
"OpenAIEmbeddingInputTextInfinityExtraModality",
"OpenAIEmbeddingInputTextModality",
"OpenAIEmbeddingResult",
"OpenAIEmbeddingResultObject",
"OpenAIModelInfo",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

@_attrs_define
class AudioEmbeddingInput:
"""# LEGACY
"""LEGACY, DO NO LONGER UPDATE
Attributes:
input_ (Union[List[str], str]):
Expand Down
Loading

0 comments on commit 2528349

Please sign in to comment.