variably-sdk 2.4.0__tar.gz → 2.5.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {variably_sdk-2.4.0 → variably_sdk-2.5.0}/PKG-INFO +1 -1
- {variably_sdk-2.4.0 → variably_sdk-2.5.0}/pyproject.toml +1 -1
- {variably_sdk-2.4.0 → variably_sdk-2.5.0}/src/variably/client.py +4 -0
- {variably_sdk-2.4.0 → variably_sdk-2.5.0}/src/variably_sdk.egg-info/PKG-INFO +1 -1
- {variably_sdk-2.4.0 → variably_sdk-2.5.0}/README.md +0 -0
- {variably_sdk-2.4.0 → variably_sdk-2.5.0}/setup.cfg +0 -0
- {variably_sdk-2.4.0 → variably_sdk-2.5.0}/setup.py +0 -0
- {variably_sdk-2.4.0 → variably_sdk-2.5.0}/src/variably/__init__.py +0 -0
- {variably_sdk-2.4.0 → variably_sdk-2.5.0}/src/variably/cache.py +0 -0
- {variably_sdk-2.4.0 → variably_sdk-2.5.0}/src/variably/config.py +0 -0
- {variably_sdk-2.4.0 → variably_sdk-2.5.0}/src/variably/errors.py +0 -0
- {variably_sdk-2.4.0 → variably_sdk-2.5.0}/src/variably/http_client.py +0 -0
- {variably_sdk-2.4.0 → variably_sdk-2.5.0}/src/variably/logger.py +0 -0
- {variably_sdk-2.4.0 → variably_sdk-2.5.0}/src/variably/types.py +0 -0
- {variably_sdk-2.4.0 → variably_sdk-2.5.0}/src/variably/version.py +0 -0
- {variably_sdk-2.4.0 → variably_sdk-2.5.0}/src/variably_sdk.egg-info/SOURCES.txt +0 -0
- {variably_sdk-2.4.0 → variably_sdk-2.5.0}/src/variably_sdk.egg-info/dependency_links.txt +0 -0
- {variably_sdk-2.4.0 → variably_sdk-2.5.0}/src/variably_sdk.egg-info/requires.txt +0 -0
- {variably_sdk-2.4.0 → variably_sdk-2.5.0}/src/variably_sdk.egg-info/top_level.txt +0 -0
- {variably_sdk-2.4.0 → variably_sdk-2.5.0}/tests/test_streaming.py +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "variably-sdk"
|
|
7
|
-
version = "2.
|
|
7
|
+
version = "2.5.0"
|
|
8
8
|
description = "Official Python SDK for Variably feature flags, LLM experimentation, and prompt optimization platform"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.7"
|
|
@@ -612,6 +612,7 @@ class VariablyClient:
|
|
|
612
612
|
latency_ms: Optional[int] = None,
|
|
613
613
|
prompt_tokens: Optional[int] = None,
|
|
614
614
|
completion_tokens: Optional[int] = None,
|
|
615
|
+
cost: Optional[float] = None,
|
|
615
616
|
metadata: Optional[Dict[str, Any]] = None,
|
|
616
617
|
) -> LogResult:
|
|
617
618
|
"""Log a prompt/response pair for 43-dimension evaluation (Observe Mode).
|
|
@@ -633,6 +634,7 @@ class VariablyClient:
|
|
|
633
634
|
latency_ms: LLM call latency in milliseconds.
|
|
634
635
|
prompt_tokens: Number of input tokens.
|
|
635
636
|
completion_tokens: Number of output tokens.
|
|
637
|
+
cost: Cost in USD for this LLM call.
|
|
636
638
|
metadata: Arbitrary key-value metadata.
|
|
637
639
|
|
|
638
640
|
Returns:
|
|
@@ -673,6 +675,8 @@ class VariablyClient:
|
|
|
673
675
|
data["prompt_tokens"] = prompt_tokens
|
|
674
676
|
if completion_tokens is not None:
|
|
675
677
|
data["completion_tokens"] = completion_tokens
|
|
678
|
+
if cost is not None:
|
|
679
|
+
data["cost"] = cost
|
|
676
680
|
if metadata:
|
|
677
681
|
data["metadata"] = metadata
|
|
678
682
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|