Skip to content

Commit

Permalink
fix: errant line feeds being sent with event refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Lee Huffman committed Jan 5, 2024
1 parent 8900115 commit 29c2e8f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions nimbusagent/agent/streaming.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ def output_post_content(post_content: List[str]):
def output_event(event_type: str, name: str, data: any):

if not data:
return f"[[[{event_type}:{name}]]]\n"
return f"[[[{event_type}:{name}]]]"

if not isinstance(data, str):
data = json.dumps(data)
if len(data) > self.max_event_size:
data = '{"error":"data too large"}'

return f"[[[{event_type}:{name}:{data}]]]\n"
return f"[[[{event_type}:{name}:{data}]]]"

loops = 0
post_content_items = []
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "nimbusagent"
version = "0.4.0"
version = "0.4.1"
description = "An OpenAI agent with basic memory, functions, and moderation support"
readme = "README.md"
license = { file = "LICENSE.txt" }
Expand Down

0 comments on commit 29c2e8f

Please sign in to comment.