synth-ai 0.1.0.dev31__py3-none-any.whl → 0.1.0.dev32__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.
@@ -174,24 +174,24 @@ class StringifiedJSONHandler(StructuredHandlerBase):
174
174
  type(raw_text_response_or_cached_hit) in [str, BaseLMResponse]
175
175
  ), f"Expected str or BaseLMResponse, got {type(raw_text_response_or_cached_hit)}"
176
176
  if type(raw_text_response_or_cached_hit) == BaseLMResponse:
177
- print("Got cached hit, returning directly")
177
+ #print("Got cached hit, returning directly")
178
178
  raw_text_response = raw_text_response_or_cached_hit.raw_response
179
179
  else:
180
180
  raw_text_response = raw_text_response_or_cached_hit
181
181
  logger.debug(f"Raw response from model:\n{raw_text_response}")
182
182
 
183
- print("Trying to parse structured output")
183
+ #print("Trying to parse structured output")
184
184
  try:
185
185
  structured_output = pull_out_structured_output(
186
186
  raw_text_response, response_model
187
187
  )
188
188
 
189
- print("Successfully parsed structured output on first attempt")
189
+ #print("Successfully parsed structured output on first attempt")
190
190
  break
191
191
  except Exception as e:
192
192
  logger.warning(f"Failed to parse structured output: {str(e)}")
193
193
  try:
194
- print("Attempting to fix with forced JSON parser")
194
+ #print("Attempting to fix with forced JSON parser")
195
195
  structured_output = await fix_errant_forced_async(
196
196
  messages_with_json_formatting_instructions,
197
197
  raw_text_response,
@@ -200,7 +200,7 @@ class StringifiedJSONHandler(StructuredHandlerBase):
200
200
  )
201
201
  assert isinstance(structured_output, BaseModel), "Structured output must be a Pydantic model"
202
202
  assert not isinstance(structured_output, BaseLMResponse), "Got BaseLMResponse instead of Pydantic model"
203
- print("Successfully fixed and parsed structured output")
203
+ #print("Successfully fixed and parsed structured output")
204
204
  break
205
205
  except Exception as e:
206
206
  logger.error(f"Failed to fix structured output: {str(e)}")
@@ -215,8 +215,8 @@ class StringifiedJSONHandler(StructuredHandlerBase):
215
215
  raise StructuredOutputCoercionFailureException(
216
216
  "Failed to get structured output"
217
217
  )
218
- print("Successfully parsed structured output")
219
- print(structured_output)
218
+ #print("Successfully parsed structured output")
219
+ #print(structured_output)
220
220
  assert isinstance(structured_output, BaseModel), "Structured output must be a Pydantic model"
221
221
  assert not isinstance(structured_output, BaseLMResponse),"Got BaseLMResponse instead of Pydantic model"
222
222
  return BaseLMResponse(
@@ -277,16 +277,16 @@ class StringifiedJSONHandler(StructuredHandlerBase):
277
277
  structured_output = pull_out_structured_output(
278
278
  raw_text_response, response_model
279
279
  )
280
- print("Successfully parsed structured output on first attempt")
280
+ #print("Successfully parsed structured output on first attempt")
281
281
  break
282
282
  except Exception as e:
283
283
  logger.warning(f"Failed to parse structured output: {str(e)}")
284
284
  try:
285
- print("Attempting to fix with forced JSON parser")
285
+ #print("Attempting to fix with forced JSON parser")
286
286
  structured_output = fix_errant_forced_sync(
287
287
  raw_text_response, response_model, "gpt-4o-mini"
288
288
  )
289
- print("Successfully fixed and parsed structured output")
289
+ #print("Successfully fixed and parsed structured output")
290
290
  break
291
291
  except Exception as e:
292
292
  logger.error(f"Failed to fix structured output: {str(e)}")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: synth-ai
3
- Version: 0.1.0.dev31
3
+ Version: 0.1.0.dev32
4
4
  Summary: Software for aiding the best and multiplying the will.
5
5
  Author: Josh Purtell
6
6
  Author-email: Josh Purtell <josh@usesynth.ai>
@@ -35,7 +35,7 @@ synth_ai/zyk/lms/cost/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
35
35
  synth_ai/zyk/lms/cost/monitor.py,sha256=cSKIvw6WdPZIRubADWxQoh1MdB40T8-jjgfNUeUHIn0,5
36
36
  synth_ai/zyk/lms/cost/statefulness.py,sha256=TOsuXL8IjtKOYJ2aJQF8TwJVqn_wQ7AIwJJmdhMye7U,36
37
37
  synth_ai/zyk/lms/structured_outputs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
38
- synth_ai/zyk/lms/structured_outputs/handler.py,sha256=gh3KtmZCyUima5BunpjaeKcanmRWJvCy8Ly8gUgDf_M,16915
38
+ synth_ai/zyk/lms/structured_outputs/handler.py,sha256=BQ0T4HBFXC9qesF8v0lG8MuiOecWm2YEF75nUt1mB_s,16925
39
39
  synth_ai/zyk/lms/structured_outputs/inject.py,sha256=Fy-zDeleRxOZ8ZRM6IuZ6CP2XZnMe4K2PEn4Q9c_KPY,11777
40
40
  synth_ai/zyk/lms/structured_outputs/rehabilitate.py,sha256=GuIhzsb7rTvwgn7f9I9omNnXBz5Me_qrtNYcTWzw5_U,7909
41
41
  synth_ai/zyk/lms/tools/base.py,sha256=j7wYb1xAvaAm3qVrINphgUhGS-UjZmRpbouseQYgh7A,3228
@@ -56,11 +56,11 @@ synth_ai/zyk/lms/vendors/supported/deepseek.py,sha256=BElW0NGpkSA62wOqzzMtDw8XR3
56
56
  synth_ai/zyk/lms/vendors/supported/groq.py,sha256=Fbi7QvhdLx0F-VHO5PY-uIQlPR0bo3C9h1MvIOx8nz0,388
57
57
  synth_ai/zyk/lms/vendors/supported/ollama.py,sha256=K30VBFRTd7NYyPmyBVRZS2sm0UB651AHp9i3wd55W64,469
58
58
  synth_ai/zyk/lms/vendors/supported/together.py,sha256=Ni_jBqqGPN0PkkY-Ew64s3gNKk51k3FCpLSwlNhKbf0,342
59
- synth_ai-0.1.0.dev31.dist-info/licenses/LICENSE,sha256=ynhjRQUfqA_RdGRATApfFA_fBAy9cno04sLtLUqxVFM,1069
59
+ synth_ai-0.1.0.dev32.dist-info/licenses/LICENSE,sha256=ynhjRQUfqA_RdGRATApfFA_fBAy9cno04sLtLUqxVFM,1069
60
60
  tests/test_agent.py,sha256=CjPPWuMWC_TzX1DkDald-bbAxgjXE-HPQvFhq2B--5k,22363
61
61
  tests/test_recursive_structured_outputs.py,sha256=Ne-9XwnOxN7eSpGbNHOpegR-sRj589I84T6y8Z_4QnA,5781
62
62
  tests/test_structured_outputs.py,sha256=J7sfbGZ7OeB5ONIKpcCTymyayNyAdFfGokC1bcUrSx0,3651
63
- synth_ai-0.1.0.dev31.dist-info/METADATA,sha256=2_iOE8RJoBGSLhzESPdzowRaUwb_D9_5o1dDckh0UoE,2702
64
- synth_ai-0.1.0.dev31.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
65
- synth_ai-0.1.0.dev31.dist-info/top_level.txt,sha256=5GzJO9j-KbJ_4ppxhmCUa_qdhHM4-9cHHNU76yAI8do,42
66
- synth_ai-0.1.0.dev31.dist-info/RECORD,,
63
+ synth_ai-0.1.0.dev32.dist-info/METADATA,sha256=zgAF8JSt2QckCC9M4iLt2vVn2i1c7N6MEUj4YEKTV9k,2702
64
+ synth_ai-0.1.0.dev32.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
65
+ synth_ai-0.1.0.dev32.dist-info/top_level.txt,sha256=5GzJO9j-KbJ_4ppxhmCUa_qdhHM4-9cHHNU76yAI8do,42
66
+ synth_ai-0.1.0.dev32.dist-info/RECORD,,