freeplay 0.2.36__py3-none-any.whl → 0.2.37__py3-none-any.whl

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/flavors.py CHANGED
@@ -50,7 +50,7 @@ class Flavor(ABC):
50
50
  pass
51
51
 
52
52
  @abstractmethod
53
- def to_llm_syntax(self, messages: List[ChatMessage]) -> str | List[ChatMessage]:
53
+ def to_llm_syntax(self, messages: List[ChatMessage]) -> Union[str, List[ChatMessage]]:
54
54
  raise NotImplementedError()
55
55
 
56
56
  @abstractmethod
freeplay/model.py CHANGED
@@ -3,7 +3,7 @@ from typing import List, Union, Any, Dict, Mapping
3
3
 
4
4
  from pydantic import RootModel
5
5
 
6
- InputValue = Union[str, int, bool, dict[str, Any], list[Any]]
6
+ InputValue = Union[str, int, bool, Dict[str, Any], List[Any]]
7
7
  InputVariable = RootModel[Union[Dict[str, "InputVariable"], List["InputVariable"], str, int, bool, float]]
8
8
  InputVariable.model_rebuild()
9
9
 
freeplay/support.py CHANGED
@@ -28,7 +28,7 @@ class TestRunResponse:
28
28
  def __init__(
29
29
  self,
30
30
  test_run_id: str,
31
- test_cases: list[JsonDom]
31
+ test_cases: List[JsonDom]
32
32
  ):
33
33
  self.test_cases = [
34
34
  TestCaseTestRunResponse(test_case)
@@ -2,7 +2,7 @@ import json
2
2
  from abc import ABC, abstractmethod
3
3
  from dataclasses import dataclass
4
4
  from pathlib import Path
5
- from typing import Optional, List, Union, cast
5
+ from typing import Dict, Optional, List, Union, cast
6
6
 
7
7
  from freeplay.completions import PromptTemplates, ChatMessage, PromptTemplateWithMetadata
8
8
  from freeplay.errors import FreeplayConfigurationError
@@ -29,8 +29,8 @@ class FormattedPrompt:
29
29
  def __init__(
30
30
  self,
31
31
  prompt_info: PromptInfo,
32
- messages: List[dict[str, str]],
33
- formatted_prompt: Union[str, List[dict[str, str]]]
32
+ messages: List[Dict[str, str]],
33
+ formatted_prompt: Union[str, List[Dict[str, str]]]
34
34
  ):
35
35
  self.prompt_info = prompt_info
36
36
  self.messages = messages
@@ -38,8 +38,8 @@ class FormattedPrompt:
38
38
 
39
39
  def all_messages(
40
40
  self,
41
- new_message: dict[str, str]
42
- ) -> List[dict[str, str]]:
41
+ new_message: Dict[str, str]
42
+ ) -> List[Dict[str, str]]:
43
43
  return self.messages + [new_message]
44
44
 
45
45
 
@@ -47,7 +47,7 @@ class BoundPrompt:
47
47
  def __init__(
48
48
  self,
49
49
  prompt_info: PromptInfo,
50
- messages: List[dict[str, str]]
50
+ messages: List[Dict[str, str]]
51
51
  ):
52
52
  self.prompt_info = prompt_info
53
53
  self.messages = messages
@@ -63,7 +63,7 @@ class BoundPrompt:
63
63
  return FormattedPrompt(
64
64
  self.prompt_info,
65
65
  self.messages,
66
- cast(Union[str, List[dict[str, str]]], llm_format)
66
+ cast(Union[str, List[Dict[str, str]]], llm_format)
67
67
  )
68
68
 
69
69
 
@@ -71,7 +71,7 @@ class TemplatePrompt:
71
71
  def __init__(
72
72
  self,
73
73
  prompt_info: PromptInfo,
74
- messages: List[dict[str, str]]
74
+ messages: List[Dict[str, str]]
75
75
  ):
76
76
  self.prompt_info = prompt_info
77
77
  self.messages = messages
@@ -1,7 +1,7 @@
1
1
  import json
2
2
  import logging
3
3
  from dataclasses import dataclass
4
- from typing import Optional, List
4
+ from typing import Dict, Optional, List
5
5
 
6
6
  from freeplay import api_support
7
7
  from freeplay.completions import PromptTemplateWithMetadata, OpenAIFunctionCall
@@ -50,7 +50,7 @@ class TestRunInfo:
50
50
 
51
51
  @dataclass
52
52
  class RecordPayload:
53
- all_messages: List[dict[str, str]]
53
+ all_messages: List[Dict[str, str]]
54
54
  inputs: InputVariables
55
55
 
56
56
  session_info: SessionInfo
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: freeplay
3
- Version: 0.2.36
3
+ Version: 0.2.37
4
4
  Summary:
5
5
  License: MIT
6
6
  Author: FreePlay Engineering
@@ -2,26 +2,26 @@ freeplay/__init__.py,sha256=74A9S9hmLq9BNHsdx0-37yDxlSukudNl9bJ0TE60Z30,61
2
2
  freeplay/api_support.py,sha256=u8b1e9prlR4_qOcqmFduU7U35ubQt1tWJ6bXhUdsv0c,2240
3
3
  freeplay/completions.py,sha256=F1rMBtQaCtn0rBQqvCurkV25g8gLtwnEod5rRvf-txY,1176
4
4
  freeplay/errors.py,sha256=bPqsw32YX-xSr7O-G49M0sSFF7mq-YF1WGq928UV47s,631
5
- freeplay/flavors.py,sha256=XroBKT8Nf92VTsuC261Nceo9f9stkkpC5CXbi8y4NEs,17236
5
+ freeplay/flavors.py,sha256=IytHc1C1q0ZTJn9T6Mt6oJn6eeTqQBc-9habH7p-T80,17242
6
6
  freeplay/freeplay.py,sha256=BLlr4YXh3a624xcM93KvZGsiIGSMrIMFM07lLyVCIao,17089
7
7
  freeplay/freeplay_cli.py,sha256=k9QPBedcFqpy9Ec9k7DT_y-NpVxHqRF5jKPTaQBBs1Q,3863
8
8
  freeplay/llm_parameters.py,sha256=bQbfuC8EICF0XMZQa5pwI3FkQqxmCUVqHO3gYHy3Tg8,898
9
- freeplay/model.py,sha256=kVARXUEJKbhOdWz7T8eR7npTPXlpaY9wWaEzJvbIvOU,534
9
+ freeplay/model.py,sha256=7BRAuyxsLl8X-ue8wXPmAiKYp4OaYI-HkaGc3t5qtMU,534
10
10
  freeplay/provider_config.py,sha256=hruf3Khusrwb76_-hv7ouuxmvJuaRyC1UxIw7XlJx8A,1416
11
11
  freeplay/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
12
  freeplay/record.py,sha256=69vO9vYGFL8gLrvRqLzlvodVNo05GOzKDJnCyhUha08,3615
13
- freeplay/support.py,sha256=gMPh8papI5AsXQp0clpsbbQP0Bz6HreP5aNaD3pefW0,13083
13
+ freeplay/support.py,sha256=KP_rRgn0gh6n5BOGGExHO9pip9Pj22_WSvF6v106kX8,13083
14
14
  freeplay/thin/__init__.py,sha256=XgU_eMmTpOPCa9w5mVOyxPgwAgRFfVdRWDazYGYZtQ0,351
15
15
  freeplay/thin/freeplay_thin.py,sha256=raVESB8VWoCSeCsGPDr-DOx37WXi8D27odKnOeDWwV0,1613
16
16
  freeplay/thin/resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
17
  freeplay/thin/resources/customer_feedback.py,sha256=aTM7Eez7iYmjXSpRqkHxf4pi6xBrzVnMiQCEJVfPGvg,527
18
- freeplay/thin/resources/prompts.py,sha256=TPDK1aPqHQYt8pOrWLa4sTQ4fCS9rXc4so39BD8lwG0,7136
19
- freeplay/thin/resources/recordings.py,sha256=PZ6V-ajFLQhDW5GlN6P0zQeFIzu-l18G3m_HLx_2SQg,5041
18
+ freeplay/thin/resources/prompts.py,sha256=CRsvrIIe59WHTAA1PFvfNOK2x9S-C9zCz_z8XzsIg4w,7142
19
+ freeplay/thin/resources/recordings.py,sha256=utrGTjPPiNt1btI0Hiti9s7VvCYFWqitAx35zrXrOfg,5047
20
20
  freeplay/thin/resources/sessions.py,sha256=ioWdeTM9BSrEWKrFH66ysQIw5kCTlCVopJDmWtFgHz0,868
21
21
  freeplay/thin/resources/test_runs.py,sha256=L8A1tQHzYg9UmLgbNFtFa8pGXqyrcoyTtSE0sSnd9UE,1267
22
22
  freeplay/utils.py,sha256=cRCCIzVqWNDKlTI-DDhXGyCkplbd-X4qzDs__aUpvww,1840
23
- freeplay-0.2.36.dist-info/LICENSE,sha256=_jzIw45hB1XHGxiQ8leZ0GH_X7bR_a8qgxaqnHbCUOo,1064
24
- freeplay-0.2.36.dist-info/METADATA,sha256=0oHYCwAtXWZ7riK8p7FDg4_VjjnTmvYi-zU0_K4fSYg,1676
25
- freeplay-0.2.36.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
26
- freeplay-0.2.36.dist-info/entry_points.txt,sha256=32s3rf2UUCqiJT4jnClEXZhdXlvl30uwpcxz-Gsy4UU,54
27
- freeplay-0.2.36.dist-info/RECORD,,
23
+ freeplay-0.2.37.dist-info/LICENSE,sha256=_jzIw45hB1XHGxiQ8leZ0GH_X7bR_a8qgxaqnHbCUOo,1064
24
+ freeplay-0.2.37.dist-info/METADATA,sha256=0QabpMND4wK9yg-3bGxZZJzMKVTikH0v1iLf0HOgyiE,1676
25
+ freeplay-0.2.37.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
26
+ freeplay-0.2.37.dist-info/entry_points.txt,sha256=32s3rf2UUCqiJT4jnClEXZhdXlvl30uwpcxz-Gsy4UU,54
27
+ freeplay-0.2.37.dist-info/RECORD,,