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 (Object)

    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…’.

Raises:

  • (ArgumentError)

See Also:



20
21
22
23
24
25
# File 'lib/slack/web/api/endpoints/assistant_threads.rb', line 20

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:



40
41
42
43
44
45
# File 'lib/slack/web/api/endpoints/assistant_threads.rb', line 40

def assistant_threads_setSuggestedPrompts(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 :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:



58
59
60
61
62
63
# File 'lib/slack/web/api/endpoints/assistant_threads.rb', line 58

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