Class BetaDream.Builder
-
- All Implemented Interfaces:
public final class BetaDream.BuilderA builder for BetaDream.
-
-
Method Summary
Modifier and Type Method Description final BetaDream.Builderid(String id)The unique ID of the dream ( drm_...).final BetaDream.Builderid(JsonField<String> id)Sets Builder.id to an arbitrary JSON value. final BetaDream.BuilderarchivedAt(OffsetDateTime archivedAt)When the dream was archived, in RFC 3339, or nullif it hasn't been archived.final BetaDream.BuilderarchivedAt(Optional<OffsetDateTime> archivedAt)Alias for calling Builder.archivedAt with archivedAt.orElse(null).final BetaDream.BuilderarchivedAt(JsonField<OffsetDateTime> archivedAt)Sets Builder.archivedAt to an arbitrary JSON value. final BetaDream.BuildercreatedAt(OffsetDateTime createdAt)When the dream was created, in RFC 3339. final BetaDream.BuildercreatedAt(JsonField<OffsetDateTime> createdAt)Sets Builder.createdAt to an arbitrary JSON value. final BetaDream.BuilderendedAt(OffsetDateTime endedAt)When the dream reached completed,failed, orcanceled, in RFC 3339, ornullif it is stillpendingorrunning.final BetaDream.BuilderendedAt(Optional<OffsetDateTime> endedAt)Alias for calling Builder.endedAt with endedAt.orElse(null).final BetaDream.BuilderendedAt(JsonField<OffsetDateTime> endedAt)Sets Builder.endedAt to an arbitrary JSON value. final BetaDream.Buildererror(BetaDreamError error)Why the dream failed, or nullifstatusisn'tfailed.final BetaDream.Buildererror(Optional<BetaDreamError> error)Alias for calling Builder.error with error.orElse(null).final BetaDream.Buildererror(JsonField<BetaDreamError> error)Sets Builder.error to an arbitrary JSON value. final BetaDream.Builderinputs(List<BetaDreamInput> inputs)The sources that the dream reads, from the request that created it. final BetaDream.Builderinputs(JsonField<List<BetaDreamInput>> inputs)Sets Builder.inputs to an arbitrary JSON value. final BetaDream.Builderinstructions(String instructions)The guidance given when the dream was created, or nullif none was given.final BetaDream.Builderinstructions(Optional<String> instructions)Alias for calling Builder.instructions with instructions.orElse(null).final BetaDream.Builderinstructions(JsonField<String> instructions)Sets Builder.instructions to an arbitrary JSON value. final BetaDream.Buildermodel(BetaDreamModelConfig model)The model that runs a dream, from the request that created it. final BetaDream.Buildermodel(JsonField<BetaDreamModelConfig> model)Sets Builder.model to an arbitrary JSON value. final BetaDream.BuilderoutputBehavior(BetaOutputBehavior outputBehavior)Where the dream writes its result, as set in the request that created the dream. final BetaDream.BuilderoutputBehavior(JsonField<BetaOutputBehavior> outputBehavior)Sets Builder.outputBehavior to an arbitrary JSON value. final BetaDream.BuilderoutputBehavior(BetaOutputBehaviorCreateNew createNew)Alias for calling outputBehavior with BetaOutputBehavior.ofCreateNew(createNew).final BetaDream.BuilderoutputBehavior(BetaOutputBehaviorUpdateExisting updateExisting)Alias for calling outputBehavior with BetaOutputBehavior.ofUpdateExisting(updateExisting).final BetaDream.Builderoutputs(List<BetaDreamOutput> outputs)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. final BetaDream.Builderoutputs(JsonField<List<BetaDreamOutput>> outputs)Sets Builder.outputs to an arbitrary JSON value. final BetaDream.BuildersessionId(String sessionId)The ID of the session that runs the dream ( sesn_...), ornullif that session hasn't started.final BetaDream.BuildersessionId(Optional<String> sessionId)Alias for calling Builder.sessionId with sessionId.orElse(null).final BetaDream.BuildersessionId(JsonField<String> sessionId)Sets Builder.sessionId to an arbitrary JSON value. final BetaDream.Builderstatus(BetaDreamStatus status)Where a dream is in its lifecycle. final BetaDream.Builderstatus(JsonField<BetaDreamStatus> status)Sets Builder.status to an arbitrary JSON value. final BetaDream.Buildertype(JsonValue type)Sets the field to an arbitrary JSON value. final BetaDream.Builderusage(BetaDreamUsage usage)The dream's token counts, which stop changing once its statusiscompletedorfailed.final BetaDream.Builderusage(JsonField<BetaDreamUsage> usage)Sets Builder.usage to an arbitrary JSON value. final BetaDream.BuilderadditionalProperties(Map<String, JsonValue> additionalProperties)final BetaDream.BuilderaddInput(BetaDreamInput input)Adds a single BetaDreamInput to inputs. final BetaDream.BuilderaddInput(BetaDreamMemoryStoreInput memoryStore)Alias for calling addInput with BetaDreamInput.ofMemoryStore(memoryStore).final BetaDream.BuilderaddInput(BetaDreamSessionsInput sessions)Alias for calling addInput with BetaDreamInput.ofSessions(sessions).final BetaDream.BuilderaddMemoryStoreInput(String memoryStoreId)Alias for calling addInput with the following: BetaDreamMemoryStoreInput.builder() .memoryStoreId(memoryStoreId) .build()final BetaDream.BuilderaddSessionsInput(List<String> sessionIds)Alias for calling addInput with the following: BetaDreamSessionsInput.builder() .sessionIds(sessionIds) .build()final BetaDream.BuilderupdateExistingOutputBehavior(String memoryStoreId)Alias for calling outputBehavior with the following: BetaOutputBehaviorUpdateExisting.builder() .memoryStoreId(memoryStoreId) .build()final BetaDream.BuilderaddOutput(BetaDreamOutput output)Adds a single BetaDreamOutput to outputs. final BetaDream.BuilderaddMemoryStoreOutput(String memoryStoreId)Alias for calling addOutput with the following: BetaDreamOutput.builder() .memoryStoreId(memoryStoreId) .build()final BetaDream.BuilderputAdditionalProperty(String key, JsonValue value)final BetaDream.BuilderputAllAdditionalProperties(Map<String, JsonValue> additionalProperties)final BetaDream.BuilderremoveAdditionalProperty(String key)final BetaDream.BuilderremoveAllAdditionalProperties(Set<String> keys)final BetaDreambuild()Returns an immutable instance of BetaDream. -
-
Method Detail
-
id
final BetaDream.Builder id(String id)
The unique ID of the dream (
drm_...).
-
id
final BetaDream.Builder id(JsonField<String> id)
Sets Builder.id to an arbitrary JSON value.
You should usually call Builder.id with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
archivedAt
final BetaDream.Builder archivedAt(OffsetDateTime archivedAt)
When the dream was archived, in RFC 3339, or
nullif it hasn't been archived.
-
archivedAt
final BetaDream.Builder archivedAt(Optional<OffsetDateTime> archivedAt)
Alias for calling Builder.archivedAt with
archivedAt.orElse(null).
-
archivedAt
final BetaDream.Builder archivedAt(JsonField<OffsetDateTime> archivedAt)
Sets Builder.archivedAt to an arbitrary JSON value.
You should usually call Builder.archivedAt with a well-typed OffsetDateTime value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
createdAt
final BetaDream.Builder createdAt(OffsetDateTime createdAt)
When the dream was created, in RFC 3339.
Lists of dreams are sorted by this time, newest first.
-
createdAt
final BetaDream.Builder createdAt(JsonField<OffsetDateTime> createdAt)
Sets Builder.createdAt to an arbitrary JSON value.
You should usually call Builder.createdAt with a well-typed OffsetDateTime value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
endedAt
final BetaDream.Builder endedAt(OffsetDateTime endedAt)
When the dream reached
completed,failed, orcanceled, in RFC 3339, ornullif it is stillpendingorrunning.
-
endedAt
final BetaDream.Builder endedAt(Optional<OffsetDateTime> endedAt)
Alias for calling Builder.endedAt with
endedAt.orElse(null).
-
endedAt
final BetaDream.Builder endedAt(JsonField<OffsetDateTime> endedAt)
Sets Builder.endedAt to an arbitrary JSON value.
You should usually call Builder.endedAt with a well-typed OffsetDateTime value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
error
final BetaDream.Builder error(BetaDreamError error)
Why the dream failed, or
nullifstatusisn'tfailed.
-
error
final BetaDream.Builder error(Optional<BetaDreamError> error)
Alias for calling Builder.error with
error.orElse(null).
-
error
final BetaDream.Builder error(JsonField<BetaDreamError> error)
Sets Builder.error to an arbitrary JSON value.
You should usually call Builder.error with a well-typed BetaDreamError value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
inputs
final BetaDream.Builder inputs(List<BetaDreamInput> inputs)
The sources that the dream reads, from the request that created it.
-
inputs
final BetaDream.Builder inputs(JsonField<List<BetaDreamInput>> inputs)
Sets Builder.inputs to an arbitrary JSON value.
You should usually call Builder.inputs with a well-typed
List<BetaDreamInput>value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
instructions
final BetaDream.Builder instructions(String instructions)
The guidance given when the dream was created, or
nullif none was given.
-
instructions
final BetaDream.Builder instructions(Optional<String> instructions)
Alias for calling Builder.instructions with
instructions.orElse(null).
-
instructions
final BetaDream.Builder instructions(JsonField<String> instructions)
Sets Builder.instructions to an arbitrary JSON value.
You should usually call Builder.instructions with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
model
final BetaDream.Builder model(BetaDreamModelConfig model)
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.
-
model
final BetaDream.Builder model(JsonField<BetaDreamModelConfig> model)
Sets Builder.model to an arbitrary JSON value.
You should usually call Builder.model with a well-typed BetaDreamModelConfig value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
outputBehavior
final BetaDream.Builder outputBehavior(BetaOutputBehavior outputBehavior)
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 thecreate_newbehavior.
-
outputBehavior
final BetaDream.Builder outputBehavior(JsonField<BetaOutputBehavior> outputBehavior)
Sets Builder.outputBehavior to an arbitrary JSON value.
You should usually call Builder.outputBehavior with a well-typed BetaOutputBehavior value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
outputBehavior
final BetaDream.Builder outputBehavior(BetaOutputBehaviorCreateNew createNew)
Alias for calling outputBehavior with
BetaOutputBehavior.ofCreateNew(createNew).
-
outputBehavior
final BetaDream.Builder outputBehavior(BetaOutputBehaviorUpdateExisting updateExisting)
Alias for calling outputBehavior with
BetaOutputBehavior.ofUpdateExisting(updateExisting).
-
outputs
final BetaDream.Builder outputs(List<BetaDreamOutput> outputs)
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
pendingand for a short time after it startsrunning. It can stay empty if the dream fails or is canceled before then. The memory store holds the complete result only oncestatusiscompleted.See the Dreams guide for how to review and use the result.
-
outputs
final BetaDream.Builder outputs(JsonField<List<BetaDreamOutput>> outputs)
Sets Builder.outputs to an arbitrary JSON value.
You should usually call Builder.outputs with a well-typed
List<BetaDreamOutput>value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
sessionId
final BetaDream.Builder sessionId(String sessionId)
The ID of the session that runs the dream (
sesn_...), ornullif 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.
-
sessionId
final BetaDream.Builder sessionId(Optional<String> sessionId)
Alias for calling Builder.sessionId with
sessionId.orElse(null).
-
sessionId
final BetaDream.Builder sessionId(JsonField<String> sessionId)
Sets Builder.sessionId to an arbitrary JSON value.
You should usually call Builder.sessionId with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
status
final BetaDream.Builder status(BetaDreamStatus status)
Where a dream is in its lifecycle.
completed,failed, andcanceledare final: once a dream has one of these statuses, its status doesn't change again.See the Dreams guide for what each status means.
-
status
final BetaDream.Builder status(JsonField<BetaDreamStatus> status)
Sets Builder.status to an arbitrary JSON value.
You should usually call Builder.status with a well-typed BetaDreamStatus value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
type
final BetaDream.Builder type(JsonValue type)
Sets the field to an arbitrary JSON value.
It is usually unnecessary to call this method because the field defaults to the following:
JsonValue.from("dream")This method is primarily for setting the field to an undocumented or not yet supported value.
-
usage
final BetaDream.Builder usage(BetaDreamUsage usage)
The dream's token counts, which stop changing once its
statusiscompletedorfailed. After a cancel, they can keep changing.
-
usage
final BetaDream.Builder usage(JsonField<BetaDreamUsage> usage)
Sets Builder.usage to an arbitrary JSON value.
You should usually call Builder.usage with a well-typed BetaDreamUsage value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final BetaDream.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
addInput
final BetaDream.Builder addInput(BetaDreamInput input)
Adds a single BetaDreamInput to inputs.
-
addInput
final BetaDream.Builder addInput(BetaDreamMemoryStoreInput memoryStore)
Alias for calling addInput with
BetaDreamInput.ofMemoryStore(memoryStore).
-
addInput
final BetaDream.Builder addInput(BetaDreamSessionsInput sessions)
Alias for calling addInput with
BetaDreamInput.ofSessions(sessions).
-
addMemoryStoreInput
final BetaDream.Builder addMemoryStoreInput(String memoryStoreId)
Alias for calling addInput with the following:
BetaDreamMemoryStoreInput.builder() .memoryStoreId(memoryStoreId) .build()
-
addSessionsInput
final BetaDream.Builder addSessionsInput(List<String> sessionIds)
Alias for calling addInput with the following:
BetaDreamSessionsInput.builder() .sessionIds(sessionIds) .build()
-
updateExistingOutputBehavior
final BetaDream.Builder updateExistingOutputBehavior(String memoryStoreId)
Alias for calling outputBehavior with the following:
BetaOutputBehaviorUpdateExisting.builder() .memoryStoreId(memoryStoreId) .build()
-
addOutput
final BetaDream.Builder addOutput(BetaDreamOutput output)
Adds a single BetaDreamOutput to outputs.
-
addMemoryStoreOutput
final BetaDream.Builder addMemoryStoreOutput(String memoryStoreId)
Alias for calling addOutput with the following:
BetaDreamOutput.builder() .memoryStoreId(memoryStoreId) .build()
-
putAdditionalProperty
final BetaDream.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final BetaDream.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final BetaDream.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final BetaDream.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final BetaDream build()
Returns an immutable instance of BetaDream.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.id() .archivedAt() .createdAt() .endedAt() .error() .inputs() .instructions() .model() .outputBehavior() .outputs() .sessionId() .status() .usage()
-
-
-
-