Skip to content

Commit 4de9bcc

Browse files
authored
Merge pull request #116 from cagostino/chris/openai-like
introduced a bug in the streaming output handling for the shell. fixi…
2 parents 9f9a46d + eef40f5 commit 4de9bcc

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

npcsh/shell.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,9 +254,9 @@ def main() -> None:
254254
npc=npc_name,
255255
attachments=attachments,
256256
)
257+
str_output = ""
257258

258259
if NPCSH_STREAM_OUTPUT:
259-
str_output = ""
260260
for chunk in output:
261261
if provider == "anthropic":
262262
if chunk.type == "content_block_delta":
@@ -285,6 +285,7 @@ def main() -> None:
285285
str_output += chunk_content
286286
print(chunk_content, end="")
287287
print("\n")
288+
288289
if len(str_output) > 0:
289290
output = str_output
290291
save_conversation_message(

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def get_setup_message():
5757

5858
setup(
5959
name="npcsh",
60-
version="0.3.13",
60+
version="0.3.14",
6161
packages=find_packages(exclude=["tests*"]),
6262
install_requires=[
6363
"redis",

0 commit comments

Comments
 (0)