vectorvein 0.1.4__py3-none-any.whl → 0.1.6__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.
- vectorvein/chat_clients/__init__.py +2 -2
- vectorvein/chat_clients/anthropic_client.py +4 -0
- vectorvein/chat_clients/openai_compatible_client.py +2 -2
- vectorvein/chat_clients/utils.py +1 -1
- {vectorvein-0.1.4.dist-info → vectorvein-0.1.6.dist-info}/METADATA +1 -1
- {vectorvein-0.1.4.dist-info → vectorvein-0.1.6.dist-info}/RECORD +7 -7
- {vectorvein-0.1.4.dist-info → vectorvein-0.1.6.dist-info}/WHEEL +0 -0
@@ -55,7 +55,7 @@ BackendMap = {
|
|
55
55
|
def create_chat_client(
|
56
56
|
backend: BackendType,
|
57
57
|
model: str | None = None,
|
58
|
-
stream: bool =
|
58
|
+
stream: bool = False,
|
59
59
|
temperature: float = 0.7,
|
60
60
|
context_length_control: ContextLengthControlType = defs.CONTEXT_LENGTH_CONTROL,
|
61
61
|
**kwargs,
|
@@ -80,7 +80,7 @@ def create_chat_client(
|
|
80
80
|
def create_async_chat_client(
|
81
81
|
backend: BackendType,
|
82
82
|
model: str | None = None,
|
83
|
-
stream: bool =
|
83
|
+
stream: bool = False,
|
84
84
|
temperature: float = 0.7,
|
85
85
|
context_length_control: ContextLengthControlType = defs.CONTEXT_LENGTH_CONTROL,
|
86
86
|
**kwargs,
|
@@ -125,6 +125,8 @@ class AnthropicChatClient(BaseChatClient):
|
|
125
125
|
self.stream = stream
|
126
126
|
if temperature is not None:
|
127
127
|
self.temperature = temperature
|
128
|
+
if isinstance(tools, OpenAINotGiven):
|
129
|
+
tools = NOT_GIVEN
|
128
130
|
if isinstance(tool_choice, OpenAINotGiven):
|
129
131
|
tool_choice = NOT_GIVEN
|
130
132
|
|
@@ -311,6 +313,8 @@ class AsyncAnthropicChatClient(BaseAsyncChatClient):
|
|
311
313
|
self.stream = stream
|
312
314
|
if temperature is not None:
|
313
315
|
self.temperature = temperature
|
316
|
+
if isinstance(tools, OpenAINotGiven):
|
317
|
+
tools = NOT_GIVEN
|
314
318
|
if isinstance(tool_choice, OpenAINotGiven):
|
315
319
|
tool_choice = NOT_GIVEN
|
316
320
|
|
@@ -127,7 +127,7 @@ class OpenAICompatibleChatClient(BaseChatClient):
|
|
127
127
|
message = chunk.choices[0].delta.model_dump()
|
128
128
|
full_content += message["content"] if message["content"] else ""
|
129
129
|
if tools:
|
130
|
-
tool_call_data = ToolCallContentProcessor(
|
130
|
+
tool_call_data = ToolCallContentProcessor(full_content).tool_calls
|
131
131
|
if tool_call_data:
|
132
132
|
message["tool_calls"] = tool_call_data["tool_calls"]
|
133
133
|
if full_content in ("<", "<|", "<|▶", "<|▶|") or full_content.startswith("<|▶|>"):
|
@@ -266,7 +266,7 @@ class AsyncOpenAICompatibleChatClient(BaseAsyncChatClient):
|
|
266
266
|
message = chunk.choices[0].delta.model_dump()
|
267
267
|
full_content += message["content"] if message["content"] else ""
|
268
268
|
if tools:
|
269
|
-
tool_call_data = ToolCallContentProcessor(
|
269
|
+
tool_call_data = ToolCallContentProcessor(full_content).tool_calls
|
270
270
|
if tool_call_data:
|
271
271
|
message["tool_calls"] = tool_call_data["tool_calls"]
|
272
272
|
if full_content in ("<", "<|", "<|▶", "<|▶|") or full_content.startswith("<|▶|>"):
|
vectorvein/chat_clients/utils.py
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
vectorvein-0.1.
|
2
|
-
vectorvein-0.1.
|
1
|
+
vectorvein-0.1.6.dist-info/METADATA,sha256=cfyPkv1PSdCL5Ve9zAIDTNVzrPDLN2GDbiADGewJN0g,423
|
2
|
+
vectorvein-0.1.6.dist-info/WHEEL,sha256=rSwsxJWe3vzyR5HCwjWXQruDgschpei4h_giTm0dJVE,90
|
3
3
|
vectorvein/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
|
-
vectorvein/chat_clients/__init__.py,sha256=
|
5
|
-
vectorvein/chat_clients/anthropic_client.py,sha256=
|
4
|
+
vectorvein/chat_clients/__init__.py,sha256=5j7W--jr-l2cqDJp38uXYvkydDK0rnzm7MYGSACHKmU,3976
|
5
|
+
vectorvein/chat_clients/anthropic_client.py,sha256=pkk0yPH05WTOnKOAXkm60ZZw1kdT8pCydNkHx7QArh4,18707
|
6
6
|
vectorvein/chat_clients/base_client.py,sha256=GjPUAjgd_36-lHr8QXvz2X_-ApjbmAD3KZRjmntJ65U,4247
|
7
7
|
vectorvein/chat_clients/deepseek_client.py,sha256=3qWu01NlJAP2N-Ff62d5-CZXZitlizE1fzb20LNetig,526
|
8
8
|
vectorvein/chat_clients/gemini_client.py,sha256=IpkfcqVF38f4kAFnlHyisn4vkiMeM4cICyS4XDD0jJE,12787
|
@@ -12,9 +12,9 @@ vectorvein/chat_clients/minimax_client.py,sha256=toe4mFYHphHnPQpOpegaL5n2OxTUu5T
|
|
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
|
15
|
-
vectorvein/chat_clients/openai_compatible_client.py,sha256=
|
15
|
+
vectorvein/chat_clients/openai_compatible_client.py,sha256=sN9fq8yZ0XKSVg0eQZDWUE-awrkkJA2lEdMG-WENnUg,11951
|
16
16
|
vectorvein/chat_clients/qwen_client.py,sha256=-ryh-m9PgsO0fc4ulcCmPTy1155J8YUy15uPoJQOHA0,513
|
17
|
-
vectorvein/chat_clients/utils.py,sha256=
|
17
|
+
vectorvein/chat_clients/utils.py,sha256=tAQwfydj46sMxSHeaeOWXrTUY2q0h7482NbvZjbNz9A,17637
|
18
18
|
vectorvein/chat_clients/yi_client.py,sha256=RNf4CRuPJfixrwLZ3-DEc3t25QDe1mvZeb9sku2f8Bc,484
|
19
19
|
vectorvein/chat_clients/zhipuai_client.py,sha256=Ys5DSeLCuedaDXr3PfG1EW2zKXopt-awO2IylWSwY0s,519
|
20
20
|
vectorvein/settings/__init__.py,sha256=1__ILDpBh25S43d32knqLBe05tF4AQwT0ZALdBHw1OY,3396
|
@@ -22,4 +22,4 @@ vectorvein/types/defaults.py,sha256=Mg-Mj3_eBzKZn1N8x1V2GqyaYgLD13i-NdSYdQC28X4,
|
|
22
22
|
vectorvein/types/enums.py,sha256=vzOenCnRlFXBwPh-lfFhjGfM-6yfDj7wZColHODqocI,1550
|
23
23
|
vectorvein/types/llm_parameters.py,sha256=nBjStC2zndTY__yhD2WFXB09taxEhDLE3OHA6MICfgE,3494
|
24
24
|
vectorvein/utilities/media_processing.py,sha256=BujciRmw1GMmc3ELRvafL8STcy6r5b2rVnh27-uA7so,2256
|
25
|
-
vectorvein-0.1.
|
25
|
+
vectorvein-0.1.6.dist-info/RECORD,,
|
File without changes
|