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
Defined Under Namespace
Modules: Type
Instance Attribute Summary collapse
-
#archived_at ⇒ Time?
A timestamp in RFC 3339 format.
-
#created_at ⇒ Time
A timestamp in RFC 3339 format.
-
#ended_at ⇒ Time?
A timestamp in RFC 3339 format.
-
#error ⇒ Anthropic::Models::Beta::BetaDreamError?
Failure detail for a Dream whose
statusisfailed. -
#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
Which memory store a dream writes its result to.
-
#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, Anthropic::Models::Beta::BetaDream::Type
-
#usage ⇒ Anthropic::Models::Beta::BetaDreamUsage
The tokens that a dream has used so far.
Instance Method Summary collapse
-
#initialize(id:, archived_at:, created_at:, ended_at:, error:, inputs:, instructions:, model:, output_behavior:, outputs:, session_id:, status:, type:, usage:) ⇒ void
constructor
An asynchronous job that reads a memory store and past sessions, then writes a reorganized version of that memory store.
- #to_hash ⇒ {
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:, created_at:, ended_at:, error:, inputs:, instructions:, model:, output_behavior:, outputs:, session_id:, status:, type:, usage:) ⇒ void
An asynchronous job that reads a memory store and past sessions, then writes a reorganized version of that memory store.
By default the dream writes its result to a new memory store and doesn't change
the input memory store. With output_behavior set to update_existing, it
writes its result into the input memory store instead. The Dreams API is in
research preview, so this resource can still change.
See the Dreams guide for what a dream reads and produces.
Some parameter documentations has been truncated, see Anthropic::Models::Beta::BetaDream for more details.
|
|
# File 'lib/anthropic/models/beta/beta_dream.rb', line 128
|
Instance Attribute Details
#archived_at ⇒ Time?
A timestamp in RFC 3339 format
18 |
# File 'lib/anthropic/models/beta/beta_dream.rb', line 18 required :archived_at, Time, nil?: true |
#created_at ⇒ Time
A timestamp in RFC 3339 format
24 |
# File 'lib/anthropic/models/beta/beta_dream.rb', line 24 required :created_at, Time |
#ended_at ⇒ Time?
A timestamp in RFC 3339 format
30 |
# File 'lib/anthropic/models/beta/beta_dream.rb', line 30 required :ended_at, Time, nil?: true |
#error ⇒ Anthropic::Models::Beta::BetaDreamError?
Failure detail for a Dream whose status is failed.
36 |
# File 'lib/anthropic/models/beta/beta_dream.rb', line 36 required :error, -> { Anthropic::Beta::BetaDreamError }, 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.
42 |
# File 'lib/anthropic/models/beta/beta_dream.rb', line 42 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.
48 |
# File 'lib/anthropic/models/beta/beta_dream.rb', line 48 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.
57 |
# File 'lib/anthropic/models/beta/beta_dream.rb', line 57 required :model, -> { Anthropic::Beta::BetaDreamModelConfig } |
#output_behavior ⇒ Anthropic::Models::Beta::BetaOutputBehaviorCreateNew, Anthropic::Models::Beta::BetaOutputBehaviorUpdateExisting
Which memory store a dream writes its result to. Defaults to create_new when
left out of a create request.
64 |
# File 'lib/anthropic/models/beta/beta_dream.rb', line 64 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.
80 |
# File 'lib/anthropic/models/beta/beta_dream.rb', line 80 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.
93 |
# File 'lib/anthropic/models/beta/beta_dream.rb', line 93 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.
106 |
# File 'lib/anthropic/models/beta/beta_dream.rb', line 106 required :status, enum: -> { Anthropic::Beta::BetaDreamStatus } |
#type ⇒ Symbol, Anthropic::Models::Beta::BetaDream::Type
111 |
# File 'lib/anthropic/models/beta/beta_dream.rb', line 111 required :type, enum: -> { Anthropic::Beta::BetaDream::Type } |
#usage ⇒ Anthropic::Models::Beta::BetaDreamUsage
The tokens that a dream has used so far.
The counts are zero while the dream is pending and update while it is
running. They can keep changing after a cancel.
See the Dreams guide for how dreams are billed. See the prompt caching guide for how the input token counts add up.
126 |
# File 'lib/anthropic/models/beta/beta_dream.rb', line 126 required :usage, -> { Anthropic::Beta::BetaDreamUsage } |
Instance Method Details
#to_hash ⇒ {
70 |
# File 'sig/anthropic/models/beta/beta_dream.rbs', line 70
def to_hash: -> {
|