Skip to content

Commit

Permalink
✨ Add request login for python sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinpiac committed Nov 1, 2023
1 parent e2eb1a5 commit 439ab78
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion sdks/python-sdk/agentlabs/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,18 @@ def echart(self, conversation_id: str, echart: dict, text = '', text_format: Mes
"attachments": [],
"type": "ECHART",
"metadata": echart
});
})

def request_login(self, text: str, conversation_id: str, format: MessageFormat = MessageFormat.PLAIN_TEXT):
"""Sends a login request to a conversation.
Such message will be communicated instantly to the conversation.
"""
self._realtime.emit('login-request', {
"conversationId": conversation_id,
"text": text,
"agentId": self.id,
"format": format.value,
})

def send(self, text: str, conversation_id: str, format: MessageFormat = MessageFormat.PLAIN_TEXT, attachments: list[AttachmentItem] = []):
"""Sends a message to a conversation.
Expand Down

0 comments on commit 439ab78

Please sign in to comment.