maitai-python 1.1.11b0__tar.gz → 1.1.12b0__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.
Files changed (48) hide show
  1. {maitai_python-1.1.11b0 → maitai_python-1.1.12b0}/PKG-INFO +1 -1
  2. {maitai_python-1.1.11b0 → maitai_python-1.1.12b0}/maitai/_maitai.py +4 -1
  3. {maitai_python-1.1.11b0 → maitai_python-1.1.12b0}/maitai/_maitai_async.py +4 -1
  4. {maitai_python-1.1.11b0 → maitai_python-1.1.12b0}/maitai/_utils.py +2 -0
  5. {maitai_python-1.1.11b0 → maitai_python-1.1.12b0}/maitai_common/version.py +1 -1
  6. {maitai_python-1.1.11b0 → maitai_python-1.1.12b0}/maitai_gen/chat/__init__.py +1 -0
  7. {maitai_python-1.1.11b0 → maitai_python-1.1.12b0}/maitai_python.egg-info/PKG-INFO +1 -1
  8. {maitai_python-1.1.11b0 → maitai_python-1.1.12b0}/README.md +0 -0
  9. {maitai_python-1.1.11b0 → maitai_python-1.1.12b0}/maitai/__init__.py +0 -0
  10. {maitai_python-1.1.11b0 → maitai_python-1.1.12b0}/maitai/_azure.py +0 -0
  11. {maitai_python-1.1.11b0 → maitai_python-1.1.12b0}/maitai/_config.py +0 -0
  12. {maitai_python-1.1.11b0 → maitai_python-1.1.12b0}/maitai/_config_listener_thread.py +0 -0
  13. {maitai_python-1.1.11b0 → maitai_python-1.1.12b0}/maitai/_context.py +0 -0
  14. {maitai_python-1.1.11b0 → maitai_python-1.1.12b0}/maitai/_evaluator.py +0 -0
  15. {maitai_python-1.1.11b0 → maitai_python-1.1.12b0}/maitai/_inference.py +0 -0
  16. {maitai_python-1.1.11b0 → maitai_python-1.1.12b0}/maitai/_maitai_client.py +0 -0
  17. {maitai_python-1.1.11b0 → maitai_python-1.1.12b0}/maitai/_types.py +0 -0
  18. {maitai_python-1.1.11b0 → maitai_python-1.1.12b0}/maitai/tools/__init__.py +0 -0
  19. {maitai_python-1.1.11b0 → maitai_python-1.1.12b0}/maitai_common/__init__.py +0 -0
  20. {maitai_python-1.1.11b0 → maitai_python-1.1.12b0}/maitai_common/config/__init__.py +0 -0
  21. {maitai_python-1.1.11b0 → maitai_python-1.1.12b0}/maitai_common/config/config_service.py +0 -0
  22. {maitai_python-1.1.11b0 → maitai_python-1.1.12b0}/maitai_common/processes/__init__.py +0 -0
  23. {maitai_python-1.1.11b0 → maitai_python-1.1.12b0}/maitai_common/processes/io_thread.py +0 -0
  24. {maitai_python-1.1.11b0 → maitai_python-1.1.12b0}/maitai_common/processes/websocket_listener_thread.py +0 -0
  25. {maitai_python-1.1.11b0 → maitai_python-1.1.12b0}/maitai_common/utils/__init__.py +0 -0
  26. {maitai_python-1.1.11b0 → maitai_python-1.1.12b0}/maitai_common/utils/proto_utils.py +0 -0
  27. {maitai_python-1.1.11b0 → maitai_python-1.1.12b0}/maitai_common/utils/types.py +0 -0
  28. {maitai_python-1.1.11b0 → maitai_python-1.1.12b0}/maitai_gen/__init__.py +0 -0
  29. {maitai_python-1.1.11b0 → maitai_python-1.1.12b0}/maitai_gen/application/__init__.py +0 -0
  30. {maitai_python-1.1.11b0 → maitai_python-1.1.12b0}/maitai_gen/backtest/__init__.py +0 -0
  31. {maitai_python-1.1.11b0 → maitai_python-1.1.12b0}/maitai_gen/company/__init__.py +0 -0
  32. {maitai_python-1.1.11b0 → maitai_python-1.1.12b0}/maitai_gen/config/__init__.py +0 -0
  33. {maitai_python-1.1.11b0 → maitai_python-1.1.12b0}/maitai_gen/embedding/__init__.py +0 -0
  34. {maitai_python-1.1.11b0 → maitai_python-1.1.12b0}/maitai_gen/event/__init__.py +0 -0
  35. {maitai_python-1.1.11b0 → maitai_python-1.1.12b0}/maitai_gen/inference/__init__.py +0 -0
  36. {maitai_python-1.1.11b0 → maitai_python-1.1.12b0}/maitai_gen/key/__init__.py +0 -0
  37. {maitai_python-1.1.11b0 → maitai_python-1.1.12b0}/maitai_gen/metric/__init__.py +0 -0
  38. {maitai_python-1.1.11b0 → maitai_python-1.1.12b0}/maitai_gen/model/__init__.py +0 -0
  39. {maitai_python-1.1.11b0 → maitai_python-1.1.12b0}/maitai_gen/notification/__init__.py +0 -0
  40. {maitai_python-1.1.11b0 → maitai_python-1.1.12b0}/maitai_gen/sandbox/__init__.py +0 -0
  41. {maitai_python-1.1.11b0 → maitai_python-1.1.12b0}/maitai_gen/sentinel/__init__.py +0 -0
  42. {maitai_python-1.1.11b0 → maitai_python-1.1.12b0}/maitai_gen/session/__init__.py +0 -0
  43. {maitai_python-1.1.11b0 → maitai_python-1.1.12b0}/maitai_python.egg-info/SOURCES.txt +0 -0
  44. {maitai_python-1.1.11b0 → maitai_python-1.1.12b0}/maitai_python.egg-info/dependency_links.txt +0 -0
  45. {maitai_python-1.1.11b0 → maitai_python-1.1.12b0}/maitai_python.egg-info/requires.txt +0 -0
  46. {maitai_python-1.1.11b0 → maitai_python-1.1.12b0}/maitai_python.egg-info/top_level.txt +0 -0
  47. {maitai_python-1.1.11b0 → maitai_python-1.1.12b0}/setup.cfg +0 -0
  48. {maitai_python-1.1.11b0 → maitai_python-1.1.12b0}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: maitai-python
3
- Version: 1.1.11b0
3
+ Version: 1.1.12b0
4
4
  Summary: Maitai SDK for Python
5
5
  Home-page: https://docs.trymaitai.ai
6
6
  Author: Maitai
@@ -149,6 +149,7 @@ class Completions:
149
149
  extra_query: Optional[Query] = None,
150
150
  extra_body: Optional[Body] = None,
151
151
  timeout: Union[float, httpx.Timeout, None, openai.NotGiven] = openai.NOT_GIVEN,
152
+ parallel_tool_calls: Union[bool, openai.NotGiven] = openai.NOT_GIVEN,
152
153
  ) -> Union[MaitaiCompletion, Iterable[MaitaiChunk]]:
153
154
  retry_args = locals()
154
155
  timing = RequestTimingMetric(
@@ -162,7 +163,7 @@ class Completions:
162
163
  raise ValueError("evaluations must be enabled to apply_corrections")
163
164
  if assistant is True:
164
165
  user_msgs = [True for msg in messages if msg["role"] == "user"]
165
- assistant_messages = [True for msg in messages if msg["role"] == "user"]
166
+ assistant_messages = [True for msg in messages if msg["role"] == "assistant"]
166
167
  if len(user_msgs) != 1:
167
168
  raise ValueError("When assistant = True, exactly 1 user message is required")
168
169
  if len(assistant_messages) > 0:
@@ -226,6 +227,7 @@ class Completions:
226
227
  top_logprobs=top_logprobs,
227
228
  top_p=top_p,
228
229
  user=user,
230
+ parallel_tool_calls=parallel_tool_calls,
229
231
  )
230
232
  if server_side_inference:
231
233
  response_timeout = None
@@ -312,6 +314,7 @@ class Completions:
312
314
  extra_query=extra_query,
313
315
  extra_body=extra_body,
314
316
  timeout=timeout,
317
+ parallel_tool_calls=parallel_tool_calls,
315
318
 
316
319
  )
317
320
  if stream:
@@ -144,6 +144,7 @@ class AsyncCompletions:
144
144
  extra_query: Optional[Query] = None,
145
145
  extra_body: Optional[Body] = None,
146
146
  timeout: Union[float, httpx.Timeout, None, openai.NotGiven] = openai.NOT_GIVEN,
147
+ parallel_tool_calls: Union[bool, openai.NotGiven] = openai.NOT_GIVEN,
147
148
  ) -> Union[MaitaiCompletion, AsyncIterable[MaitaiChunk]]:
148
149
  retry_args = locals()
149
150
  timing = RequestTimingMetric(
@@ -157,7 +158,7 @@ class AsyncCompletions:
157
158
  raise ValueError("evaluations must be enabled to apply_corrections")
158
159
  if assistant is True:
159
160
  user_msgs = [True for msg in messages if msg["role"] == "user"]
160
- assistant_messages = [True for msg in messages if msg["role"] == "user"]
161
+ assistant_messages = [True for msg in messages if msg["role"] == "assistant"]
161
162
  if len(user_msgs) != 1:
162
163
  raise ValueError("When assistant = True, exactly 1 user message is required")
163
164
  if len(assistant_messages) > 0:
@@ -221,6 +222,7 @@ class AsyncCompletions:
221
222
  top_logprobs=top_logprobs,
222
223
  top_p=top_p,
223
224
  user=user,
225
+ parallel_tool_calls=parallel_tool_calls,
224
226
  )
225
227
  if server_side_inference:
226
228
  response_timeout = None
@@ -306,6 +308,7 @@ class AsyncCompletions:
306
308
  extra_query=extra_query,
307
309
  extra_body=extra_body,
308
310
  timeout=timeout,
311
+ parallel_tool_calls=parallel_tool_calls,
309
312
  )
310
313
  if stream:
311
314
  return _process_async_openai_stream(session_id, reference_id, intent, application_ref_name, messages, response, evaluation_enabled, completion_params, timing, callback, metadata)
@@ -121,6 +121,7 @@ def get_chat_completion_params(*,
121
121
  top_logprobs: Union[Optional[int], openai.NotGiven] = openai.NOT_GIVEN,
122
122
  top_p: Union[Optional[float], openai.NotGiven] = openai.NOT_GIVEN,
123
123
  user: Union[str, openai.NotGiven] = openai.NOT_GIVEN,
124
+ parallel_tool_calls: Union[bool, openai.NotGiven] = openai.NOT_GIVEN,
124
125
  ) -> chat_types.ChatCompletionParams:
125
126
  params = chat_types.ChatCompletionParams(
126
127
  messages=openai_messages_to_proto(messages),
@@ -142,6 +143,7 @@ def get_chat_completion_params(*,
142
143
  'frequency_penalty': frequency_penalty,
143
144
  'user': user,
144
145
  'tool_choice': tool_choice,
146
+ 'parallel_tool_calls': parallel_tool_calls,
145
147
  }
146
148
  # Set each parameter that is not marked as NOT_GIVEN
147
149
  for param_name, value in optional_params.items():
@@ -1,3 +1,3 @@
1
- version = "1.1.11b0"
1
+ version = "1.1.12b0"
2
2
  if __name__ == "__main__":
3
3
  print(version)
@@ -120,6 +120,7 @@ class ChatCompletionParams(betterproto.Message):
120
120
  user: str = betterproto.string_field(17)
121
121
  tools: List["Tool"] = betterproto.message_field(18)
122
122
  tool_choice: str = betterproto.string_field(19)
123
+ parallel_tool_calls: bool = betterproto.bool_field(20)
123
124
 
124
125
 
125
126
  @dataclass(eq=False, repr=False)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: maitai-python
3
- Version: 1.1.11b0
3
+ Version: 1.1.12b0
4
4
  Summary: Maitai SDK for Python
5
5
  Home-page: https://docs.trymaitai.ai
6
6
  Author: Maitai