Class: Infrawrench::ChatConversationsPendingNamespace

Inherits:
Object
  • Object
show all
Defined in:
lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs

Overview

client.chat.conversations.pending

Instance Method Summary collapse

Constructor Details

#initialize(transport) ⇒ ChatConversationsPendingNamespace

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of ChatConversationsPendingNamespace.

Parameters:



3018
3019
3020
# File 'lib/infrawrench/client.rb', line 3018

def initialize(transport)
  @transport = transport
end

Instance Method Details

#answer(conversation_id:, pending_id:, body:, org_id: nil, request_options: nil) ⇒ Hash

Answer an agent question

Submit answers to a chat-only ask_question pending action (selection with an Other field, or a textarea). Not used for destructive-tool approval.

Requires permission: chat:write.

POST /api/org/orgId/chat/conversations/conversationId/pending/pendingId/answer

Raises on 400: Bad request

Raises on 403: Forbidden

Raises on 404: Not found

Raises on 409: Conflict

Parameters:

  • org_id (String, nil) (defaults to: nil)

    Organization id. Defaults to the org_id the client was constructed with.

  • conversation_id (String)

    Chat conversation id

  • pending_id (String)

    Pending ask_question action id

  • body (Hash)

    Request body, shaped as ChatAskQuestionInput.

  • request_options (Hash, nil) (defaults to: nil)

    Per-call :headers, :timeout and :open_timeout.

  • conversation_id: (String)
  • pending_id: (String)
  • body: (chat_ask_question_input)
  • org_id: (String, nil) (defaults to: nil)
  • request_options: (Hash[Symbol, untyped], nil) (defaults to: nil)

Returns:

  • (Hash)

    Parsed JSON, shaped as ChatAskQuestionResult — see sig/infrawrench/sdk.rbs.

Raises:



3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
# File 'lib/infrawrench/client.rb', line 3050

def answer(conversation_id:, pending_id:, body:, org_id: nil, request_options: nil)
  @transport.request(
    http_method: "POST",
    path: "/api/org/{orgId}/chat/conversations/{conversationId}/pending/{pendingId}/answer",
    path_params: {
      "orgId" => org_id,
      "conversationId" => conversation_id,
      "pendingId" => pending_id
    },
    body: body,
    request_options: request_options
  )
end