fere-sdk 0.1.0.dev6__tar.gz → 0.1.0.dev8__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.
@@ -14,5 +14,8 @@ tmp/*
14
14
  !tmp/.gitkeep
15
15
  coverage.xml
16
16
 
17
+ # triage-rum session state (contains stack traces / error data)
18
+ .claude/skills/triage-rum/triage-session.json
19
+
17
20
  # Eval output
18
21
  compare_results.json
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fere-sdk
3
- Version: 0.1.0.dev6
3
+ Version: 0.1.0.dev8
4
4
  Summary: Python SDK for the FereAI Gateway API
5
5
  Author-email: Fere AI <info@fere.ai>
6
6
  License-Expression: MIT
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "fere-sdk"
3
- version = "0.1.0.dev6"
3
+ version = "0.1.0.dev8"
4
4
  description = "Python SDK for the FereAI Gateway API"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -163,7 +163,13 @@ class FereAPI:
163
163
  if line.startswith("event:"):
164
164
  event_type = line[6:].strip()
165
165
  elif line.startswith("data:"):
166
- data = json.loads(line[5:].strip())
166
+ raw = line[5:].strip()
167
+ if not raw:
168
+ continue
169
+ try:
170
+ data = json.loads(raw)
171
+ except (json.JSONDecodeError, ValueError):
172
+ data = {"raw": raw}
167
173
  yield ChatEvent(event=event_type, data=data)
168
174
 
169
175
  async def get_threads(self, skip: int = 0, limit: int = 10) -> list[dict]:
@@ -359,7 +365,13 @@ class FereAPI:
359
365
  if line.startswith("event:"):
360
366
  event_type = line[6:].strip()
361
367
  elif line.startswith("data:"):
362
- data = json.loads(line[5:].strip())
368
+ raw = line[5:].strip()
369
+ if not raw:
370
+ continue
371
+ try:
372
+ data = json.loads(raw)
373
+ except (json.JSONDecodeError, ValueError):
374
+ data = {"raw": raw}
363
375
  yield ChatEvent(event=event_type, data=data)
364
376
 
365
377
  # ----------------------------------------------------------
File without changes