freeplay 0.2.36__tar.gz → 0.2.37__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.2.36 → freeplay-0.2.37}/PKG-INFO +1 -1
- {freeplay-0.2.36 → freeplay-0.2.37}/pyproject.toml +1 -1
- {freeplay-0.2.36 → freeplay-0.2.37}/src/freeplay/flavors.py +1 -1
- {freeplay-0.2.36 → freeplay-0.2.37}/src/freeplay/model.py +1 -1
- {freeplay-0.2.36 → freeplay-0.2.37}/src/freeplay/support.py +1 -1
- {freeplay-0.2.36 → freeplay-0.2.37}/src/freeplay/thin/resources/prompts.py +8 -8
- {freeplay-0.2.36 → freeplay-0.2.37}/src/freeplay/thin/resources/recordings.py +2 -2
- {freeplay-0.2.36 → freeplay-0.2.37}/LICENSE +0 -0
- {freeplay-0.2.36 → freeplay-0.2.37}/README.md +0 -0
- {freeplay-0.2.36 → freeplay-0.2.37}/src/freeplay/__init__.py +0 -0
- {freeplay-0.2.36 → freeplay-0.2.37}/src/freeplay/api_support.py +0 -0
- {freeplay-0.2.36 → freeplay-0.2.37}/src/freeplay/completions.py +0 -0
- {freeplay-0.2.36 → freeplay-0.2.37}/src/freeplay/errors.py +0 -0
- {freeplay-0.2.36 → freeplay-0.2.37}/src/freeplay/freeplay.py +0 -0
- {freeplay-0.2.36 → freeplay-0.2.37}/src/freeplay/freeplay_cli.py +0 -0
- {freeplay-0.2.36 → freeplay-0.2.37}/src/freeplay/llm_parameters.py +0 -0
- {freeplay-0.2.36 → freeplay-0.2.37}/src/freeplay/provider_config.py +0 -0
- {freeplay-0.2.36 → freeplay-0.2.37}/src/freeplay/py.typed +0 -0
- {freeplay-0.2.36 → freeplay-0.2.37}/src/freeplay/record.py +0 -0
- {freeplay-0.2.36 → freeplay-0.2.37}/src/freeplay/thin/__init__.py +0 -0
- {freeplay-0.2.36 → freeplay-0.2.37}/src/freeplay/thin/freeplay_thin.py +0 -0
- {freeplay-0.2.36 → freeplay-0.2.37}/src/freeplay/thin/resources/__init__.py +0 -0
- {freeplay-0.2.36 → freeplay-0.2.37}/src/freeplay/thin/resources/customer_feedback.py +0 -0
- {freeplay-0.2.36 → freeplay-0.2.37}/src/freeplay/thin/resources/sessions.py +0 -0
- {freeplay-0.2.36 → freeplay-0.2.37}/src/freeplay/thin/resources/test_runs.py +0 -0
- {freeplay-0.2.36 → freeplay-0.2.37}/src/freeplay/utils.py +0 -0
@@ -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
|
53
|
+
def to_llm_syntax(self, messages: List[ChatMessage]) -> Union[str, List[ChatMessage]]:
|
54
54
|
raise NotImplementedError()
|
55
55
|
|
56
56
|
@abstractmethod
|
@@ -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,
|
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
|
|
@@ -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[
|
33
|
-
formatted_prompt: Union[str, List[
|
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:
|
42
|
-
) -> List[
|
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[
|
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[
|
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[
|
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[
|
53
|
+
all_messages: List[Dict[str, str]]
|
54
54
|
inputs: InputVariables
|
55
55
|
|
56
56
|
session_info: SessionInfo
|
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
|
File without changes
|
File without changes
|
File without changes
|