variably-sdk 2.2.0__tar.gz → 2.3.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.2.0 → variably_sdk-2.3.0}/PKG-INFO +1 -1
- {variably_sdk-2.2.0 → variably_sdk-2.3.0}/pyproject.toml +1 -1
- {variably_sdk-2.2.0 → variably_sdk-2.3.0}/src/variably/client.py +4 -4
- {variably_sdk-2.2.0 → variably_sdk-2.3.0}/src/variably/http_client.py +1 -5
- {variably_sdk-2.2.0 → variably_sdk-2.3.0}/src/variably/version.py +1 -1
- {variably_sdk-2.2.0 → variably_sdk-2.3.0}/src/variably_sdk.egg-info/PKG-INFO +1 -1
- {variably_sdk-2.2.0 → variably_sdk-2.3.0}/README.md +0 -0
- {variably_sdk-2.2.0 → variably_sdk-2.3.0}/setup.cfg +0 -0
- {variably_sdk-2.2.0 → variably_sdk-2.3.0}/setup.py +0 -0
- {variably_sdk-2.2.0 → variably_sdk-2.3.0}/src/variably/__init__.py +0 -0
- {variably_sdk-2.2.0 → variably_sdk-2.3.0}/src/variably/cache.py +0 -0
- {variably_sdk-2.2.0 → variably_sdk-2.3.0}/src/variably/config.py +0 -0
- {variably_sdk-2.2.0 → variably_sdk-2.3.0}/src/variably/errors.py +0 -0
- {variably_sdk-2.2.0 → variably_sdk-2.3.0}/src/variably/logger.py +0 -0
- {variably_sdk-2.2.0 → variably_sdk-2.3.0}/src/variably/types.py +0 -0
- {variably_sdk-2.2.0 → variably_sdk-2.3.0}/src/variably_sdk.egg-info/SOURCES.txt +0 -0
- {variably_sdk-2.2.0 → variably_sdk-2.3.0}/src/variably_sdk.egg-info/dependency_links.txt +0 -0
- {variably_sdk-2.2.0 → variably_sdk-2.3.0}/src/variably_sdk.egg-info/requires.txt +0 -0
- {variably_sdk-2.2.0 → variably_sdk-2.3.0}/src/variably_sdk.egg-info/top_level.txt +0 -0
- {variably_sdk-2.2.0 → variably_sdk-2.3.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.3.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"
|
|
@@ -480,8 +480,8 @@ class VariablyClient:
|
|
|
480
480
|
experiment_key: str,
|
|
481
481
|
user_context: UserContext,
|
|
482
482
|
input_variables: Dict[str, Any],
|
|
483
|
-
evaluation_mode: str = "full",
|
|
484
483
|
evaluation_context: Optional[Dict[str, Any]] = None,
|
|
484
|
+
**kwargs,
|
|
485
485
|
) -> EvaluateResponse:
|
|
486
486
|
"""Managed execution: Variably selects variant, calls LLM, evaluates."""
|
|
487
487
|
if not experiment_key or not isinstance(experiment_key, str):
|
|
@@ -494,7 +494,7 @@ class VariablyClient:
|
|
|
494
494
|
)
|
|
495
495
|
|
|
496
496
|
response = self.http_client.evaluate_prompt(
|
|
497
|
-
experiment_key, dict(user_context), input_variables,
|
|
497
|
+
experiment_key, dict(user_context), input_variables,
|
|
498
498
|
evaluation_context=evaluation_context,
|
|
499
499
|
)
|
|
500
500
|
|
|
@@ -515,8 +515,8 @@ class VariablyClient:
|
|
|
515
515
|
experiment_key: str,
|
|
516
516
|
user_context: UserContext,
|
|
517
517
|
input_variables: Dict[str, Any],
|
|
518
|
-
evaluation_mode: str = "full",
|
|
519
518
|
evaluation_context: Optional[Dict[str, Any]] = None,
|
|
519
|
+
**kwargs,
|
|
520
520
|
) -> StreamingEvaluateResponse:
|
|
521
521
|
"""Managed execution with streaming. Yields token strings.
|
|
522
522
|
|
|
@@ -537,7 +537,7 @@ class VariablyClient:
|
|
|
537
537
|
)
|
|
538
538
|
|
|
539
539
|
raw_response = self.http_client.evaluate_prompt_stream(
|
|
540
|
-
experiment_key, dict(user_context), input_variables,
|
|
540
|
+
experiment_key, dict(user_context), input_variables,
|
|
541
541
|
evaluation_context=evaluation_context,
|
|
542
542
|
)
|
|
543
543
|
|
|
@@ -60,7 +60,7 @@ class HTTPClient:
|
|
|
60
60
|
session.headers.update({
|
|
61
61
|
"Content-Type": "application/json",
|
|
62
62
|
"X-API-Key": self.config.api_key,
|
|
63
|
-
"User-Agent": "Variably-Python-SDK/2.
|
|
63
|
+
"User-Agent": "Variably-Python-SDK/2.3.0",
|
|
64
64
|
})
|
|
65
65
|
|
|
66
66
|
return session
|
|
@@ -185,7 +185,6 @@ class HTTPClient:
|
|
|
185
185
|
def evaluate_prompt(
|
|
186
186
|
self, experiment_key: str, user_context: Dict[str, Any],
|
|
187
187
|
input_variables: Dict[str, Any],
|
|
188
|
-
evaluation_mode: str = "full",
|
|
189
188
|
evaluation_context: Optional[Dict[str, Any]] = None,
|
|
190
189
|
) -> Dict[str, Any]:
|
|
191
190
|
"""Managed execution: select variant, call LLM, evaluate."""
|
|
@@ -193,7 +192,6 @@ class HTTPClient:
|
|
|
193
192
|
"experiment_key": experiment_key,
|
|
194
193
|
"user_context": self._convert_user_context(user_context),
|
|
195
194
|
"input_variables": input_variables,
|
|
196
|
-
"evaluation_mode": evaluation_mode,
|
|
197
195
|
}
|
|
198
196
|
if evaluation_context:
|
|
199
197
|
request_data["evaluation_context"] = evaluation_context
|
|
@@ -208,7 +206,6 @@ class HTTPClient:
|
|
|
208
206
|
def evaluate_prompt_stream(
|
|
209
207
|
self, experiment_key: str, user_context: Dict[str, Any],
|
|
210
208
|
input_variables: Dict[str, Any],
|
|
211
|
-
evaluation_mode: str = "full",
|
|
212
209
|
evaluation_context: Optional[Dict[str, Any]] = None,
|
|
213
210
|
) -> requests.Response:
|
|
214
211
|
"""Managed execution with streaming: returns raw SSE response for token parsing."""
|
|
@@ -216,7 +213,6 @@ class HTTPClient:
|
|
|
216
213
|
"experiment_key": experiment_key,
|
|
217
214
|
"user_context": self._convert_user_context(user_context),
|
|
218
215
|
"input_variables": input_variables,
|
|
219
|
-
"evaluation_mode": evaluation_mode,
|
|
220
216
|
}
|
|
221
217
|
if evaluation_context:
|
|
222
218
|
request_data["evaluation_context"] = evaluation_context
|
|
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
|