maitai-python 1.1.8__tar.gz → 1.1.9b0__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.
- {maitai_python-1.1.8 → maitai_python-1.1.9b0}/PKG-INFO +1 -1
- {maitai_python-1.1.8 → maitai_python-1.1.9b0}/maitai/_utils.py +3 -1
- {maitai_python-1.1.8 → maitai_python-1.1.9b0}/maitai/tools/__init__.py +5 -1
- {maitai_python-1.1.8 → maitai_python-1.1.9b0}/maitai_common/version.py +1 -1
- {maitai_python-1.1.8 → maitai_python-1.1.9b0}/maitai_gen/chat/__init__.py +13 -0
- {maitai_python-1.1.8 → maitai_python-1.1.9b0}/maitai_gen/sentinel/__init__.py +14 -0
- {maitai_python-1.1.8 → maitai_python-1.1.9b0}/maitai_python.egg-info/PKG-INFO +1 -1
- {maitai_python-1.1.8 → maitai_python-1.1.9b0}/README.md +0 -0
- {maitai_python-1.1.8 → maitai_python-1.1.9b0}/maitai/__init__.py +0 -0
- {maitai_python-1.1.8 → maitai_python-1.1.9b0}/maitai/_azure.py +0 -0
- {maitai_python-1.1.8 → maitai_python-1.1.9b0}/maitai/_config.py +0 -0
- {maitai_python-1.1.8 → maitai_python-1.1.9b0}/maitai/_config_listener_thread.py +0 -0
- {maitai_python-1.1.8 → maitai_python-1.1.9b0}/maitai/_context.py +0 -0
- {maitai_python-1.1.8 → maitai_python-1.1.9b0}/maitai/_evaluator.py +0 -0
- {maitai_python-1.1.8 → maitai_python-1.1.9b0}/maitai/_inference.py +0 -0
- {maitai_python-1.1.8 → maitai_python-1.1.9b0}/maitai/_maitai.py +0 -0
- {maitai_python-1.1.8 → maitai_python-1.1.9b0}/maitai/_maitai_async.py +0 -0
- {maitai_python-1.1.8 → maitai_python-1.1.9b0}/maitai/_maitai_client.py +0 -0
- {maitai_python-1.1.8 → maitai_python-1.1.9b0}/maitai/_types.py +0 -0
- {maitai_python-1.1.8 → maitai_python-1.1.9b0}/maitai_common/__init__.py +0 -0
- {maitai_python-1.1.8 → maitai_python-1.1.9b0}/maitai_common/config/__init__.py +0 -0
- {maitai_python-1.1.8 → maitai_python-1.1.9b0}/maitai_common/config/config_service.py +0 -0
- {maitai_python-1.1.8 → maitai_python-1.1.9b0}/maitai_common/processes/__init__.py +0 -0
- {maitai_python-1.1.8 → maitai_python-1.1.9b0}/maitai_common/processes/io_thread.py +0 -0
- {maitai_python-1.1.8 → maitai_python-1.1.9b0}/maitai_common/processes/websocket_listener_thread.py +0 -0
- {maitai_python-1.1.8 → maitai_python-1.1.9b0}/maitai_common/utils/__init__.py +0 -0
- {maitai_python-1.1.8 → maitai_python-1.1.9b0}/maitai_common/utils/proto_utils.py +0 -0
- {maitai_python-1.1.8 → maitai_python-1.1.9b0}/maitai_common/utils/types.py +0 -0
- {maitai_python-1.1.8 → maitai_python-1.1.9b0}/maitai_gen/__init__.py +0 -0
- {maitai_python-1.1.8 → maitai_python-1.1.9b0}/maitai_gen/application/__init__.py +0 -0
- {maitai_python-1.1.8 → maitai_python-1.1.9b0}/maitai_gen/backtest/__init__.py +0 -0
- {maitai_python-1.1.8 → maitai_python-1.1.9b0}/maitai_gen/company/__init__.py +0 -0
- {maitai_python-1.1.8 → maitai_python-1.1.9b0}/maitai_gen/config/__init__.py +0 -0
- {maitai_python-1.1.8 → maitai_python-1.1.9b0}/maitai_gen/embedding/__init__.py +0 -0
- {maitai_python-1.1.8 → maitai_python-1.1.9b0}/maitai_gen/event/__init__.py +0 -0
- {maitai_python-1.1.8 → maitai_python-1.1.9b0}/maitai_gen/inference/__init__.py +0 -0
- {maitai_python-1.1.8 → maitai_python-1.1.9b0}/maitai_gen/key/__init__.py +0 -0
- {maitai_python-1.1.8 → maitai_python-1.1.9b0}/maitai_gen/metric/__init__.py +0 -0
- {maitai_python-1.1.8 → maitai_python-1.1.9b0}/maitai_gen/model/__init__.py +0 -0
- {maitai_python-1.1.8 → maitai_python-1.1.9b0}/maitai_gen/notification/__init__.py +0 -0
- {maitai_python-1.1.8 → maitai_python-1.1.9b0}/maitai_gen/sandbox/__init__.py +0 -0
- {maitai_python-1.1.8 → maitai_python-1.1.9b0}/maitai_gen/session/__init__.py +0 -0
- {maitai_python-1.1.8 → maitai_python-1.1.9b0}/maitai_python.egg-info/SOURCES.txt +0 -0
- {maitai_python-1.1.8 → maitai_python-1.1.9b0}/maitai_python.egg-info/dependency_links.txt +0 -0
- {maitai_python-1.1.8 → maitai_python-1.1.9b0}/maitai_python.egg-info/requires.txt +0 -0
- {maitai_python-1.1.8 → maitai_python-1.1.9b0}/maitai_python.egg-info/top_level.txt +0 -0
- {maitai_python-1.1.8 → maitai_python-1.1.9b0}/setup.cfg +0 -0
- {maitai_python-1.1.8 → maitai_python-1.1.9b0}/setup.py +0 -0
|
@@ -110,7 +110,7 @@ def get_chat_completion_params(*,
|
|
|
110
110
|
max_tokens: Union[Optional[int], openai.NotGiven] = openai.NOT_GIVEN,
|
|
111
111
|
n: Union[Optional[int], openai.NotGiven] = openai.NOT_GIVEN,
|
|
112
112
|
presence_penalty: Union[Optional[float], openai.NotGiven] = openai.NOT_GIVEN,
|
|
113
|
-
response_format: Union[openai_types.completion_create_params.ResponseFormat, openai.NotGiven] = openai.NOT_GIVEN,
|
|
113
|
+
response_format: Union[openai_types.completion_create_params.ResponseFormat, chat_types.ResponseFormat, openai.NotGiven] = openai.NOT_GIVEN,
|
|
114
114
|
seed: Union[Optional[int], openai.NotGiven] = openai.NOT_GIVEN,
|
|
115
115
|
stop: Union[Union[Optional[str], List[str]], openai.NotGiven] = openai.NOT_GIVEN,
|
|
116
116
|
stream: Optional[bool] = False,
|
|
@@ -153,6 +153,8 @@ def get_chat_completion_params(*,
|
|
|
153
153
|
|
|
154
154
|
if response_format != openai.NOT_GIVEN:
|
|
155
155
|
params.response_format = chat_types.ResponseFormat(type=response_format["type"])
|
|
156
|
+
if response_format.get("json_schema"):
|
|
157
|
+
params.response_format.json_schema = chat_types.JsonSchema().from_dict(response_format["json_schema"])
|
|
156
158
|
|
|
157
159
|
if tools != openai.NOT_GIVEN:
|
|
158
160
|
params.tools = []
|
|
@@ -31,7 +31,10 @@ class Tools:
|
|
|
31
31
|
return function_response
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
def tool(func):
|
|
34
|
+
def tool(func=None, strict=True):
|
|
35
|
+
if func is None:
|
|
36
|
+
return lambda f: tool(f, strict=strict)
|
|
37
|
+
|
|
35
38
|
function_description = func.__doc__
|
|
36
39
|
if not function_description:
|
|
37
40
|
raise ValueError("Missing docstring for tool")
|
|
@@ -68,6 +71,7 @@ def tool(func):
|
|
|
68
71
|
type="function",
|
|
69
72
|
function=Function(
|
|
70
73
|
name=func.__name__,
|
|
74
|
+
strict=strict,
|
|
71
75
|
description=function_description,
|
|
72
76
|
parameters={
|
|
73
77
|
"type": "object",
|
|
@@ -122,6 +122,9 @@ class ChatCompletionParams(betterproto.Message):
|
|
|
122
122
|
@dataclass(eq=False, repr=False)
|
|
123
123
|
class ResponseFormat(betterproto.Message):
|
|
124
124
|
type: str = betterproto.string_field(1)
|
|
125
|
+
json_schema: Optional["JsonSchema"] = betterproto.message_field(
|
|
126
|
+
2, optional=True, group="_json_schema"
|
|
127
|
+
)
|
|
125
128
|
|
|
126
129
|
|
|
127
130
|
@dataclass(eq=False, repr=False)
|
|
@@ -142,6 +145,16 @@ class Function(betterproto.Message):
|
|
|
142
145
|
parameters: Dict[str, str] = betterproto.map_field(
|
|
143
146
|
3, betterproto.TYPE_STRING, betterproto.TYPE_STRING
|
|
144
147
|
)
|
|
148
|
+
strict: bool = betterproto.bool_field(4)
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
@dataclass(eq=False, repr=False)
|
|
152
|
+
class JsonSchema(betterproto.Message):
|
|
153
|
+
name: str = betterproto.string_field(1)
|
|
154
|
+
strict: bool = betterproto.bool_field(2)
|
|
155
|
+
schema: Dict[str, str] = betterproto.map_field(
|
|
156
|
+
3, betterproto.TYPE_STRING, betterproto.TYPE_STRING
|
|
157
|
+
)
|
|
145
158
|
|
|
146
159
|
|
|
147
160
|
@dataclass(eq=False, repr=False)
|
|
@@ -32,6 +32,7 @@ class Sentinel(betterproto.Message):
|
|
|
32
32
|
meta: Dict[str, str] = betterproto.map_field(
|
|
33
33
|
9, betterproto.TYPE_STRING, betterproto.TYPE_STRING
|
|
34
34
|
)
|
|
35
|
+
sentinel_generation_id: int = betterproto.int64_field(10)
|
|
35
36
|
|
|
36
37
|
|
|
37
38
|
@dataclass(eq=False, repr=False)
|
|
@@ -53,3 +54,16 @@ class DirectiveBody(betterproto.Message):
|
|
|
53
54
|
class SentinelExample(betterproto.Message):
|
|
54
55
|
example_type: str = betterproto.string_field(1)
|
|
55
56
|
example_body: str = betterproto.string_field(2)
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
@dataclass(eq=False, repr=False)
|
|
60
|
+
class SentinelGeneration(betterproto.Message):
|
|
61
|
+
id: int = betterproto.int64_field(1)
|
|
62
|
+
date_created: int = betterproto.int64_field(2)
|
|
63
|
+
company_id: int = betterproto.int64_field(3)
|
|
64
|
+
application_id: int = betterproto.int64_field(4)
|
|
65
|
+
application_action_id: int = betterproto.int64_field(5)
|
|
66
|
+
base_prompt: str = betterproto.string_field(6)
|
|
67
|
+
meta: Dict[str, str] = betterproto.map_field(
|
|
68
|
+
7, betterproto.TYPE_STRING, betterproto.TYPE_STRING
|
|
69
|
+
)
|
|
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
|
{maitai_python-1.1.8 → maitai_python-1.1.9b0}/maitai_common/processes/websocket_listener_thread.py
RENAMED
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|