freeplay 0.3.4__tar.gz → 0.3.6__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.
- {freeplay-0.3.4 → freeplay-0.3.6}/PKG-INFO +1 -1
- {freeplay-0.3.4 → freeplay-0.3.6}/pyproject.toml +1 -1
- {freeplay-0.3.4 → freeplay-0.3.6}/src/freeplay/model.py +1 -1
- {freeplay-0.3.4 → freeplay-0.3.6}/src/freeplay/resources/prompts.py +2 -2
- {freeplay-0.3.4 → freeplay-0.3.6}/src/freeplay/utils.py +1 -1
- {freeplay-0.3.4 → freeplay-0.3.6}/LICENSE +0 -0
- {freeplay-0.3.4 → freeplay-0.3.6}/README.md +0 -0
- {freeplay-0.3.4 → freeplay-0.3.6}/src/freeplay/__init__.py +0 -0
- {freeplay-0.3.4 → freeplay-0.3.6}/src/freeplay/api_support.py +0 -0
- {freeplay-0.3.4 → freeplay-0.3.6}/src/freeplay/errors.py +0 -0
- {freeplay-0.3.4 → freeplay-0.3.6}/src/freeplay/freeplay.py +0 -0
- {freeplay-0.3.4 → freeplay-0.3.6}/src/freeplay/freeplay_cli.py +0 -0
- {freeplay-0.3.4 → freeplay-0.3.6}/src/freeplay/llm_parameters.py +0 -0
- {freeplay-0.3.4 → freeplay-0.3.6}/src/freeplay/py.typed +0 -0
- {freeplay-0.3.4 → freeplay-0.3.6}/src/freeplay/resources/__init__.py +0 -0
- {freeplay-0.3.4 → freeplay-0.3.6}/src/freeplay/resources/customer_feedback.py +0 -0
- {freeplay-0.3.4 → freeplay-0.3.6}/src/freeplay/resources/recordings.py +0 -0
- {freeplay-0.3.4 → freeplay-0.3.6}/src/freeplay/resources/sessions.py +0 -0
- {freeplay-0.3.4 → freeplay-0.3.6}/src/freeplay/resources/test_runs.py +0 -0
- {freeplay-0.3.4 → freeplay-0.3.6}/src/freeplay/support.py +0 -0
@@ -1,7 +1,7 @@
|
|
1
1
|
from dataclasses import dataclass
|
2
2
|
from typing import List, Union, Any, Dict, Mapping, TypedDict
|
3
3
|
|
4
|
-
InputValue = Union[str, int, bool, Dict[str, Any], List[Any]]
|
4
|
+
InputValue = Union[str, int, bool, float, Dict[str, Any], List[Any]]
|
5
5
|
InputVariables = Mapping[str, InputValue]
|
6
6
|
TestRunInput = Mapping[str, InputValue]
|
7
7
|
FeedbackValue = Union[bool, str, int, float]
|
@@ -256,13 +256,13 @@ class FilesystemTemplateResolver(TemplateResolver):
|
|
256
256
|
def __render_into_v2(json_dom: Dict[str, Any]) -> PromptTemplate:
|
257
257
|
format_version = json_dom.get('format_version')
|
258
258
|
|
259
|
-
if format_version
|
259
|
+
if format_version and format_version >= 2:
|
260
260
|
metadata = json_dom['metadata']
|
261
261
|
flavor_name = metadata.get('flavor')
|
262
262
|
model = metadata.get('model')
|
263
263
|
|
264
264
|
return PromptTemplate(
|
265
|
-
format_version=
|
265
|
+
format_version=format_version,
|
266
266
|
prompt_template_id=json_dom.get('prompt_template_id'), # type: ignore
|
267
267
|
prompt_template_version_id=json_dom.get('prompt_template_version_id'), # type: ignore
|
268
268
|
prompt_template_name=json_dom.get('prompt_template_name'), # type: ignore
|
@@ -10,7 +10,7 @@ from .model import InputVariables
|
|
10
10
|
|
11
11
|
# Validate that the variables are of the correct type, and do not include functions, dates, classes or None values.
|
12
12
|
def all_valid(obj: Any) -> bool:
|
13
|
-
if isinstance(obj, (int, str, bool)):
|
13
|
+
if isinstance(obj, (int, str, bool, float)):
|
14
14
|
return True
|
15
15
|
elif isinstance(obj, list):
|
16
16
|
return all(all_valid(item) for item in obj)
|
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
|