Class: Anthropic::Models::Messages::MessageBatch

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/messages/message_batch.rb

Overview

Defined Under Namespace

Modules: ProcessingStatus

Instance Attribute Summary collapse

Instance Method Summary collapse

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(id: , archived_at: , cancel_initiated_at: , created_at: , ended_at: , expires_at: , processing_status: , request_counts: , results_url: , type: :message_batch) ⇒ void

Some parameter documentations has been truncated, see Anthropic::Models::Messages::MessageBatch for more details.

Parameters:

  • id (String) (defaults to: )

    Unique object identifier.

  • archived_at (Time, nil) (defaults to: )

    RFC 3339 datetime string representing the time at which the Message Batch was ar

  • cancel_initiated_at (Time, nil) (defaults to: )

    RFC 3339 datetime string representing the time at which cancellation was initiat

  • created_at (Time) (defaults to: )

    RFC 3339 datetime string representing the time at which the Message Batch was cr

  • ended_at (Time, nil) (defaults to: )

    RFC 3339 datetime string representing the time at which processing for the Messa

  • expires_at (Time) (defaults to: )

    RFC 3339 datetime string representing the time at which the Message Batch will e

  • processing_status (Symbol, Anthropic::Models::Messages::MessageBatch::ProcessingStatus) (defaults to: )

    Processing status of the Message Batch.

  • request_counts (Anthropic::Models::Messages::MessageBatchRequestCounts) (defaults to: )

    Tallies requests within the Message Batch, categorized by their status.

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

    URL to a .jsonl file containing the results of the Message Batch requests. Spe

  • type (Symbol, :message_batch) (defaults to: :message_batch)

    Object type.



# File 'lib/anthropic/models/messages/message_batch.rb', line 88


Instance Attribute Details

#archived_atTime?

RFC 3339 datetime string representing the time at which the Message Batch was archived and its results became unavailable.

Returns:

  • (Time, nil)


21
# File 'lib/anthropic/models/messages/message_batch.rb', line 21

required :archived_at, Time, nil?: true

#cancel_initiated_atTime?

RFC 3339 datetime string representing the time at which cancellation was initiated for the Message Batch. Specified only if cancellation was initiated.

Returns:

  • (Time, nil)


28
# File 'lib/anthropic/models/messages/message_batch.rb', line 28

required :cancel_initiated_at, Time, nil?: true

#created_atTime

RFC 3339 datetime string representing the time at which the Message Batch was created.

Returns:

  • (Time)


35
# File 'lib/anthropic/models/messages/message_batch.rb', line 35

required :created_at, Time

#ended_atTime?

RFC 3339 datetime string representing the time at which processing for the Message Batch ended. Specified only once processing ends.

Processing ends when every request in a Message Batch has either succeeded, errored, canceled, or expired.

Returns:

  • (Time, nil)


45
# File 'lib/anthropic/models/messages/message_batch.rb', line 45

required :ended_at, Time, nil?: true

#expires_atTime

RFC 3339 datetime string representing the time at which the Message Batch will expire and end processing, which is 24 hours after creation.

Returns:

  • (Time)


52
# File 'lib/anthropic/models/messages/message_batch.rb', line 52

required :expires_at, Time

#idString

Unique object identifier.

The format and length of IDs may change over time.

Returns:

  • (String)


14
# File 'lib/anthropic/models/messages/message_batch.rb', line 14

required :id, String

#processing_statusSymbol, Anthropic::Models::Messages::MessageBatch::ProcessingStatus

Processing status of the Message Batch.



58
# File 'lib/anthropic/models/messages/message_batch.rb', line 58

required :processing_status, enum: -> { Anthropic::Messages::MessageBatch::ProcessingStatus }

#request_countsAnthropic::Models::Messages::MessageBatchRequestCounts

Tallies requests within the Message Batch, categorized by their status.

Requests start as processing and move to one of the other statuses only once processing of the entire batch ends. The sum of all values always matches the total number of requests in the batch.



68
# File 'lib/anthropic/models/messages/message_batch.rb', line 68

required :request_counts, -> { Anthropic::Messages::MessageBatchRequestCounts }

#results_urlString?

URL to a .jsonl file containing the results of the Message Batch requests. Specified only once processing ends.

Results in the file are not guaranteed to be in the same order as requests. Use the custom_id field to match results to requests.

Returns:

  • (String, nil)


78
# File 'lib/anthropic/models/messages/message_batch.rb', line 78

required :results_url, String, nil?: true

#typeSymbol, :message_batch

Object type.

For Message Batches, this is always "message_batch".

Returns:

  • (Symbol, :message_batch)


86
# File 'lib/anthropic/models/messages/message_batch.rb', line 86

required :type, const: :message_batch