airtrain 0.1.28__py3-none-any.whl → 0.1.29__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.
- airtrain/__init__.py +1 -1
- airtrain/integrations/fireworks/structured_requests_skills.py +9 -4
- {airtrain-0.1.28.dist-info → airtrain-0.1.29.dist-info}/METADATA +1 -1
- {airtrain-0.1.28.dist-info → airtrain-0.1.29.dist-info}/RECORD +6 -6
- {airtrain-0.1.28.dist-info → airtrain-0.1.29.dist-info}/WHEEL +0 -0
- {airtrain-0.1.28.dist-info → airtrain-0.1.29.dist-info}/top_level.txt +0 -0
airtrain/__init__.py
CHANGED
@@ -130,13 +130,15 @@ class FireworksStructuredRequestSkill(
|
|
130
130
|
except json.JSONDecodeError:
|
131
131
|
continue
|
132
132
|
|
133
|
-
# Once complete, parse the full
|
134
|
-
|
133
|
+
# Once complete, parse the full response with think tags
|
134
|
+
complete_response = "".join(json_buffer)
|
135
|
+
reasoning, json_str = self._parse_response_content(complete_response)
|
136
|
+
|
135
137
|
try:
|
136
138
|
parsed_response = input_data.response_model.model_validate_json(
|
137
|
-
|
139
|
+
json_str
|
138
140
|
)
|
139
|
-
yield {"complete": parsed_response}
|
141
|
+
yield {"complete": parsed_response, "reasoning": reasoning}
|
140
142
|
except Exception as e:
|
141
143
|
raise ProcessingError(f"Failed to parse JSON response: {str(e)}")
|
142
144
|
|
@@ -164,12 +166,14 @@ class FireworksStructuredRequestSkill(
|
|
164
166
|
# For streaming, collect and parse the entire response
|
165
167
|
json_buffer = []
|
166
168
|
parsed_response = None
|
169
|
+
reasoning = None
|
167
170
|
|
168
171
|
for chunk in self.process_stream(input_data):
|
169
172
|
if "chunk" in chunk:
|
170
173
|
json_buffer.append(chunk["chunk"])
|
171
174
|
elif "complete" in chunk:
|
172
175
|
parsed_response = chunk["complete"]
|
176
|
+
reasoning = chunk.get("reasoning")
|
173
177
|
|
174
178
|
if parsed_response is None:
|
175
179
|
raise ProcessingError("Failed to parse streamed response")
|
@@ -178,6 +182,7 @@ class FireworksStructuredRequestSkill(
|
|
178
182
|
parsed_response=parsed_response,
|
179
183
|
used_model=input_data.model,
|
180
184
|
usage={}, # Usage stats not available in streaming mode
|
185
|
+
reasoning=reasoning,
|
181
186
|
)
|
182
187
|
else:
|
183
188
|
# For non-streaming, use regular request
|
@@ -1,4 +1,4 @@
|
|
1
|
-
airtrain/__init__.py,sha256=
|
1
|
+
airtrain/__init__.py,sha256=KwgaA3OIuQa6v6bg6dmrZp2drOpIlUw6oF08GZjprfA,2099
|
2
2
|
airtrain/contrib/__init__.py,sha256=pG-7mJ0pBMqp3Q86mIF9bo1PqoBOVSGlnEK1yY1U1ok,641
|
3
3
|
airtrain/contrib/travel/__init__.py,sha256=clmBodw4nkTA-DsgjVGcXfJGPaWxIpCZDtdO-8RzL0M,811
|
4
4
|
airtrain/contrib/travel/agents.py,sha256=tpQtZ0WUiXBuhvZtc2JlEam5TuR5l-Tndi14YyImDBM,8975
|
@@ -25,7 +25,7 @@ airtrain/integrations/fireworks/models.py,sha256=F-MddbLCLAsTjwRr1l6IpJxOegyY4pD
|
|
25
25
|
airtrain/integrations/fireworks/requests_skills.py,sha256=zPIR70l0KdSGmA5WyDEopFAdKHSPltAttJBzWyHu6Bk,5878
|
26
26
|
airtrain/integrations/fireworks/skills.py,sha256=OB4epD4CSTxExUCC1oMJ_8rHLOoftlxf0FUoIVrd4mA,5163
|
27
27
|
airtrain/integrations/fireworks/structured_completion_skills.py,sha256=IXG4gsZDSfuscrmKIHfnyHkBaCV7zlPInaWXb95iC5k,6428
|
28
|
-
airtrain/integrations/fireworks/structured_requests_skills.py,sha256=
|
28
|
+
airtrain/integrations/fireworks/structured_requests_skills.py,sha256=oRpbKMOcKgY2js16uNkIx866UEwEYSNgFPNYn9cLO3U,8409
|
29
29
|
airtrain/integrations/fireworks/structured_skills.py,sha256=BZaLqSOTC11QdZ4kDORS4JnwF_YXBAa-IiwQ5dJiHXw,3895
|
30
30
|
airtrain/integrations/google/__init__.py,sha256=ElwgcXfbg_gGMm6zbkMXCQPFKZUb-yTJk986o19A7Cs,214
|
31
31
|
airtrain/integrations/google/credentials.py,sha256=KSvWNqW8Mjr4MkysRvUqlrOSGdShNIe5u2OPO6vRrWY,2047
|
@@ -57,7 +57,7 @@ airtrain/integrations/together/rerank_skill.py,sha256=gjH24hLWCweWKPyyfKZMG3K_g9
|
|
57
57
|
airtrain/integrations/together/schemas.py,sha256=pBMrbX67oxPCr-sg4K8_Xqu1DWbaC4uLCloVSascROg,1210
|
58
58
|
airtrain/integrations/together/skills.py,sha256=mUoHc2r5TYQi5iGzwz2aDuUeROGq7teCtNrOlNApef4,6276
|
59
59
|
airtrain/integrations/together/vision_models_config.py,sha256=m28HwYDk2Kup_J-a1FtynIa2ZVcbl37kltfoHnK8zxs,1544
|
60
|
-
airtrain-0.1.
|
61
|
-
airtrain-0.1.
|
62
|
-
airtrain-0.1.
|
63
|
-
airtrain-0.1.
|
60
|
+
airtrain-0.1.29.dist-info/METADATA,sha256=R_xdPE4QQ8KN9dUG4NN-PRiP02GOVKBNSB_Qtemyaig,5243
|
61
|
+
airtrain-0.1.29.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
62
|
+
airtrain-0.1.29.dist-info/top_level.txt,sha256=cFWW1vY6VMCb3AGVdz6jBDpZ65xxBRSqlsPyySxTkxY,9
|
63
|
+
airtrain-0.1.29.dist-info/RECORD,,
|
File without changes
|
File without changes
|