agenthub-python 0.4.11__tar.gz → 0.4.12__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.
- {agenthub_python-0.4.11 → agenthub_python-0.4.12}/PKG-INFO +1 -1
- {agenthub_python-0.4.11 → agenthub_python-0.4.12}/agenthub/glm5_3/client.py +8 -7
- {agenthub_python-0.4.11 → agenthub_python-0.4.12}/agenthub/kimi_k3/client.py +8 -9
- {agenthub_python-0.4.11 → agenthub_python-0.4.12}/agenthub/openai_chat/client.py +10 -16
- {agenthub_python-0.4.11 → agenthub_python-0.4.12}/pyproject.toml +1 -1
- {agenthub_python-0.4.11 → agenthub_python-0.4.12}/pyproject.toml.orig +1 -1
- {agenthub_python-0.4.11 → agenthub_python-0.4.12}/README.md +0 -0
- {agenthub_python-0.4.11 → agenthub_python-0.4.12}/agenthub/__init__.py +0 -0
- {agenthub_python-0.4.11 → agenthub_python-0.4.12}/agenthub/abort_signal.py +0 -0
- {agenthub_python-0.4.11 → agenthub_python-0.4.12}/agenthub/ant_messages/__init__.py +0 -0
- {agenthub_python-0.4.11 → agenthub_python-0.4.12}/agenthub/ant_messages/client.py +0 -0
- {agenthub_python-0.4.11 → agenthub_python-0.4.12}/agenthub/auto_client.py +0 -0
- {agenthub_python-0.4.11 → agenthub_python-0.4.12}/agenthub/base_client.py +0 -0
- {agenthub_python-0.4.11 → agenthub_python-0.4.12}/agenthub/claude5/__init__.py +0 -0
- {agenthub_python-0.4.11 → agenthub_python-0.4.12}/agenthub/claude5/client.py +0 -0
- {agenthub_python-0.4.11 → agenthub_python-0.4.12}/agenthub/deepseek_v4/__init__.py +0 -0
- {agenthub_python-0.4.11 → agenthub_python-0.4.12}/agenthub/deepseek_v4/client.py +0 -0
- {agenthub_python-0.4.11 → agenthub_python-0.4.12}/agenthub/errors.py +0 -0
- {agenthub_python-0.4.11 → agenthub_python-0.4.12}/agenthub/gemini3_8/__init__.py +0 -0
- {agenthub_python-0.4.11 → agenthub_python-0.4.12}/agenthub/gemini3_8/client.py +0 -0
- {agenthub_python-0.4.11 → agenthub_python-0.4.12}/agenthub/glm5_3/__init__.py +0 -0
- {agenthub_python-0.4.11 → agenthub_python-0.4.12}/agenthub/gpt6/__init__.py +0 -0
- {agenthub_python-0.4.11 → agenthub_python-0.4.12}/agenthub/gpt6/client.py +0 -0
- {agenthub_python-0.4.11 → agenthub_python-0.4.12}/agenthub/integration/__init__.py +0 -0
- {agenthub_python-0.4.11 → agenthub_python-0.4.12}/agenthub/integration/playground.py +0 -0
- {agenthub_python-0.4.11 → agenthub_python-0.4.12}/agenthub/integration/tracer.py +0 -0
- {agenthub_python-0.4.11 → agenthub_python-0.4.12}/agenthub/kimi_k3/__init__.py +0 -0
- {agenthub_python-0.4.11 → agenthub_python-0.4.12}/agenthub/minimax_m3/__init__.py +0 -0
- {agenthub_python-0.4.11 → agenthub_python-0.4.12}/agenthub/minimax_m3/client.py +0 -0
- {agenthub_python-0.4.11 → agenthub_python-0.4.12}/agenthub/openai_chat/__init__.py +0 -0
- {agenthub_python-0.4.11 → agenthub_python-0.4.12}/agenthub/openai_chat_vllm_adapter/__init__.py +0 -0
- {agenthub_python-0.4.11 → agenthub_python-0.4.12}/agenthub/openai_chat_vllm_adapter/client.py +0 -0
- {agenthub_python-0.4.11 → agenthub_python-0.4.12}/agenthub/openai_embedding/__init__.py +0 -0
- {agenthub_python-0.4.11 → agenthub_python-0.4.12}/agenthub/openai_embedding/client.py +0 -0
- {agenthub_python-0.4.11 → agenthub_python-0.4.12}/agenthub/openai_responses/__init__.py +0 -0
- {agenthub_python-0.4.11 → agenthub_python-0.4.12}/agenthub/openai_responses/client.py +0 -0
- {agenthub_python-0.4.11 → agenthub_python-0.4.12}/agenthub/registry.py +0 -0
- {agenthub_python-0.4.11 → agenthub_python-0.4.12}/agenthub/types.py +0 -0
- {agenthub_python-0.4.11 → agenthub_python-0.4.12}/agenthub/utils.py +0 -0
|
@@ -203,23 +203,24 @@ class GLM5_3Client(LLMClient):
|
|
|
203
203
|
if "tool_call_id" not in item:
|
|
204
204
|
raise ValueError("tool_call_id is required for tool result.")
|
|
205
205
|
|
|
206
|
-
#
|
|
207
|
-
# the
|
|
208
|
-
|
|
206
|
+
# Chat Completions lets a tool message carry text only, and a server that
|
|
207
|
+
# validates the schema rejects the whole request over an image part in one.
|
|
208
|
+
# The images ride in the user message that follows the turn's tool messages,
|
|
209
|
+
# the one place every OpenAI-compatible server reads them.
|
|
209
210
|
if "images" in item and item["images"]:
|
|
210
211
|
if not supports_image:
|
|
211
212
|
raise ValueError(f"GLM {self._model} does not support images in tool results.")
|
|
212
213
|
|
|
213
|
-
content = [{"type": "text", "text": item["text"]}]
|
|
214
214
|
for image_url in item["images"]:
|
|
215
|
-
|
|
215
|
+
content_parts.append({"type": "image_url", "image_url": {"url": image_url}})
|
|
216
216
|
|
|
217
|
-
#
|
|
217
|
+
# the plain string is the only content shape the Chat Completion schema
|
|
218
|
+
# documents for a tool message
|
|
218
219
|
openai_messages.append(
|
|
219
220
|
{
|
|
220
221
|
"role": "tool",
|
|
221
222
|
"tool_call_id": item["tool_call_id"],
|
|
222
|
-
"content":
|
|
223
|
+
"content": item["text"],
|
|
223
224
|
}
|
|
224
225
|
)
|
|
225
226
|
else:
|
|
@@ -214,23 +214,22 @@ class KimiK3Client(LLMClient):
|
|
|
214
214
|
if "tool_call_id" not in item:
|
|
215
215
|
raise ValueError("tool_call_id is required for tool result.")
|
|
216
216
|
|
|
217
|
-
|
|
218
|
-
|
|
217
|
+
# Chat Completions lets a tool message carry text only, and a server that
|
|
218
|
+
# validates the schema rejects the whole request over an image part in one.
|
|
219
|
+
# The images ride in the user message that follows the turn's tool messages,
|
|
220
|
+
# the one place every OpenAI-compatible server reads them.
|
|
219
221
|
if "images" in item and item["images"]:
|
|
220
222
|
for image_url in item["images"]:
|
|
221
223
|
base64_image = await self._convert_image_url_to_base64(image_url)
|
|
222
|
-
|
|
223
|
-
# siliconflow does not support image_url in tool result
|
|
224
|
-
content_parts.append({"type": "image_url", "image_url": {"url": base64_image}})
|
|
225
|
-
else:
|
|
226
|
-
content.append({"type": "image_url", "image_url": {"url": base64_image}})
|
|
224
|
+
content_parts.append({"type": "image_url", "image_url": {"url": base64_image}})
|
|
227
225
|
|
|
228
|
-
#
|
|
226
|
+
# the plain string is the form Moonshot's own tool-call examples send and every
|
|
227
|
+
# OpenAI-compatible server accepts
|
|
229
228
|
openai_messages.append(
|
|
230
229
|
{
|
|
231
230
|
"role": "tool",
|
|
232
231
|
"tool_call_id": item["tool_call_id"],
|
|
233
|
-
"content":
|
|
232
|
+
"content": item["text"],
|
|
234
233
|
}
|
|
235
234
|
)
|
|
236
235
|
else:
|
|
@@ -173,28 +173,22 @@ class OpenaiChatClient(LLMClient):
|
|
|
173
173
|
if "tool_call_id" not in item:
|
|
174
174
|
raise ValueError("tool_call_id is required for tool result.")
|
|
175
175
|
|
|
176
|
-
|
|
177
|
-
|
|
176
|
+
# Chat Completions lets a tool message carry text only, and a server that
|
|
177
|
+
# validates the schema rejects the whole request over an image part in one.
|
|
178
|
+
# The images ride in the user message that follows the turn's tool messages,
|
|
179
|
+
# the one place every OpenAI-compatible server reads them.
|
|
178
180
|
if "images" in item and item["images"]:
|
|
179
181
|
for image_url in item["images"]:
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
image_parts.append(part)
|
|
186
|
-
|
|
187
|
-
# a plain string is the form every OpenAI-compatible server accepts for a text
|
|
188
|
-
# result; the content-part list is reserved for results carrying images, which
|
|
189
|
-
# only servers with multimodal tool messages take
|
|
190
|
-
content = [{"type": "text", "text": item["text"]}, *image_parts] if image_parts else item["text"]
|
|
191
|
-
|
|
192
|
-
# Tool results are sent as separate messages
|
|
182
|
+
content_parts.append(
|
|
183
|
+
self._convert_image_url(await self._convert_image_url_to_base64(image_url))
|
|
184
|
+
)
|
|
185
|
+
|
|
186
|
+
# the plain string is the form every OpenAI-compatible server accepts
|
|
193
187
|
openai_messages.append(
|
|
194
188
|
{
|
|
195
189
|
"role": "tool",
|
|
196
190
|
"tool_call_id": item["tool_call_id"],
|
|
197
|
-
"content":
|
|
191
|
+
"content": item["text"],
|
|
198
192
|
}
|
|
199
193
|
)
|
|
200
194
|
else:
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{agenthub_python-0.4.11 → agenthub_python-0.4.12}/agenthub/openai_chat_vllm_adapter/__init__.py
RENAMED
|
File without changes
|
{agenthub_python-0.4.11 → agenthub_python-0.4.12}/agenthub/openai_chat_vllm_adapter/client.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
|