vectorvein 0.1.46__py3-none-any.whl → 0.1.47__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.
@@ -148,6 +148,7 @@ class BaseChatClient(ABC):
148
148
  tools=tools,
149
149
  tool_choice=tool_choice,
150
150
  response_format=response_format,
151
+ stream_options=stream_options,
151
152
  **kwargs,
152
153
  )
153
154
 
@@ -6,8 +6,6 @@ from functools import cached_property
6
6
  from typing import overload, Generator, AsyncGenerator, Any, Literal, Iterable
7
7
 
8
8
  import httpx
9
- from openai._streaming import Stream, AsyncStream
10
- from openai.types.chat import ChatCompletion, ChatCompletionChunk
11
9
  from openai import OpenAI, AsyncOpenAI, AzureOpenAI, AsyncAzureOpenAI
12
10
 
13
11
  from .base_client import BaseChatClient, BaseAsyncChatClient
@@ -202,7 +200,7 @@ class OpenAICompatibleChatClient(BaseChatClient):
202
200
  _stream_options_params = {}
203
201
 
204
202
  if self.stream:
205
- stream_response: Stream[ChatCompletionChunk] = raw_client.chat.completions.create(
203
+ stream_response = raw_client.chat.completions.create(
206
204
  model=self.model_id,
207
205
  messages=messages,
208
206
  stream=True,
@@ -253,7 +251,7 @@ class OpenAICompatibleChatClient(BaseChatClient):
253
251
 
254
252
  return generator()
255
253
  else:
256
- response: ChatCompletion = raw_client.chat.completions.create(
254
+ response = raw_client.chat.completions.create(
257
255
  model=self.model_id,
258
256
  messages=messages,
259
257
  stream=False,
@@ -453,7 +451,7 @@ class AsyncOpenAICompatibleChatClient(BaseAsyncChatClient):
453
451
  max_tokens = self.model_setting.context_length - token_counts - 64
454
452
 
455
453
  if self.stream:
456
- stream_response: AsyncStream[ChatCompletionChunk] = await raw_client.chat.completions.create(
454
+ stream_response = await raw_client.chat.completions.create(
457
455
  model=self.model_id,
458
456
  messages=messages,
459
457
  stream=self.stream,
@@ -504,7 +502,7 @@ class AsyncOpenAICompatibleChatClient(BaseAsyncChatClient):
504
502
 
505
503
  return generator()
506
504
  else:
507
- response: ChatCompletion = await raw_client.chat.completions.create(
505
+ response = await raw_client.chat.completions.create(
508
506
  model=self.model_id,
509
507
  messages=messages,
510
508
  stream=self.stream,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vectorvein
3
- Version: 0.1.46
3
+ Version: 0.1.47
4
4
  Summary: Default template for PDM package
5
5
  Author-Email: Anderson <andersonby@163.com>
6
6
  License: MIT
@@ -1,11 +1,11 @@
1
- vectorvein-0.1.46.dist-info/METADATA,sha256=36D8mKjmVS10vBTLPCUu1sMLJoJQWV4SQS_AQeFJRN4,644
2
- vectorvein-0.1.46.dist-info/WHEEL,sha256=thaaA2w1JzcGC48WYufAs8nrYZjJm8LqNfnXFOFyCC4,90
3
- vectorvein-0.1.46.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
1
+ vectorvein-0.1.47.dist-info/METADATA,sha256=wHK12p2NAwLjy_gei3wiErFfYwWRSV1dVx7nEda3TQU,644
2
+ vectorvein-0.1.47.dist-info/WHEEL,sha256=thaaA2w1JzcGC48WYufAs8nrYZjJm8LqNfnXFOFyCC4,90
3
+ vectorvein-0.1.47.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
4
4
  vectorvein/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  vectorvein/chat_clients/__init__.py,sha256=dW169oK1n3v8Z0uD8itghzlCP72rxiaS-XYn6fvI2xM,16788
6
6
  vectorvein/chat_clients/anthropic_client.py,sha256=i1fMYSkUovd-Lc9B64bWMgzSTUFw4S3fj3AJ_pDokT4,34029
7
7
  vectorvein/chat_clients/baichuan_client.py,sha256=CVMvpgjdrZGv0BWnTOBD-f2ufZ3wq3496wqukumsAr4,526
8
- vectorvein/chat_clients/base_client.py,sha256=4IYRAfRt9jk1nuUh7e57boaI7_WHR31fJKvvRkt3RDE,9454
8
+ vectorvein/chat_clients/base_client.py,sha256=0Uj0e-JR0a68sRS_WfUMVd91Av7lzJh6-DukjutlaD0,9497
9
9
  vectorvein/chat_clients/deepseek_client.py,sha256=3qWu01NlJAP2N-Ff62d5-CZXZitlizE1fzb20LNetig,526
10
10
  vectorvein/chat_clients/gemini_client.py,sha256=TJZUP8dbufuDnqkRI_gxIDDCYHrIhMPCqKGI6sSwqZo,19860
11
11
  vectorvein/chat_clients/groq_client.py,sha256=Uow4pgdmFi93ZQSoOol2-0PhhqkW-S0XuSldvppz5U4,498
@@ -14,7 +14,7 @@ vectorvein/chat_clients/minimax_client.py,sha256=cLpSJ5vIaDi0Kmrt7XGlbjnlFnByJiI
14
14
  vectorvein/chat_clients/mistral_client.py,sha256=1aKSylzBDaLYcFnaBIL4-sXSzWmXfBeON9Q0rq-ziWw,534
15
15
  vectorvein/chat_clients/moonshot_client.py,sha256=gbu-6nGxx8uM_U2WlI4Wus881rFRotzHtMSoYOcruGU,526
16
16
  vectorvein/chat_clients/openai_client.py,sha256=Nz6tV45pWcsOupxjnsRsGTicbQNJWIZyxuJoJ5DGMpg,527
17
- vectorvein/chat_clients/openai_compatible_client.py,sha256=CUylVzn-1bYB27gDDUVtfjxeSqG7yirFssNFW2dpBaQ,21941
17
+ vectorvein/chat_clients/openai_compatible_client.py,sha256=jsEYttMKNZmgKeOIk2MbNUz0Tri2jeQCR1iaCs_TIok,21728
18
18
  vectorvein/chat_clients/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
19
  vectorvein/chat_clients/qwen_client.py,sha256=-ryh-m9PgsO0fc4ulcCmPTy1155J8YUy15uPoJQOHA0,513
20
20
  vectorvein/chat_clients/stepfun_client.py,sha256=zsD2W5ahmR4DD9cqQTXmJr3txrGuvxbRWhFlRdwNijI,519
@@ -32,4 +32,4 @@ vectorvein/types/llm_parameters.py,sha256=5o-C_yXxxQWZy_e8OWowB2107GTS-Eawx4Mvb1
32
32
  vectorvein/types/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
33
33
  vectorvein/utilities/media_processing.py,sha256=cnzLrU1OaJvSv87IOnc36FrDXtmGMDStPbxtIJ33YN4,5880
34
34
  vectorvein/utilities/retry.py,sha256=6KFS9R2HdhqM3_9jkjD4F36ZSpEx2YNFGOVlpOsUetM,2208
35
- vectorvein-0.1.46.dist-info/RECORD,,
35
+ vectorvein-0.1.47.dist-info/RECORD,,