aiecs 1.3.3__py3-none-any.whl → 1.3.4__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.
Potentially problematic release.
This version of aiecs might be problematic. Click here for more details.
- aiecs/__init__.py +1 -1
- aiecs/llm/clients/vertex_client.py +42 -9
- aiecs/main.py +2 -2
- {aiecs-1.3.3.dist-info → aiecs-1.3.4.dist-info}/METADATA +1 -1
- {aiecs-1.3.3.dist-info → aiecs-1.3.4.dist-info}/RECORD +9 -9
- {aiecs-1.3.3.dist-info → aiecs-1.3.4.dist-info}/WHEEL +0 -0
- {aiecs-1.3.3.dist-info → aiecs-1.3.4.dist-info}/entry_points.txt +0 -0
- {aiecs-1.3.3.dist-info → aiecs-1.3.4.dist-info}/licenses/LICENSE +0 -0
- {aiecs-1.3.3.dist-info → aiecs-1.3.4.dist-info}/top_level.txt +0 -0
aiecs/__init__.py
CHANGED
|
@@ -5,7 +5,7 @@ A powerful Python middleware framework for building AI-powered applications
|
|
|
5
5
|
with tool orchestration, task execution, and multi-provider LLM support.
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
|
-
__version__ = "1.3.
|
|
8
|
+
__version__ = "1.3.4"
|
|
9
9
|
__author__ = "AIECS Team"
|
|
10
10
|
__email__ = "iretbl@gmail.com"
|
|
11
11
|
|
|
@@ -144,16 +144,49 @@ class VertexAIClient(BaseLLMClient):
|
|
|
144
144
|
# Handle multi-part response format
|
|
145
145
|
if len(text_parts) > 1:
|
|
146
146
|
# Multi-part response (typical for Gemini 2.5 with tool calling)
|
|
147
|
-
#
|
|
148
|
-
|
|
147
|
+
# Check if parts already contain <thinking> tags
|
|
148
|
+
first_part = text_parts[0]
|
|
149
|
+
has_thinking_tags = '<thinking>' in first_part
|
|
149
150
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
151
|
+
if has_thinking_tags:
|
|
152
|
+
# Parts already have <thinking> tags, extract thinking content and actual output
|
|
153
|
+
thinking_contents = []
|
|
154
|
+
actual_outputs = []
|
|
155
|
+
|
|
156
|
+
for part in text_parts:
|
|
157
|
+
if '<thinking>' in part and '</thinking>' in part:
|
|
158
|
+
# Extract thinking content from this part
|
|
159
|
+
import re
|
|
160
|
+
thinking_match = re.search(r'<thinking>(.*?)</thinking>', part, re.DOTALL)
|
|
161
|
+
if thinking_match:
|
|
162
|
+
thinking_contents.append(thinking_match.group(1).strip())
|
|
163
|
+
|
|
164
|
+
# Extract content after </thinking>
|
|
165
|
+
after_thinking = part[thinking_match.end():].strip()
|
|
166
|
+
if after_thinking:
|
|
167
|
+
actual_outputs.append(after_thinking)
|
|
168
|
+
else:
|
|
169
|
+
# This part doesn't have thinking tags, treat as actual output
|
|
170
|
+
actual_outputs.append(part)
|
|
171
|
+
|
|
172
|
+
# Combine thinking content and actual outputs
|
|
173
|
+
if thinking_contents:
|
|
174
|
+
combined_thinking = '\n\n'.join(thinking_contents)
|
|
175
|
+
content = f"<thinking>\n{combined_thinking}\n</thinking>"
|
|
176
|
+
if actual_outputs:
|
|
177
|
+
content += "\n" + "\n".join(actual_outputs)
|
|
178
|
+
else:
|
|
179
|
+
content = "\n".join(text_parts)
|
|
180
|
+
|
|
181
|
+
self.logger.info(f"✅ Multi-part response with existing <thinking> tags processed: {len(text_parts)} parts")
|
|
182
|
+
else:
|
|
183
|
+
# Parts don't have <thinking> tags, wrap first part
|
|
184
|
+
thinking_part = text_parts[0]
|
|
185
|
+
actual_output_parts = text_parts[1:]
|
|
186
|
+
|
|
187
|
+
# Format: <thinking>Part 1</thinking>\nPart 2\nPart 3...
|
|
188
|
+
content = f"<thinking>\n{thinking_part}\n</thinking>\n" + "\n".join(actual_output_parts)
|
|
189
|
+
self.logger.info(f"✅ Multi-part response wrapped with <thinking> tags: {len(text_parts)} parts")
|
|
157
190
|
else:
|
|
158
191
|
# Single part response - use as is
|
|
159
192
|
content = text_parts[0]
|
aiecs/main.py
CHANGED
|
@@ -142,7 +142,7 @@ async def lifespan(app: FastAPI):
|
|
|
142
142
|
app = FastAPI(
|
|
143
143
|
title="AIECS - AI Execute Services",
|
|
144
144
|
description="Middleware service for AI-powered task execution and tool orchestration",
|
|
145
|
-
version="1.3.
|
|
145
|
+
version="1.3.4",
|
|
146
146
|
lifespan=lifespan
|
|
147
147
|
)
|
|
148
148
|
|
|
@@ -167,7 +167,7 @@ async def health_check():
|
|
|
167
167
|
return {
|
|
168
168
|
"status": "healthy",
|
|
169
169
|
"service": "aiecs",
|
|
170
|
-
"version": "1.3.
|
|
170
|
+
"version": "1.3.4"
|
|
171
171
|
}
|
|
172
172
|
|
|
173
173
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
aiecs/__init__.py,sha256=
|
|
1
|
+
aiecs/__init__.py,sha256=mIJwd_00jHY5Tt2YhFf0N11JOzcgey7YmDDfiTXZTow,1859
|
|
2
2
|
aiecs/__main__.py,sha256=AfQpzy3SgwWuP4DuymYcm4MISMuzqwhxxGSYo53PBvY,1035
|
|
3
3
|
aiecs/aiecs_client.py,sha256=gIqecRBBH_bYIWhqiHCemdVgmGb9Jqdxf1b6RoqXWlQ,17276
|
|
4
|
-
aiecs/main.py,sha256=
|
|
4
|
+
aiecs/main.py,sha256=Vs6O6ZMkBc69mhhhRKTGA-CCBX9PHJmkKZVHKf5M-Bo,10837
|
|
5
5
|
aiecs/application/__init__.py,sha256=NkmrUH1DqxJ3vaVC8QwscNdlWqHfC7ZagL4k3nZ_qz4,192
|
|
6
6
|
aiecs/application/executors/__init__.py,sha256=WIl7L9HBsEhNfbNtJdvBvFUJXzESvNZVaiAA6tdtJcs,191
|
|
7
7
|
aiecs/application/executors/operation_executor.py,sha256=-7mFo1hUnWdehVPg0fnSiRhW3LACpIiyLSH-iu7bX4U,13818
|
|
@@ -58,7 +58,7 @@ aiecs/llm/clients/__init__.py,sha256=uQM004TQappwJMqTxVZNscpVPQtirkvYUPea3QYB7d0
|
|
|
58
58
|
aiecs/llm/clients/base_client.py,sha256=j4NY-oEdG5ALBCSddblPpjttISn5teqLVVUuZyYn7g4,5880
|
|
59
59
|
aiecs/llm/clients/googleai_client.py,sha256=sTgdw4eicxWruNGOMSsuEHbfF9RuDQo8SClqEtu1JOQ,6591
|
|
60
60
|
aiecs/llm/clients/openai_client.py,sha256=x7Y_yTVu0kp-gu5Z-M0Bx-O20D0YDgZoJQxzkjNpr6c,4202
|
|
61
|
-
aiecs/llm/clients/vertex_client.py,sha256=
|
|
61
|
+
aiecs/llm/clients/vertex_client.py,sha256=Nfg6hY8SY8GeVokoJvdvSH4B3E0FUrRmabnLC57uBq4,14958
|
|
62
62
|
aiecs/llm/clients/xai_client.py,sha256=XEELb9_qFeeQaansDWvAJRJVpt8CaBRLcYskuv9uDq0,6386
|
|
63
63
|
aiecs/llm/config/__init__.py,sha256=KZbwHoBlbcN7HgNueA5p-0GpyVMJRNG1V5T-tkri8G4,1115
|
|
64
64
|
aiecs/llm/config/config_loader.py,sha256=PTMsZax3CoTrMo6BZlUoI7takII3_DHm3w5xTKgBJpA,8921
|
|
@@ -168,9 +168,9 @@ aiecs/utils/prompt_loader.py,sha256=cBS2bZXpYQOWSiOGkhwIzyy3_bETqwIblRi_9qQT9iQ,
|
|
|
168
168
|
aiecs/utils/token_usage_repository.py,sha256=1xjenLYwC0YT6lKZFEGO4scRCXLuWdec2MWjzih5SZY,10210
|
|
169
169
|
aiecs/ws/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
170
170
|
aiecs/ws/socket_server.py,sha256=j_9idVY_rWlTsF51FgmuhWCWFVt7_gAHL8vNg3IxV5g,1476
|
|
171
|
-
aiecs-1.3.
|
|
172
|
-
aiecs-1.3.
|
|
173
|
-
aiecs-1.3.
|
|
174
|
-
aiecs-1.3.
|
|
175
|
-
aiecs-1.3.
|
|
176
|
-
aiecs-1.3.
|
|
171
|
+
aiecs-1.3.4.dist-info/licenses/LICENSE,sha256=_1YRaIS0eZu1pv6xfz245UkU0i1Va2B841hv3OWRwqg,12494
|
|
172
|
+
aiecs-1.3.4.dist-info/METADATA,sha256=ZQ-nqmhPIg64CX3-tebfwa0UZlyjcUo_KMS1-KhKKWg,16635
|
|
173
|
+
aiecs-1.3.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
174
|
+
aiecs-1.3.4.dist-info/entry_points.txt,sha256=TfLBuwLOfgQqKvnoF1sgTS19-Hgl0aWvCZjIdblIiig,667
|
|
175
|
+
aiecs-1.3.4.dist-info/top_level.txt,sha256=22IlUlOqh9Ni3jXlQNMNUqzbW8dcxXPeR_EQ-BJVcV8,6
|
|
176
|
+
aiecs-1.3.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|