Skip to content

Commit

Permalink
docs: update some builder method javadocs (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Jan 9, 2025
1 parent 40210f9 commit 94a426b
Show file tree
Hide file tree
Showing 8 changed files with 196 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1626,8 +1626,22 @@ constructor(
*/
fun system(system: JsonField<System>) = apply { this.system = system }

/**
* System prompt.
*
* A system prompt is a way of providing context and instructions to Claude, such as
* specifying a particular goal or role. See our
* [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
*/
fun system(string: String) = system(System.ofString(string))

/**
* System prompt.
*
* A system prompt is a way of providing context and instructions to Claude, such as
* specifying a particular goal or role. See our
* [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
*/
fun systemOfBetaTextBlockParams(betaTextBlockParams: List<BetaTextBlockParam>) =
system(System.ofBetaTextBlockParams(betaTextBlockParams))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,27 +132,55 @@ private constructor(
*/
fun result(result: JsonField<BetaMessageBatchResult>) = apply { this.result = result }

/**
* Processing result for this request.
*
* Contains a Message output if processing was successful, an error response if processing
* failed, or the reason why processing was not attempted, such as cancellation or
* expiration.
*/
fun result(betaMessageBatchSucceededResult: BetaMessageBatchSucceededResult) =
result(
BetaMessageBatchResult.ofBetaMessageBatchSucceededResult(
betaMessageBatchSucceededResult
)
)

/**
* Processing result for this request.
*
* Contains a Message output if processing was successful, an error response if processing
* failed, or the reason why processing was not attempted, such as cancellation or
* expiration.
*/
fun result(betaMessageBatchErroredResult: BetaMessageBatchErroredResult) =
result(
BetaMessageBatchResult.ofBetaMessageBatchErroredResult(
betaMessageBatchErroredResult
)
)

/**
* Processing result for this request.
*
* Contains a Message output if processing was successful, an error response if processing
* failed, or the reason why processing was not attempted, such as cancellation or
* expiration.
*/
fun result(betaMessageBatchCanceledResult: BetaMessageBatchCanceledResult) =
result(
BetaMessageBatchResult.ofBetaMessageBatchCanceledResult(
betaMessageBatchCanceledResult
)
)

/**
* Processing result for this request.
*
* Contains a Message output if processing was successful, an error response if processing
* failed, or the reason why processing was not attempted, such as cancellation or
* expiration.
*/
fun result(betaMessageBatchExpiredResult: BetaMessageBatchExpiredResult) =
result(
BetaMessageBatchResult.ofBetaMessageBatchExpiredResult(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1204,8 +1204,22 @@ constructor(
*/
fun system(system: JsonField<System>) = apply { this.system = system }

/**
* System prompt.
*
* A system prompt is a way of providing context and instructions to Claude, such as
* specifying a particular goal or role. See our
* [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
*/
fun system(string: String) = system(System.ofString(string))

/**
* System prompt.
*
* A system prompt is a way of providing context and instructions to Claude, such as
* specifying a particular goal or role. See our
* [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
*/
fun systemOfBetaTextBlockParams(betaTextBlockParams: List<BetaTextBlockParam>) =
system(System.ofBetaTextBlockParams(betaTextBlockParams))

Expand Down Expand Up @@ -2179,8 +2193,22 @@ constructor(
*/
fun system(system: JsonField<System>) = apply { body.system(system) }

/**
* System prompt.
*
* A system prompt is a way of providing context and instructions to Claude, such as
* specifying a particular goal or role. See our
* [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
*/
fun system(string: String) = apply { body.system(string) }

/**
* System prompt.
*
* A system prompt is a way of providing context and instructions to Claude, such as
* specifying a particular goal or role. See our
* [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
*/
fun systemOfBetaTextBlockParams(betaTextBlockParams: List<BetaTextBlockParam>) = apply {
body.systemOfBetaTextBlockParams(betaTextBlockParams)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1563,8 +1563,22 @@ constructor(
*/
fun system(system: JsonField<System>) = apply { this.system = system }

/**
* System prompt.
*
* A system prompt is a way of providing context and instructions to Claude, such as
* specifying a particular goal or role. See our
* [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
*/
fun system(string: String) = system(System.ofString(string))

/**
* System prompt.
*
* A system prompt is a way of providing context and instructions to Claude, such as
* specifying a particular goal or role. See our
* [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
*/
fun systemOfBetaTextBlockParams(betaTextBlockParams: List<BetaTextBlockParam>) =
system(System.ofBetaTextBlockParams(betaTextBlockParams))

Expand Down Expand Up @@ -2681,8 +2695,22 @@ constructor(
*/
fun system(system: JsonField<System>) = apply { body.system(system) }

/**
* System prompt.
*
* A system prompt is a way of providing context and instructions to Claude, such as
* specifying a particular goal or role. See our
* [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
*/
fun system(string: String) = apply { body.system(string) }

/**
* System prompt.
*
* A system prompt is a way of providing context and instructions to Claude, such as
* specifying a particular goal or role. See our
* [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
*/
fun systemOfBetaTextBlockParams(betaTextBlockParams: List<BetaTextBlockParam>) = apply {
body.systemOfBetaTextBlockParams(betaTextBlockParams)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1595,8 +1595,22 @@ constructor(
*/
fun system(system: JsonField<System>) = apply { this.system = system }

/**
* System prompt.
*
* A system prompt is a way of providing context and instructions to Claude, such as
* specifying a particular goal or role. See our
* [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
*/
fun system(string: String) = system(System.ofString(string))

/**
* System prompt.
*
* A system prompt is a way of providing context and instructions to Claude, such as
* specifying a particular goal or role. See our
* [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
*/
fun systemOfTextBlockParams(textBlockParams: List<TextBlockParam>) =
system(System.ofTextBlockParams(textBlockParams))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,15 +129,43 @@ private constructor(
*/
fun result(result: JsonField<MessageBatchResult>) = apply { this.result = result }

/**
* Processing result for this request.
*
* Contains a Message output if processing was successful, an error response if processing
* failed, or the reason why processing was not attempted, such as cancellation or
* expiration.
*/
fun result(messageBatchSucceededResult: MessageBatchSucceededResult) =
result(MessageBatchResult.ofMessageBatchSucceededResult(messageBatchSucceededResult))

/**
* Processing result for this request.
*
* Contains a Message output if processing was successful, an error response if processing
* failed, or the reason why processing was not attempted, such as cancellation or
* expiration.
*/
fun result(messageBatchErroredResult: MessageBatchErroredResult) =
result(MessageBatchResult.ofMessageBatchErroredResult(messageBatchErroredResult))

/**
* Processing result for this request.
*
* Contains a Message output if processing was successful, an error response if processing
* failed, or the reason why processing was not attempted, such as cancellation or
* expiration.
*/
fun result(messageBatchCanceledResult: MessageBatchCanceledResult) =
result(MessageBatchResult.ofMessageBatchCanceledResult(messageBatchCanceledResult))

/**
* Processing result for this request.
*
* Contains a Message output if processing was successful, an error response if processing
* failed, or the reason why processing was not attempted, such as cancellation or
* expiration.
*/
fun result(messageBatchExpiredResult: MessageBatchExpiredResult) =
result(MessageBatchResult.ofMessageBatchExpiredResult(messageBatchExpiredResult))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1193,8 +1193,22 @@ constructor(
*/
fun system(system: JsonField<System>) = apply { this.system = system }

/**
* System prompt.
*
* A system prompt is a way of providing context and instructions to Claude, such as
* specifying a particular goal or role. See our
* [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
*/
fun system(string: String) = system(System.ofString(string))

/**
* System prompt.
*
* A system prompt is a way of providing context and instructions to Claude, such as
* specifying a particular goal or role. See our
* [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
*/
fun systemOfTextBlockParams(textBlockParams: List<TextBlockParam>) =
system(System.ofTextBlockParams(textBlockParams))

Expand Down Expand Up @@ -1879,8 +1893,22 @@ constructor(
*/
fun system(system: JsonField<System>) = apply { body.system(system) }

/**
* System prompt.
*
* A system prompt is a way of providing context and instructions to Claude, such as
* specifying a particular goal or role. See our
* [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
*/
fun system(string: String) = apply { body.system(string) }

/**
* System prompt.
*
* A system prompt is a way of providing context and instructions to Claude, such as
* specifying a particular goal or role. See our
* [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
*/
fun systemOfTextBlockParams(textBlockParams: List<TextBlockParam>) = apply {
body.systemOfTextBlockParams(textBlockParams)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1550,8 +1550,22 @@ constructor(
*/
fun system(system: JsonField<System>) = apply { this.system = system }

/**
* System prompt.
*
* A system prompt is a way of providing context and instructions to Claude, such as
* specifying a particular goal or role. See our
* [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
*/
fun system(string: String) = system(System.ofString(string))

/**
* System prompt.
*
* A system prompt is a way of providing context and instructions to Claude, such as
* specifying a particular goal or role. See our
* [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
*/
fun systemOfTextBlockParams(textBlockParams: List<TextBlockParam>) =
system(System.ofTextBlockParams(textBlockParams))

Expand Down Expand Up @@ -2379,8 +2393,22 @@ constructor(
*/
fun system(system: JsonField<System>) = apply { body.system(system) }

/**
* System prompt.
*
* A system prompt is a way of providing context and instructions to Claude, such as
* specifying a particular goal or role. See our
* [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
*/
fun system(string: String) = apply { body.system(string) }

/**
* System prompt.
*
* A system prompt is a way of providing context and instructions to Claude, such as
* specifying a particular goal or role. See our
* [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
*/
fun systemOfTextBlockParams(textBlockParams: List<TextBlockParam>) = apply {
body.systemOfTextBlockParams(textBlockParams)
}
Expand Down

0 comments on commit 94a426b

Please sign in to comment.