Skip to content

Commit 008d0fa

Browse files
committed
[0.4.15] [chore] yields error from API instead of returning
1 parent 9795eee commit 008d0fa

File tree

9 files changed

+9
-9
lines changed

9 files changed

+9
-9
lines changed

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
project = "tuneapi"
1414
copyright = "2024, Frello Technologies"
1515
author = "Frello Technologies"
16-
release = "0.4.14"
16+
release = "0.4.15"
1717

1818
# -- General configuration ---------------------------------------------------
1919
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "tuneapi"
3-
version = "0.4.14"
3+
version = "0.4.15"
44
description = "Tune AI APIs."
55
authors = ["Frello Technology Private Limited <[email protected]>"]
66
license = "MIT"

tuneapi/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Copyright © 2023- Frello Technology Private Limited
22

3-
__version__ = "0.4.14"
3+
__version__ = "0.4.15"

tuneapi/apis/model_anthropic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ def stream_chat(
215215
try:
216216
r.raise_for_status()
217217
except Exception as e:
218-
print(r.text)
218+
yield r.text
219219
raise e
220220

221221
fn_call = None

tuneapi/apis/model_gemini.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ def stream_chat(
209209
try:
210210
response.raise_for_status()
211211
except Exception as e:
212-
print(response.text)
212+
yield response.text
213213
raise e
214214

215215
block_lines = ""

tuneapi/apis/model_groq.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ def stream_chat(
152152
try:
153153
response.raise_for_status()
154154
except Exception as e:
155-
print(response.text)
155+
yield response.text
156156
raise e
157157

158158
fn_call = None

tuneapi/apis/model_mistral.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ def stream_chat(
156156
try:
157157
response.raise_for_status()
158158
except Exception as e:
159-
print(response.text)
159+
yield response.text
160160
raise e
161161

162162
fn_call = None

tuneapi/apis/model_openai.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def stream_chat(
153153
try:
154154
response.raise_for_status()
155155
except Exception as e:
156-
print(response.text)
156+
yield response.text
157157
raise e
158158

159159
fn_call = None

tuneapi/apis/model_tune.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def stream_chat(
177177
try:
178178
response.raise_for_status()
179179
except Exception as e:
180-
print(response.text)
180+
yield response.text
181181
raise e
182182

183183
fn_call = None

0 commit comments

Comments
 (0)