vectorvein 0.1.8__py3-none-any.whl → 0.1.9__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.
@@ -93,7 +93,7 @@ class MiniMaxChatClient(BaseChatClient):
|
|
93
93
|
model=self.model_setting.id,
|
94
94
|
)
|
95
95
|
|
96
|
-
if tools
|
96
|
+
if tools:
|
97
97
|
tools_params = {
|
98
98
|
"tools": [
|
99
99
|
{
|
@@ -149,24 +149,19 @@ class MiniMaxChatClient(BaseChatClient):
|
|
149
149
|
for chunk in response.iter_lines():
|
150
150
|
if chunk:
|
151
151
|
chunk_data = json.loads(chunk[6:])
|
152
|
+
if chunk_data["object"] != "chat.completion.chunk":
|
153
|
+
continue
|
152
154
|
tool_calls_params = extract_tool_calls(chunk_data)
|
153
155
|
has_tool_calls = True if tool_calls_params else False
|
154
156
|
if has_tool_calls:
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
"content": chunk_data["choices"][0]["delta"].get("content"),
|
163
|
-
"role": "assistant",
|
164
|
-
**tool_calls_params,
|
165
|
-
}
|
166
|
-
)
|
157
|
+
yield ChatCompletionDeltaMessage(
|
158
|
+
**{
|
159
|
+
"content": chunk_data["choices"][0]["delta"].get("content"),
|
160
|
+
"role": "assistant",
|
161
|
+
**tool_calls_params,
|
162
|
+
}
|
163
|
+
)
|
167
164
|
else:
|
168
|
-
if "usage" in chunk_data:
|
169
|
-
continue
|
170
165
|
yield ChatCompletionDeltaMessage(
|
171
166
|
**{
|
172
167
|
"content": chunk_data["choices"][0]["delta"]["content"],
|
@@ -250,7 +245,7 @@ class AsyncMiniMaxChatClient(BaseAsyncChatClient):
|
|
250
245
|
model=self.model_setting.id,
|
251
246
|
)
|
252
247
|
|
253
|
-
if tools
|
248
|
+
if tools:
|
254
249
|
tools_params = {
|
255
250
|
"tools": [
|
256
251
|
{
|
@@ -305,24 +300,19 @@ class AsyncMiniMaxChatClient(BaseAsyncChatClient):
|
|
305
300
|
async for chunk in response.aiter_lines():
|
306
301
|
if chunk:
|
307
302
|
chunk_data = json.loads(chunk[6:])
|
303
|
+
if chunk_data["object"] != "chat.completion.chunk":
|
304
|
+
continue
|
308
305
|
tool_calls_params = extract_tool_calls(chunk_data)
|
309
306
|
has_tool_calls = True if tool_calls_params else False
|
310
307
|
if has_tool_calls:
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
"content": chunk_data["choices"][0]["delta"].get("content"),
|
319
|
-
"role": "assistant",
|
320
|
-
**tool_calls_params,
|
321
|
-
}
|
322
|
-
)
|
308
|
+
yield ChatCompletionDeltaMessage(
|
309
|
+
**{
|
310
|
+
"content": chunk_data["choices"][0]["delta"].get("content"),
|
311
|
+
"role": "assistant",
|
312
|
+
**tool_calls_params,
|
313
|
+
}
|
314
|
+
)
|
323
315
|
else:
|
324
|
-
if "usage" in chunk_data:
|
325
|
-
continue
|
326
316
|
yield ChatCompletionDeltaMessage(
|
327
317
|
**{
|
328
318
|
"content": chunk_data["choices"][0]["delta"]["content"],
|
@@ -1,5 +1,5 @@
|
|
1
|
-
vectorvein-0.1.
|
2
|
-
vectorvein-0.1.
|
1
|
+
vectorvein-0.1.9.dist-info/METADATA,sha256=AlikMRU7DLdZ6gZMohsL1X6NiuAWP3jGV0tE-uZkhNo,501
|
2
|
+
vectorvein-0.1.9.dist-info/WHEEL,sha256=rSwsxJWe3vzyR5HCwjWXQruDgschpei4h_giTm0dJVE,90
|
3
3
|
vectorvein/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
4
|
vectorvein/chat_clients/__init__.py,sha256=5j7W--jr-l2cqDJp38uXYvkydDK0rnzm7MYGSACHKmU,3976
|
5
5
|
vectorvein/chat_clients/anthropic_client.py,sha256=JjigSUsIn06ixIEjnOJhVbcMqy2_MAL3iVUlDFAFMW4,20008
|
@@ -8,7 +8,7 @@ vectorvein/chat_clients/deepseek_client.py,sha256=3qWu01NlJAP2N-Ff62d5-CZXZitliz
|
|
8
8
|
vectorvein/chat_clients/gemini_client.py,sha256=IHcBHTSHkj3f962S5L7Ga-XA-96sq8quIDRZpoqvGss,13653
|
9
9
|
vectorvein/chat_clients/groq_client.py,sha256=Uow4pgdmFi93ZQSoOol2-0PhhqkW-S0XuSldvppz5U4,498
|
10
10
|
vectorvein/chat_clients/local_client.py,sha256=55nOsxzqUf79q3Y14MKROA71zxhsT7p7FsDZ89rts2M,422
|
11
|
-
vectorvein/chat_clients/minimax_client.py,sha256=
|
11
|
+
vectorvein/chat_clients/minimax_client.py,sha256=uomp3DyTBmDXQtCmRiYp1VIIOFoVZ9_oyM3-j4JO7go,13000
|
12
12
|
vectorvein/chat_clients/mistral_client.py,sha256=1aKSylzBDaLYcFnaBIL4-sXSzWmXfBeON9Q0rq-ziWw,534
|
13
13
|
vectorvein/chat_clients/moonshot_client.py,sha256=gbu-6nGxx8uM_U2WlI4Wus881rFRotzHtMSoYOcruGU,526
|
14
14
|
vectorvein/chat_clients/openai_client.py,sha256=Nz6tV45pWcsOupxjnsRsGTicbQNJWIZyxuJoJ5DGMpg,527
|
@@ -23,4 +23,4 @@ vectorvein/types/enums.py,sha256=vzOenCnRlFXBwPh-lfFhjGfM-6yfDj7wZColHODqocI,155
|
|
23
23
|
vectorvein/types/llm_parameters.py,sha256=nBjStC2zndTY__yhD2WFXB09taxEhDLE3OHA6MICfgE,3494
|
24
24
|
vectorvein/utilities/media_processing.py,sha256=BujciRmw1GMmc3ELRvafL8STcy6r5b2rVnh27-uA7so,2256
|
25
25
|
vectorvein/utilities/retry.py,sha256=9ePuJdeUUGx-qMWfaFxmlOvG_lQPwCQ4UB1z3Edlo34,993
|
26
|
-
vectorvein-0.1.
|
26
|
+
vectorvein-0.1.9.dist-info/RECORD,,
|
File without changes
|