smart_compose
SmartCompose
Bases: Resource
A collection of Smart Compose related API endpoints.
These endpoints allow for the generation of message suggestions.
Source code in nylas/resources/smart_compose.py
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
|
compose_message(identifier, request_body)
Compose a message.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
identifier |
str
|
The identifier of the grant to generate a message suggestion for. |
required |
request_body |
ComposeMessageRequest
|
The prompt that smart compose will use to generate a message suggestion. |
required |
Returns:
Type | Description |
---|---|
Response[ComposeMessageResponse]
|
The generated message. |
Source code in nylas/resources/smart_compose.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
|
compose_message_reply(identifier, message_id, request_body)
Compose a message reply.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
identifier |
str
|
The identifier of the grant to generate a message suggestion for. |
required |
message_id |
str
|
The id of the message to reply to. |
required |
request_body |
ComposeMessageRequest
|
The prompt that smart compose will use to generate a message reply suggestion. |
required |
Returns:
Type | Description |
---|---|
ComposeMessageResponse
|
The generated message reply. |
Source code in nylas/resources/smart_compose.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
|