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 arcllm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@

from __future__ import annotations

__version__ = "0.4.1"
__version__ = "0.4.2"
__all__ = [
"APIConnectionError",
"APIError",
Expand Down
16 changes: 11 additions & 5 deletions arcllm/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,19 +427,25 @@ def model_dump(self) -> dict[str, Any]:


class EmbeddingResponse(msgspec.Struct):
"""Response from an embedding request."""
"""Response from an embedding request.

model: str
data: list[EmbeddingData]
usage: EmbeddingUsage
All fields default — matches the litellm-compat contract where test
fixtures construct ``EmbeddingResponse()`` with no args and populate
fields after the fact. Adapters always set every field on real
responses, so this is purely for caller ergonomics.
"""

model: str = ""
data: list[EmbeddingData] = []
usage: EmbeddingUsage | None = None
object: str = "list"

def model_dump(self) -> dict[str, Any]:
"""Return dict representation for serialization."""
return {
"model": self.model,
"data": [d.model_dump() for d in self.data],
"usage": self.usage.model_dump(),
"usage": self.usage.model_dump() if self.usage is not None else None,
"object": self.object,
}

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "arcllm-sdk"
version = "0.4.1"
version = "0.4.2"
description = "The arc connecting you to every LLM. Minimal dependencies, maximum performance."
readme = "README.md"
license = "Apache-2.0"
Expand Down
Loading