freeplay 0.3.0a7__tar.gz → 0.3.0a8__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.0a7 → freeplay-0.3.0a8}/PKG-INFO +1 -1
- {freeplay-0.3.0a7 → freeplay-0.3.0a8}/pyproject.toml +1 -1
- {freeplay-0.3.0a7 → freeplay-0.3.0a8}/src/freeplay/resources/recordings.py +5 -1
- {freeplay-0.3.0a7 → freeplay-0.3.0a8}/src/freeplay/resources/test_runs.py +9 -2
- {freeplay-0.3.0a7 → freeplay-0.3.0a8}/src/freeplay/support.py +5 -1
- {freeplay-0.3.0a7 → freeplay-0.3.0a8}/LICENSE +0 -0
- {freeplay-0.3.0a7 → freeplay-0.3.0a8}/README.md +0 -0
- {freeplay-0.3.0a7 → freeplay-0.3.0a8}/src/freeplay/__init__.py +0 -0
- {freeplay-0.3.0a7 → freeplay-0.3.0a8}/src/freeplay/api_support.py +0 -0
- {freeplay-0.3.0a7 → freeplay-0.3.0a8}/src/freeplay/errors.py +0 -0
- {freeplay-0.3.0a7 → freeplay-0.3.0a8}/src/freeplay/freeplay.py +0 -0
- {freeplay-0.3.0a7 → freeplay-0.3.0a8}/src/freeplay/freeplay_cli.py +0 -0
- {freeplay-0.3.0a7 → freeplay-0.3.0a8}/src/freeplay/llm_parameters.py +0 -0
- {freeplay-0.3.0a7 → freeplay-0.3.0a8}/src/freeplay/model.py +0 -0
- {freeplay-0.3.0a7 → freeplay-0.3.0a8}/src/freeplay/py.typed +0 -0
- {freeplay-0.3.0a7 → freeplay-0.3.0a8}/src/freeplay/resources/__init__.py +0 -0
- {freeplay-0.3.0a7 → freeplay-0.3.0a8}/src/freeplay/resources/customer_feedback.py +0 -0
- {freeplay-0.3.0a7 → freeplay-0.3.0a8}/src/freeplay/resources/prompts.py +0 -0
- {freeplay-0.3.0a7 → freeplay-0.3.0a8}/src/freeplay/resources/sessions.py +0 -0
- {freeplay-0.3.0a7 → freeplay-0.3.0a8}/src/freeplay/utils.py +0 -0
@@ -1,7 +1,7 @@
|
|
1
1
|
import json
|
2
2
|
import logging
|
3
3
|
from dataclasses import dataclass
|
4
|
-
from typing import Any, Dict, List, Optional
|
4
|
+
from typing import Any, Dict, List, Optional, Union
|
5
5
|
|
6
6
|
from requests import HTTPError
|
7
7
|
|
@@ -61,6 +61,7 @@ class RecordPayload:
|
|
61
61
|
call_info: CallInfo
|
62
62
|
response_info: ResponseInfo
|
63
63
|
test_run_info: Optional[TestRunInfo] = None
|
64
|
+
eval_results: Optional[Dict[str, Union[bool, float]]] = None
|
64
65
|
|
65
66
|
|
66
67
|
@dataclass
|
@@ -111,6 +112,9 @@ class Recordings:
|
|
111
112
|
if record_payload.test_run_info is not None:
|
112
113
|
record_api_payload['test_case_id'] = record_payload.test_run_info.test_case_id
|
113
114
|
|
115
|
+
if record_payload.eval_results is not None:
|
116
|
+
record_api_payload['eval_results'] = record_payload.eval_results
|
117
|
+
|
114
118
|
try:
|
115
119
|
recorded_response = api_support.post_raw(
|
116
120
|
api_key=self.call_support.freeplay_api_key,
|
@@ -40,8 +40,15 @@ class TestRuns:
|
|
40
40
|
def __init__(self, call_support: CallSupport) -> None:
|
41
41
|
self.call_support = call_support
|
42
42
|
|
43
|
-
def create(
|
44
|
-
|
43
|
+
def create(
|
44
|
+
self,
|
45
|
+
project_id: str,
|
46
|
+
testlist: str,
|
47
|
+
include_outputs: bool = False,
|
48
|
+
name: Optional[str] = None,
|
49
|
+
description: Optional[str] = None
|
50
|
+
) -> TestRun:
|
51
|
+
test_run = self.call_support.create_test_run(project_id, testlist, include_outputs, name, description)
|
45
52
|
test_cases = [
|
46
53
|
TestCase(test_case_id=test_case.id, variables=test_case.variables, output=test_case.output)
|
47
54
|
for test_case in test_run.test_cases
|
@@ -123,7 +123,9 @@ class CallSupport:
|
|
123
123
|
self,
|
124
124
|
project_id: str,
|
125
125
|
testlist: str,
|
126
|
-
include_test_case_outputs: bool = False
|
126
|
+
include_test_case_outputs: bool = False,
|
127
|
+
name: Optional[str] = None,
|
128
|
+
description: Optional[str] = None
|
127
129
|
) -> TestRunResponse:
|
128
130
|
response = api_support.post_raw(
|
129
131
|
api_key=self.freeplay_api_key,
|
@@ -131,6 +133,8 @@ class CallSupport:
|
|
131
133
|
payload={
|
132
134
|
'testlist_name': testlist,
|
133
135
|
'include_test_case_outputs': include_test_case_outputs,
|
136
|
+
'name': name,
|
137
|
+
'description': description
|
134
138
|
},
|
135
139
|
)
|
136
140
|
|
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
|