Skip to content

Commit

Permalink
bump to 0.0.59
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfeil committed Oct 3, 2024
1 parent 99d28e2 commit 3de8ea7
Show file tree
Hide file tree
Showing 10 changed files with 137 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ def sync_detailed(
requests.post(\"http://..:7997/classify\",
json={\"model\":\"SamLowe/roberta-base-go_emotions\",\"input\":[\"I am not having a great
day.\"]})
```
Args:
body (ClassifyInput):
Expand Down Expand Up @@ -110,6 +111,7 @@ def sync(
requests.post(\"http://..:7997/classify\",
json={\"model\":\"SamLowe/roberta-base-go_emotions\",\"input\":[\"I am not having a great
day.\"]})
```
Args:
body (ClassifyInput):
Expand Down Expand Up @@ -142,6 +144,7 @@ async def asyncio_detailed(
requests.post(\"http://..:7997/classify\",
json={\"model\":\"SamLowe/roberta-base-go_emotions\",\"input\":[\"I am not having a great
day.\"]})
```
Args:
body (ClassifyInput):
Expand Down Expand Up @@ -177,6 +180,7 @@ async def asyncio(
requests.post(\"http://..:7997/classify\",
json={\"model\":\"SamLowe/roberta-base-go_emotions\",\"input\":[\"I am not having a great
day.\"]})
```
Args:
body (ClassifyInput):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ def sync_detailed(
import requests
requests.post(\"http://..:7997/embeddings\",
json={\"model\":\"BAAI/bge-small-en-v1.5\",\"input\":[\"A sentence to encode.\"]})
```
Args:
body (OpenAIEmbeddingInput):
Expand Down Expand Up @@ -108,6 +109,7 @@ def sync(
import requests
requests.post(\"http://..:7997/embeddings\",
json={\"model\":\"BAAI/bge-small-en-v1.5\",\"input\":[\"A sentence to encode.\"]})
```
Args:
body (OpenAIEmbeddingInput):
Expand Down Expand Up @@ -139,6 +141,7 @@ async def asyncio_detailed(
import requests
requests.post(\"http://..:7997/embeddings\",
json={\"model\":\"BAAI/bge-small-en-v1.5\",\"input\":[\"A sentence to encode.\"]})
```
Args:
body (OpenAIEmbeddingInput):
Expand Down Expand Up @@ -173,6 +176,7 @@ async def asyncio(
import requests
requests.post(\"http://..:7997/embeddings\",
json={\"model\":\"BAAI/bge-small-en-v1.5\",\"input\":[\"A sentence to encode.\"]})
```
Args:
body (OpenAIEmbeddingInput):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,20 @@ def sync_detailed(
Encode Embeddings from Audio files
Supports URLs of Audios and Base64-encoded Audios
```python
import requests
requests.post(\"http://..:7997/embeddings_audio\",
json={\"model\":\"laion/larger_clap_general\",\"input\":[\"https://github.com/michaelfeil/infini
ty/raw/3b72eb7c14bae06e68ddd07c1f23fe0bf403f220/libs/infinity_emb/tests/data/audio/beep.wav\"]})
json={
\"model\":\"laion/larger_clap_general\",
\"input\": [
\"https://github.com/michaelfeil/infinity/raw/3b72eb7c14bae06e68ddd07c1f23fe0bf403f220/l
ibs/infinity_emb/tests/data/audio/beep.wav\",
\"data:audio/wav;base64,iVBORw0KGgoDEMOoSAMPLEoENCODEDAUDIO\"
]
})
```
Args:
body (AudioEmbeddingInput):
Expand Down Expand Up @@ -105,11 +114,20 @@ def sync(
Encode Embeddings from Audio files
Supports URLs of Audios and Base64-encoded Audios
```python
import requests
requests.post(\"http://..:7997/embeddings_audio\",
json={\"model\":\"laion/larger_clap_general\",\"input\":[\"https://github.com/michaelfeil/infini
ty/raw/3b72eb7c14bae06e68ddd07c1f23fe0bf403f220/libs/infinity_emb/tests/data/audio/beep.wav\"]})
json={
\"model\":\"laion/larger_clap_general\",
\"input\": [
\"https://github.com/michaelfeil/infinity/raw/3b72eb7c14bae06e68ddd07c1f23fe0bf403f220/l
ibs/infinity_emb/tests/data/audio/beep.wav\",
\"data:audio/wav;base64,iVBORw0KGgoDEMOoSAMPLEoENCODEDAUDIO\"
]
})
```
Args:
body (AudioEmbeddingInput):
Expand Down Expand Up @@ -137,11 +155,20 @@ async def asyncio_detailed(
Encode Embeddings from Audio files
Supports URLs of Audios and Base64-encoded Audios
```python
import requests
requests.post(\"http://..:7997/embeddings_audio\",
json={\"model\":\"laion/larger_clap_general\",\"input\":[\"https://github.com/michaelfeil/infini
ty/raw/3b72eb7c14bae06e68ddd07c1f23fe0bf403f220/libs/infinity_emb/tests/data/audio/beep.wav\"]})
json={
\"model\":\"laion/larger_clap_general\",
\"input\": [
\"https://github.com/michaelfeil/infinity/raw/3b72eb7c14bae06e68ddd07c1f23fe0bf403f220/l
ibs/infinity_emb/tests/data/audio/beep.wav\",
\"data:audio/wav;base64,iVBORw0KGgoDEMOoSAMPLEoENCODEDAUDIO\"
]
})
```
Args:
body (AudioEmbeddingInput):
Expand Down Expand Up @@ -172,11 +199,20 @@ async def asyncio(
Encode Embeddings from Audio files
Supports URLs of Audios and Base64-encoded Audios
```python
import requests
requests.post(\"http://..:7997/embeddings_audio\",
json={\"model\":\"laion/larger_clap_general\",\"input\":[\"https://github.com/michaelfeil/infini
ty/raw/3b72eb7c14bae06e68ddd07c1f23fe0bf403f220/libs/infinity_emb/tests/data/audio/beep.wav\"]})
json={
\"model\":\"laion/larger_clap_general\",
\"input\": [
\"https://github.com/michaelfeil/infinity/raw/3b72eb7c14bae06e68ddd07c1f23fe0bf403f220/l
ibs/infinity_emb/tests/data/audio/beep.wav\",
\"data:audio/wav;base64,iVBORw0KGgoDEMOoSAMPLEoENCODEDAUDIO\"
]
})
```
Args:
body (AudioEmbeddingInput):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,19 @@ def sync_detailed(
Encode Embeddings from Image files
Supports URLs of Images and Base64-encoded Images
```python
import requests
requests.post(\"http://..:7997/embeddings_image\",
json={\"model\":\"openai/clip-vit-base-
patch32\",\"input\":[\"http://images.cocodataset.org/val2017/000000039769.jpg\"]})
json={
\"model\":\"openai/clip-vit-base-patch32\",
\"input\": [
\"http://images.cocodataset.org/val2017/000000039769.jpg\",
\"data:image/png;base64,iVBORw0KGgoDEMOoSAMPLEoENCODEDIMAGE\"
]
})
```
Args:
body (ImageEmbeddingInput):
Expand Down Expand Up @@ -105,11 +113,19 @@ def sync(
Encode Embeddings from Image files
Supports URLs of Images and Base64-encoded Images
```python
import requests
requests.post(\"http://..:7997/embeddings_image\",
json={\"model\":\"openai/clip-vit-base-
patch32\",\"input\":[\"http://images.cocodataset.org/val2017/000000039769.jpg\"]})
json={
\"model\":\"openai/clip-vit-base-patch32\",
\"input\": [
\"http://images.cocodataset.org/val2017/000000039769.jpg\",
\"data:image/png;base64,iVBORw0KGgoDEMOoSAMPLEoENCODEDIMAGE\"
]
})
```
Args:
body (ImageEmbeddingInput):
Expand Down Expand Up @@ -137,11 +153,19 @@ async def asyncio_detailed(
Encode Embeddings from Image files
Supports URLs of Images and Base64-encoded Images
```python
import requests
requests.post(\"http://..:7997/embeddings_image\",
json={\"model\":\"openai/clip-vit-base-
patch32\",\"input\":[\"http://images.cocodataset.org/val2017/000000039769.jpg\"]})
json={
\"model\":\"openai/clip-vit-base-patch32\",
\"input\": [
\"http://images.cocodataset.org/val2017/000000039769.jpg\",
\"data:image/png;base64,iVBORw0KGgoDEMOoSAMPLEoENCODEDIMAGE\"
]
})
```
Args:
body (ImageEmbeddingInput):
Expand Down Expand Up @@ -172,11 +196,19 @@ async def asyncio(
Encode Embeddings from Image files
Supports URLs of Images and Base64-encoded Images
```python
import requests
requests.post(\"http://..:7997/embeddings_image\",
json={\"model\":\"openai/clip-vit-base-
patch32\",\"input\":[\"http://images.cocodataset.org/val2017/000000039769.jpg\"]})
json={
\"model\":\"openai/clip-vit-base-patch32\",
\"input\": [
\"http://images.cocodataset.org/val2017/000000039769.jpg\",
\"data:image/png;base64,iVBORw0KGgoDEMOoSAMPLEoENCODEDIMAGE\"
]
})
```
Args:
body (ImageEmbeddingInput):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ def sync_detailed(
\"query\":\"Where is Munich?\",
\"documents\":[\"Munich is in Germany.\", \"The sky is blue.\"]
})
```
Args:
body (RerankInput): Input for reranking
Expand Down Expand Up @@ -116,6 +117,7 @@ def sync(
\"query\":\"Where is Munich?\",
\"documents\":[\"Munich is in Germany.\", \"The sky is blue.\"]
})
```
Args:
body (RerankInput): Input for reranking
Expand Down Expand Up @@ -151,6 +153,7 @@ async def asyncio_detailed(
\"query\":\"Where is Munich?\",
\"documents\":[\"Munich is in Germany.\", \"The sky is blue.\"]
})
```
Args:
body (RerankInput): Input for reranking
Expand Down Expand Up @@ -189,6 +192,7 @@ async def asyncio(
\"query\":\"Where is Munich?\",
\"documents\":[\"Munich is in Germany.\", \"The sky is blue.\"]
})
```
Args:
body (RerankInput): Input for reranking
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ class AudioEmbeddingInput:
def to_dict(self) -> Dict[str, Any]:
input_: Union[List[str], str]
if isinstance(self.input_, list):
input_ = self.input_
input_ = []
for input_type_0_item_data in self.input_:
input_type_0_item: str
input_type_0_item = input_type_0_item_data
input_.append(input_type_0_item)

else:
input_ = self.input_
Expand Down Expand Up @@ -69,7 +73,16 @@ def _parse_input_(data: object) -> Union[List[str], str]:
try:
if not isinstance(data, list):
raise TypeError()
input_type_0 = cast(List[str], data)
input_type_0 = []
_input_type_0 = data
for input_type_0_item_data in _input_type_0:

def _parse_input_type_0_item(data: object) -> str:
return cast(str, data)

input_type_0_item = _parse_input_type_0_item(input_type_0_item_data)

input_type_0.append(input_type_0_item)

return input_type_0
except: # noqa: E722
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ class ImageEmbeddingInput:
def to_dict(self) -> Dict[str, Any]:
input_: Union[List[str], str]
if isinstance(self.input_, list):
input_ = self.input_
input_ = []
for input_type_0_item_data in self.input_:
input_type_0_item: str
input_type_0_item = input_type_0_item_data
input_.append(input_type_0_item)

else:
input_ = self.input_
Expand Down Expand Up @@ -69,7 +73,16 @@ def _parse_input_(data: object) -> Union[List[str], str]:
try:
if not isinstance(data, list):
raise TypeError()
input_type_0 = cast(List[str], data)
input_type_0 = []
_input_type_0 = data
for input_type_0_item_data in _input_type_0:

def _parse_input_type_0_item(data: object) -> str:
return cast(str, data)

input_type_0_item = _parse_input_type_0_item(input_type_0_item_data)

input_type_0.append(input_type_0_item)

return input_type_0
except: # noqa: E722
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@ class RerankInput:
query (str):
documents (List[str]):
return_documents (Union[Unset, bool]): Default: False.
raw_scores (Union[Unset, bool]): Default: False.
model (Union[Unset, str]): Default: 'default/not-specified'.
"""

query: str
documents: List[str]
return_documents: Union[Unset, bool] = False
raw_scores: Union[Unset, bool] = False
model: Union[Unset, str] = "default/not-specified"
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)

Expand All @@ -32,6 +34,8 @@ def to_dict(self) -> Dict[str, Any]:

return_documents = self.return_documents

raw_scores = self.raw_scores

model = self.model

field_dict: Dict[str, Any] = {}
Expand All @@ -44,6 +48,8 @@ def to_dict(self) -> Dict[str, Any]:
)
if return_documents is not UNSET:
field_dict["return_documents"] = return_documents
if raw_scores is not UNSET:
field_dict["raw_scores"] = raw_scores
if model is not UNSET:
field_dict["model"] = model

Expand All @@ -58,12 +64,15 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:

return_documents = d.pop("return_documents", UNSET)

raw_scores = d.pop("raw_scores", UNSET)

model = d.pop("model", UNSET)

rerank_input = cls(
query=query,
documents=documents,
return_documents=return_documents,
raw_scores=raw_scores,
model=model,
)

Expand Down
2 changes: 1 addition & 1 deletion libs/client_infinity/infinity_client/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "infinity_client"
version = "0.0.58"
version = "0.0.59"
description = "A client library for accessing ♾️ Infinity - Embedding Inference Server"
authors = []
readme = "README.md"
Expand Down
Loading

0 comments on commit 3de8ea7

Please sign in to comment.