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
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 56 57 58 59 60 61 62 63 64 65 66 67 |
|
compose_message(identifier, request_body, overrides=None)
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 |
overrides |
RequestOverrides
|
The request overrides to apply to the request. |
None
|
Returns:
Type | Description |
---|---|
Response[ComposeMessageResponse]
|
The generated message. |
Source code in nylas/resources/smart_compose.py
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 |
|
compose_message_reply(identifier, message_id, request_body, overrides=None)
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 |
overrides |
RequestOverrides
|
The request overrides to apply to the request. |
None
|
Returns:
Type | Description |
---|---|
ComposeMessageResponse
|
The generated message reply. |
Source code in nylas/resources/smart_compose.py
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
|