Skip to content

Commit

Permalink
Merge pull request #325 from ag2ai/version0-6-1
Browse files Browse the repository at this point in the history
Bump version to 0.6.1
  • Loading branch information
marklysze authored Dec 30, 2024
2 parents edb5a4b + 0df847f commit 417672f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
2 changes: 1 addition & 1 deletion autogen/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
#
# SPDX-License-Identifier: Apache-2.0

__version__ = "0.6.0"
__version__ = "0.6.1"
26 changes: 15 additions & 11 deletions test/io/test_websockets.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

import pytest
from conftest import skip_openai
from websockets.exceptions import ConnectionClosed

import autogen
from autogen.cache.cache import Cache
Expand Down Expand Up @@ -159,17 +160,20 @@ def on_connect(iostream: IOWebsockets, success_dict: dict[str, bool] = success_d
websocket.send("Please write a poem about spring in a city of your choice.")

while True:
message = websocket.recv()
message = message.decode("utf-8") if isinstance(message, bytes) else message
# drop the newline character
if message.endswith("\n"):
message = message[:-1]

print(message, end="", flush=True)

if "TERMINATE" in message:
print()
print(" - Received TERMINATE message. Exiting.", flush=True)
try:
message = websocket.recv()
message = message.decode("utf-8") if isinstance(message, bytes) else message
# drop the newline character
if message.endswith("\n"):
message = message[:-1]

print(message, end="", flush=True)

if "TERMINATE" in message:
print()
print(" - Received TERMINATE message.", flush=True)
except ConnectionClosed as e:
print("Connection closed:", e, flush=True)
break

assert success_dict["success"]
Expand Down

0 comments on commit 417672f

Please sign in to comment.