Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/assets/openapi.json

Large diffs are not rendered by default.

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.71"
version = "0.0.72"
description = "A client library for accessing ♾️ Infinity - Embedding Inference Server"
authors = []
readme = "README.md"
Expand Down
10 changes: 9 additions & 1 deletion libs/infinity_emb/infinity_emb/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,15 @@ def cache_dir(self) -> Path:

@cached_property
def queue_size(self) -> int:
return int(self._optional_infinity_var("queue_size", default="32000"))
size = int(self._optional_infinity_var("queue_size", default="32000"))
assert size > 0, "INFINITY_QUEUE_SIZE must be a positive number"
return size

@cached_property
def max_client_batch_size(self) -> int:
size = int(self._optional_infinity_var("max_client_batch_size", default="2048"))
assert size > 0, "INFINITY_MAX_CLIENT_BATCH_SIZE must be a positive number"
return size

@cached_property
def permissive_cors(self):
Expand Down
5 changes: 3 additions & 2 deletions libs/infinity_emb/infinity_emb/fastapi_schemas/pydantic_v2.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from pydantic import AnyUrl, HttpUrl, StringConstraints
from infinity_emb.env import MANAGER

__all__ = [
"INPUT_STRING",
Expand All @@ -14,9 +15,9 @@
INPUT_STRING = StringConstraints(max_length=8192 * 15, strip_whitespace=True)
ITEMS_LIMIT = {
"min_length": 1,
"max_length": 2048,
"max_length": MANAGER.max_client_batch_size,
}
ITEMS_LIMIT_SMALL = {
"min_length": 1,
"max_length": 32,
"max_length": min(32, MANAGER.max_client_batch_size),
}
2 changes: 1 addition & 1 deletion libs/infinity_emb/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

[tool.poetry]
name = "infinity_emb"
version = "0.0.71"
version = "0.0.72"
description = "Infinity is a high-throughput, low-latency REST API for serving text-embeddings, reranking models and clip."
authors = ["michaelfeil <noreply@michaelfeil.eu>"]
license = "MIT"
Expand Down
Loading