Skip to content

Commit

Permalink
Change
Browse files Browse the repository at this point in the history
  • Loading branch information
BeatrixCohere committed Jul 12, 2024
1 parent 2d61d10 commit af08fae
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/backend/chat/custom/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ async def chat(self, chat_request: CohereChatRequest, **kwargs: Any) -> Any:
stream = self.call_chat(self.chat_request, deployment_model, **kwargs)

async for event in stream:
send_log_message(
logger,
f"Stream event: {event}",
level="info",
conversation_id=kwargs.get("conversation_id"),
user_id=kwargs.get("user_id"),
)
result = self.handle_event(event, chat_request)

if result:
Expand Down

0 comments on commit af08fae

Please sign in to comment.