compose_message_thread

toloka.async_client.client.AsyncTolokaClient.compose_message_thread | Source code

Sends a message to a Toloker.

The sent message is added to a new message thread.

Parameters Description

ParametersTypeDescription
recipients_select_typeUnion[RecipientsSelectType, str, None]

Method for specifying recipients

topicOptional[Dict[str, str]]

Post title. You can provide a title in several languages (the message will come in the Toloker's language). Format: "<language RU/EN/TR/ID/FR>": "<topic text>".

textOptional[Dict[str, str]]

Message text. You can provide text in several languages (the message will come in the Toloker's language). Format: "<language RU/EN/TR/ID/FR>": "<message text>".

answerableOptional[bool]

Ability to reply to a message:

  • True — The Toloker can respond to the message.
  • False — The Toloker can't respond to the message.
recipients_idsOptional[List[str]]

List of IDs of Tolokers to whom the message will be sent.

recipients_filterOptional[FilterCondition]

Filter to select recipients.

Examples:

If you want to thank Tolokers who have tried to complete your tasks, send them a nice message.

message_text = "Amazing job! We've just trained our first model with the data YOU prepared for us. Thank you!"
toloka_client.compose_message_thread(
recipients_select_type='ALL',
topic={'EN': 'Thank you!'},
text={'EN': message_text},
answerable=False
)
Toloka-Kit
OverviewGetting OAuth tokenQuick start
Recipes
Reference
toloka.client
toloka.async_client
toloka.autoquality [autoquality]
toloka.metrics
toloka.streaming