Skip to content

Commit

Permalink
Add async source
Browse files Browse the repository at this point in the history
  • Loading branch information
lalalune committed Aug 1, 2023
1 parent 100c671 commit a705eab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions agentcomlink/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def send_message(message, type="chat", source="default"):
asyncio.run(ws.send_text(message))


async def async_send_message(message, type="chat"):
async def async_send_message(message, type="chat", source="default"):
"""
Send a message to the websocket.
Expand All @@ -109,7 +109,7 @@ async def async_send_message(message, type="chat"):
global loop
if ws is not None and loop is not None:
print("send text")
message = json.dumps({"type": type, "message": message})
message = json.dumps({"type": type, "message": message, "source": source})
print(message)
await ws.send_text(message)

Expand Down

0 comments on commit a705eab

Please sign in to comment.