maitai-python 1.0.25b0__tar.gz → 1.0.26__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.0.25b0 → maitai_python-1.0.26}/PKG-INFO +1 -1
- {maitai_python-1.0.25b0 → maitai_python-1.0.26}/maitai/_openai.py +3 -0
- {maitai_python-1.0.25b0 → maitai_python-1.0.26}/maitai/_openai_async.py +3 -0
- {maitai_python-1.0.25b0 → maitai_python-1.0.26}/maitai_common/version.py +1 -1
- {maitai_python-1.0.25b0 → maitai_python-1.0.26}/maitai_gen/chat/__init__.py +1 -0
- {maitai_python-1.0.25b0 → maitai_python-1.0.26}/maitai_python.egg-info/PKG-INFO +1 -1
- {maitai_python-1.0.25b0 → maitai_python-1.0.26}/README.md +0 -0
- {maitai_python-1.0.25b0 → maitai_python-1.0.26}/maitai/__init__.py +0 -0
- {maitai_python-1.0.25b0 → maitai_python-1.0.26}/maitai/_azure.py +0 -0
- {maitai_python-1.0.25b0 → maitai_python-1.0.26}/maitai/_config.py +0 -0
- {maitai_python-1.0.25b0 → maitai_python-1.0.26}/maitai/_config_listener_thread.py +0 -0
- {maitai_python-1.0.25b0 → maitai_python-1.0.26}/maitai/_evaluator.py +0 -0
- {maitai_python-1.0.25b0 → maitai_python-1.0.26}/maitai/_inference.py +0 -0
- {maitai_python-1.0.25b0 → maitai_python-1.0.26}/maitai/_maitai_client.py +0 -0
- {maitai_python-1.0.25b0 → maitai_python-1.0.26}/maitai/_openai_types.py +0 -0
- {maitai_python-1.0.25b0 → maitai_python-1.0.26}/maitai/_utils.py +0 -0
- {maitai_python-1.0.25b0 → maitai_python-1.0.26}/maitai_common/__init__.py +0 -0
- {maitai_python-1.0.25b0 → maitai_python-1.0.26}/maitai_common/config/__init__.py +0 -0
- {maitai_python-1.0.25b0 → maitai_python-1.0.26}/maitai_common/config/config_service.py +0 -0
- {maitai_python-1.0.25b0 → maitai_python-1.0.26}/maitai_common/processes/__init__.py +0 -0
- {maitai_python-1.0.25b0 → maitai_python-1.0.26}/maitai_common/processes/io_thread.py +0 -0
- {maitai_python-1.0.25b0 → maitai_python-1.0.26}/maitai_common/processes/websocket_listener_thread.py +0 -0
- {maitai_python-1.0.25b0 → maitai_python-1.0.26}/maitai_common/utils/__init__.py +0 -0
- {maitai_python-1.0.25b0 → maitai_python-1.0.26}/maitai_common/utils/proto_utils.py +0 -0
- {maitai_python-1.0.25b0 → maitai_python-1.0.26}/maitai_common/utils/types.py +0 -0
- {maitai_python-1.0.25b0 → maitai_python-1.0.26}/maitai_gen/__init__.py +0 -0
- {maitai_python-1.0.25b0 → maitai_python-1.0.26}/maitai_gen/application/__init__.py +0 -0
- {maitai_python-1.0.25b0 → maitai_python-1.0.26}/maitai_gen/company/__init__.py +0 -0
- {maitai_python-1.0.25b0 → maitai_python-1.0.26}/maitai_gen/config/__init__.py +0 -0
- {maitai_python-1.0.25b0 → maitai_python-1.0.26}/maitai_gen/inference/__init__.py +0 -0
- {maitai_python-1.0.25b0 → maitai_python-1.0.26}/maitai_gen/key/__init__.py +0 -0
- {maitai_python-1.0.25b0 → maitai_python-1.0.26}/maitai_gen/notification/__init__.py +0 -0
- {maitai_python-1.0.25b0 → maitai_python-1.0.26}/maitai_gen/sandbox/__init__.py +0 -0
- {maitai_python-1.0.25b0 → maitai_python-1.0.26}/maitai_gen/sentinel/__init__.py +0 -0
- {maitai_python-1.0.25b0 → maitai_python-1.0.26}/maitai_gen/session/__init__.py +0 -0
- {maitai_python-1.0.25b0 → maitai_python-1.0.26}/maitai_python.egg-info/SOURCES.txt +0 -0
- {maitai_python-1.0.25b0 → maitai_python-1.0.26}/maitai_python.egg-info/dependency_links.txt +0 -0
- {maitai_python-1.0.25b0 → maitai_python-1.0.26}/maitai_python.egg-info/requires.txt +0 -0
- {maitai_python-1.0.25b0 → maitai_python-1.0.26}/maitai_python.egg-info/top_level.txt +0 -0
- {maitai_python-1.0.25b0 → maitai_python-1.0.26}/setup.cfg +0 -0
- {maitai_python-1.0.25b0 → maitai_python-1.0.26}/setup.py +0 -0
|
@@ -4,6 +4,7 @@ import httpx
|
|
|
4
4
|
import openai
|
|
5
5
|
import openai.types as openai_types
|
|
6
6
|
import openai.types.chat as openai_chat_types
|
|
7
|
+
from openai.types.chat import ChatCompletionStreamOptionsParam
|
|
7
8
|
|
|
8
9
|
import maitai
|
|
9
10
|
from maitai._config import config
|
|
@@ -145,6 +146,8 @@ class Completions:
|
|
|
145
146
|
frequency_penalty = maitai_config.frequency_penalty
|
|
146
147
|
if presence_penalty == openai.NOT_GIVEN:
|
|
147
148
|
presence_penalty = maitai_config.presence_penalty
|
|
149
|
+
if stream_options == openai.NOT_GIVEN and stream:
|
|
150
|
+
stream_options = ChatCompletionStreamOptionsParam(include_usage=True)
|
|
148
151
|
completion_params = get_chat_completion_params(
|
|
149
152
|
messages=messages,
|
|
150
153
|
model=model,
|
|
@@ -4,6 +4,7 @@ import httpx
|
|
|
4
4
|
import openai
|
|
5
5
|
import openai.types as openai_types
|
|
6
6
|
import openai.types.chat as openai_chat_types
|
|
7
|
+
from openai.types.chat import ChatCompletionStreamOptionsParam
|
|
7
8
|
|
|
8
9
|
import maitai
|
|
9
10
|
from maitai._config import config
|
|
@@ -150,6 +151,8 @@ class AsyncCompletions:
|
|
|
150
151
|
frequency_penalty = maitai_config.frequency_penalty
|
|
151
152
|
if presence_penalty == openai.NOT_GIVEN:
|
|
152
153
|
presence_penalty = maitai_config.presence_penalty
|
|
154
|
+
if stream_options == openai.NOT_GIVEN and stream:
|
|
155
|
+
stream_options = ChatCompletionStreamOptionsParam(include_usage=True)
|
|
153
156
|
|
|
154
157
|
completion_params = get_chat_completion_params(
|
|
155
158
|
messages=messages,
|
|
@@ -273,6 +273,7 @@ class EvaluateResponse(betterproto.Message):
|
|
|
273
273
|
8, optional=True, group="_evaluation_request"
|
|
274
274
|
)
|
|
275
275
|
evaluate_summary: str = betterproto.string_field(9)
|
|
276
|
+
evaluation_time: int = betterproto.int64_field(10)
|
|
276
277
|
|
|
277
278
|
|
|
278
279
|
class EvaluationServiceStub(betterproto.ServiceStub):
|
|
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.0.25b0 → maitai_python-1.0.26}/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
|