Module: Slack::Web::Api::Endpoints::AssistantThreads

Included in:
Slack::Web::Api::Endpoints
Defined in:
lib/slack/web/api/endpoints/assistant_threads.rb

Instance Method Summary collapse

Instance Method Details

#assistant_threads_setStatus(options = {}) ⇒ Object

Set the status for an AI assistant thread.

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :channel_id (string)

    Channel ID containing the assistant thread.

  • :thread_ts (string)

    Message timestamp of the thread of where to set the status.

  • :status (string)

    Status of the specified bot user, e.g., 'is thinking...'. A two minute timeout applies, which will cause the status to be removed if no message has been sent.

  • :loading_messages (array)

    The list of messages to rotate through as a loading indicator. Maximum of 10 messages.

  • :icon_emoji (string)

    Emoji to use as the icon for this message. Overrides icon_url.

  • :icon_url (string)

    Image URL to use as the icon for this message.

  • :username (string)

    The bot's username to display.

Raises:

  • (ArgumentError)

See Also:



28
29
30
31
32
33
# File 'lib/slack/web/api/endpoints/assistant_threads.rb', line 28

def assistant_threads_setStatus(options = {})
  raise ArgumentError, 'Required arguments :channel_id missing' if options[:channel_id].nil?
  raise ArgumentError, 'Required arguments :thread_ts missing' if options[:thread_ts].nil?
  raise ArgumentError, 'Required arguments :status missing' if options[:status].nil?
  post('assistant.threads.setStatus', options)
end

#assistant_threads_setSuggestedPrompts(options = {}) ⇒ Object

Set suggested prompts for the given assistant thread

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :channel_id (Object)

    Channel ID containing the assistant thread.

  • :thread_ts (string)

    Message timestamp of the thread to set suggested prompts for.

  • :prompts (Object)

    Each prompt should be supplied with its title and message attribute.

  • :title (string)

    Title for the list of provided prompts. For example: Suggested Prompts, Related Questions.

Raises:

  • (ArgumentError)

See Also:



48
49
50
51
52
# File 'lib/slack/web/api/endpoints/assistant_threads.rb', line 48

def assistant_threads_setSuggestedPrompts(options = {})
  raise ArgumentError, 'Required arguments :channel_id missing' if options[:channel_id].nil?
  raise ArgumentError, 'Required arguments :prompts missing' if options[:prompts].nil?
  post('assistant.threads.setSuggestedPrompts', options)
end

#assistant_threads_setTitle(options = {}) ⇒ Object

Set the title for the given assistant thread

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :channel_id (Object)

    Channel ID containing the assistant thread.

  • :thread_ts (string)

    Message timestamp of the thread to set suggested prompts for.

  • :title (string)

    The title to use for the thread.

Raises:

  • (ArgumentError)

See Also:



65
66
67
68
69
70
# File 'lib/slack/web/api/endpoints/assistant_threads.rb', line 65

def assistant_threads_setTitle(options = {})
  raise ArgumentError, 'Required arguments :channel_id missing' if options[:channel_id].nil?
  raise ArgumentError, 'Required arguments :thread_ts missing' if options[:thread_ts].nil?
  raise ArgumentError, 'Required arguments :title missing' if options[:title].nil?
  post('assistant.threads.setTitle', options)
end