Class: Anthropic::Models::Beta::BetaDream
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Anthropic::Models::Beta::BetaDream
- Defined in:
- lib/anthropic/models/beta/beta_dream.rb,
sig/anthropic/models/beta/beta_dream.rbs
Overview
Instance Attribute Summary collapse
-
#archived_at ⇒ Time?
When the dream was archived, in RFC 3339, or
nullif it hasn't been archived. -
#created_at ⇒ Time
When the dream was created, in RFC 3339.
-
#ended_at ⇒ Time?
When the dream reached
completed,failed, orcanceled, in RFC 3339, ornullif it is stillpendingorrunning. -
#error ⇒ Anthropic::Models::Beta::BetaDreamErrorObject?
Why the dream failed, or
nullifstatusisn'tfailed. -
#id ⇒ String
The unique ID of the dream (
drm_...). -
#inputs ⇒ Array<Anthropic::Models::Beta::BetaDreamMemoryStoreInput, Anthropic::Models::Beta::BetaDreamSessionsInput>
The sources that the dream reads, from the request that created it.
-
#instructions ⇒ String?
The guidance given when the dream was created, or
nullif none was given. -
#model ⇒ Anthropic::Models::Beta::BetaDreamModelConfig
The model that runs a dream, from the request that created it.
-
#output_behavior ⇒ Anthropic::Models::Beta::BetaOutputBehaviorCreateNew, Anthropic::Models::Beta::BetaOutputBehaviorUpdateExisting
Where the dream writes its result, as set in the request that created the dream.
-
#outputs ⇒ Array<Anthropic::Models::Beta::BetaDreamOutput>
The memory store that holds the dream's result, as a one-item array, or an empty array until the dream records that memory store.
-
#session_id ⇒ String?
The ID of the session that runs the dream (
sesn_...), ornullif that session hasn't started. -
#status ⇒ Symbol, Anthropic::Models::Beta::BetaDreamStatus
Where a dream is in its lifecycle.
- #type ⇒ Symbol, :dream
-
#usage ⇒ Anthropic::Models::Beta::BetaDreamUsage
The dream's token counts, which stop changing once its
statusiscompletedorfailed.
Instance Method Summary collapse
-
#initialize ⇒ BetaDream
constructor
A new instance of BetaDream.
- #to_hash ⇒ { id: String, archived_at: Time?, created_at: Time, ended_at: Time?, error: Anthropic::Beta::BetaDreamErrorObject?, inputs: ::Array[Anthropic::Models::Beta::beta_dream_input], instructions: String?, model: Anthropic::Beta::BetaDreamModelConfig, output_behavior: Anthropic::Models::Beta::beta_output_behavior, outputs: ::Array[Anthropic::Beta::BetaDreamOutput], session_id: String?, status: Anthropic::Models::Beta::beta_dream_status, type: :dream, usage: Anthropic::Beta::BetaDreamUsage }
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 ⇒ BetaDream
Returns a new instance of BetaDream.
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'sig/anthropic/models/beta/beta_dream.rbs', line 53
def initialize: (
id: String,
archived_at: Time?,
created_at: Time,
ended_at: Time?,
error: Anthropic::Beta::BetaDreamErrorObject?,
inputs: ::Array[Anthropic::Models::Beta::beta_dream_input],
instructions: String?,
model: Anthropic::Beta::BetaDreamModelConfig,
output_behavior: Anthropic::Models::Beta::beta_output_behavior,
outputs: ::Array[Anthropic::Beta::BetaDreamOutput],
session_id: String?,
status: Anthropic::Models::Beta::beta_dream_status,
usage: Anthropic::Beta::BetaDreamUsage,
?type: :dream
) -> void
|
Instance Attribute Details
#archived_at ⇒ Time?
When the dream was archived, in RFC 3339, or null if it hasn't been archived.
18 |
# File 'lib/anthropic/models/beta/beta_dream.rb', line 18 required :archived_at, Time, nil?: true |
#created_at ⇒ Time
When the dream was created, in RFC 3339.
Lists of dreams are sorted by this time, newest first.
26 |
# File 'lib/anthropic/models/beta/beta_dream.rb', line 26 required :created_at, Time |
#ended_at ⇒ Time?
When the dream reached completed, failed, or canceled, in RFC 3339, or
null if it is still pending or running.
33 |
# File 'lib/anthropic/models/beta/beta_dream.rb', line 33 required :ended_at, Time, nil?: true |
#error ⇒ Anthropic::Models::Beta::BetaDreamErrorObject?
Why the dream failed, or null if status isn't failed.
39 |
# File 'lib/anthropic/models/beta/beta_dream.rb', line 39 required :error, -> { Anthropic::Beta::BetaDreamErrorObject }, nil?: true |
#id ⇒ String
The unique ID of the dream (drm_...).
12 |
# File 'lib/anthropic/models/beta/beta_dream.rb', line 12 required :id, String |
#inputs ⇒ Array<Anthropic::Models::Beta::BetaDreamMemoryStoreInput, Anthropic::Models::Beta::BetaDreamSessionsInput>
The sources that the dream reads, from the request that created it.
45 |
# File 'lib/anthropic/models/beta/beta_dream.rb', line 45 required :inputs, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::Beta::BetaDreamInput] } |
#instructions ⇒ String?
The guidance given when the dream was created, or null if none was given.
51 |
# File 'lib/anthropic/models/beta/beta_dream.rb', line 51 required :instructions, String, nil?: true |
#model ⇒ Anthropic::Models::Beta::BetaDreamModelConfig
The model that runs a dream, from the request that created it.
The dream uses this model for all of its work. The response always gives the model as an object, even if the request gave only a model ID.
60 |
# File 'lib/anthropic/models/beta/beta_dream.rb', line 60 required :model, -> { Anthropic::Beta::BetaDreamModelConfig } |
#output_behavior ⇒ Anthropic::Models::Beta::BetaOutputBehaviorCreateNew, Anthropic::Models::Beta::BetaOutputBehaviorUpdateExisting
Where the dream writes its result, as set in the request that created the dream.
If that request left out output_behavior, the dream used the create_new
behavior.
68 |
# File 'lib/anthropic/models/beta/beta_dream.rb', line 68 required :output_behavior, union: -> { Anthropic::Beta::BetaOutputBehavior } |
#outputs ⇒ Array<Anthropic::Models::Beta::BetaDreamOutput>
The memory store that holds the dream's result, as a one-item array, or an empty array until the dream records that memory store.
The array is empty while the dream is pending and for a short time after it
starts running. It can stay empty if the dream fails or is canceled before
then. The memory store holds the complete result only once status is
completed.
See the Dreams guide for how to review and use the result.
84 |
# File 'lib/anthropic/models/beta/beta_dream.rb', line 84 required :outputs, -> { Anthropic::Internal::Type::ArrayOf[Anthropic::Beta::BetaDreamOutput] } |
#session_id ⇒ String?
The ID of the session that runs the dream (sesn_...), or null if that
session hasn't started.
Stream that session's events to follow what the dream reads and writes.
See the Dreams guide for how to watch a running dream.
97 |
# File 'lib/anthropic/models/beta/beta_dream.rb', line 97 required :session_id, String, nil?: true |
#status ⇒ Symbol, Anthropic::Models::Beta::BetaDreamStatus
Where a dream is in its lifecycle.
completed, failed, and canceled are final: once a dream has one of these
statuses, its status doesn't change again.
See the Dreams guide for what each status means.
110 |
# File 'lib/anthropic/models/beta/beta_dream.rb', line 110 required :status, enum: -> { Anthropic::Beta::BetaDreamStatus } |
#type ⇒ Symbol, :dream
115 |
# File 'lib/anthropic/models/beta/beta_dream.rb', line 115 required :type, const: :dream |
#usage ⇒ Anthropic::Models::Beta::BetaDreamUsage
The dream's token counts, which stop changing once its status is completed
or failed. After a cancel, they can keep changing.
122 |
# File 'lib/anthropic/models/beta/beta_dream.rb', line 122 required :usage, -> { Anthropic::Beta::BetaDreamUsage } |
Instance Method Details
#to_hash ⇒ { id: String, archived_at: Time?, created_at: Time, ended_at: Time?, error: Anthropic::Beta::BetaDreamErrorObject?, inputs: ::Array[Anthropic::Models::Beta::beta_dream_input], instructions: String?, model: Anthropic::Beta::BetaDreamModelConfig, output_behavior: Anthropic::Models::Beta::beta_output_behavior, outputs: ::Array[Anthropic::Beta::BetaDreamOutput], session_id: String?, status: Anthropic::Models::Beta::beta_dream_status, type: :dream, usage: Anthropic::Beta::BetaDreamUsage }
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'sig/anthropic/models/beta/beta_dream.rbs', line 70
def to_hash: -> {
id: String,
archived_at: Time?,
created_at: Time,
ended_at: Time?,
error: Anthropic::Beta::BetaDreamErrorObject?,
inputs: ::Array[Anthropic::Models::Beta::beta_dream_input],
instructions: String?,
model: Anthropic::Beta::BetaDreamModelConfig,
output_behavior: Anthropic::Models::Beta::beta_output_behavior,
outputs: ::Array[Anthropic::Beta::BetaDreamOutput],
session_id: String?,
status: Anthropic::Models::Beta::beta_dream_status,
type: :dream,
usage: Anthropic::Beta::BetaDreamUsage
}
|