Class: Anthropic::Models::Messages::BatchCreateParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/anthropic/models/messages/batch_create_params.rb,
sig/anthropic/models/messages/batch_create_params.rbs

Overview

See Also:

  • Anthropic::Resources::Messages::Batches#create

Defined Under Namespace

Classes: Request

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize ⇒ BatchCreateParams

Returns a new instance of BatchCreateParams.

Parameters:

  • requests: (::Array[Anthropic::Messages::BatchCreateParams::Request])
  • user_profile_id: (String)
  • workspace_id: (String)
  • request_options: (Anthropic::request_opts)


26
27
28
29
30
31
# File 'sig/anthropic/models/messages/batch_create_params.rbs', line 26

def initialize: (
  requests: ::Array[Anthropic::Messages::BatchCreateParams::Request],
  ?user_profile_id: String,
  ?workspace_id: String,
  ?request_options: Anthropic::request_opts
) -> void

Instance Attribute Details

#requests ⇒ Array<Anthropic::Models::Messages::BatchCreateParams::Request>

List of requests for prompt completion. Each is an individual request to create a Message.

Parameters:

  • value (::Array[Anthropic::Messages::BatchCreateParams::Request])

Returns:



16
17
# File 'lib/anthropic/models/messages/batch_create_params.rb', line 16

required :requests,
-> { Anthropic::Internal::Type::ArrayOf[Anthropic::Messages::BatchCreateParams::Request] }

#user_profile_id ⇒ String?

The user profile ID to attribute the requests in this batch to. Use when acting on behalf of a party other than your organization. Applies to every request in the batch; an individual request whose user_profile_id body field conflicts with this header is errored.

Parameters:

  • (String)

Returns:

  • (String, nil)


26
# File 'lib/anthropic/models/messages/batch_create_params.rb', line 26

optional :user_profile_id, String

#workspace_id ⇒ String?

Optional header to select the Workspace for this request. The value is a Workspace ID (for example, wrkspc_011CZkZaBF1tNoB5wlCeusgy).

Only needed for credentials that can act on more than one Workspace. A credential that belongs to a specific Workspace may omit it; if sent, it must match that Workspace.

Parameters:

  • (String)

Returns:

  • (String, nil)


37
# File 'lib/anthropic/models/messages/batch_create_params.rb', line 37

optional :workspace_id, String

Instance Method Details

#to_hash ⇒ { requests: ::Array[Anthropic::Messages::BatchCreateParams::Request], user_profile_id: String, workspace_id: String, request_options: Anthropic::RequestOptions }

Returns:

  • ({ requests: ::Array[Anthropic::Messages::BatchCreateParams::Request], user_profile_id: String, workspace_id: String, request_options: Anthropic::RequestOptions })


33
34
35
36
37
38
# File 'sig/anthropic/models/messages/batch_create_params.rbs', line 33

def to_hash: -> {
  requests: ::Array[Anthropic::Messages::BatchCreateParams::Request],
  user_profile_id: String,
  workspace_id: String,
  request_options: Anthropic::RequestOptions
}