You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Sources/AnthropicSwiftSDK/Entity/Batch/BatchParameter.swift
+15Lines changed: 15 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -8,11 +8,21 @@
8
8
import FunctionCalling
9
9
10
10
publicstructBatchParameter{
11
+
/// Input messages.
11
12
publicletmessages:[Message]
13
+
/// The model that will complete your prompt.
14
+
///
15
+
/// See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.
12
16
publicletmodel:Model
17
+
/// System prompt.
18
+
///
19
+
/// A system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role.
13
20
publicletsystem:[SystemPrompt]
21
+
/// The maximum number of tokens to generate before stopping.
14
22
publicletmaxTokens:Int
23
+
/// An object describing metadata about the request.
15
24
publicletmetaData:MetaData?
25
+
/// Custom text sequences that will cause the model to stop generating.
16
26
publicletstopSequence:[String]?
17
27
/// Whether the response should be handles as streaming or not,
18
28
///
@@ -21,10 +31,15 @@ public struct BatchParameter {
21
31
/// - Note: Streaming is not supported for batch requests.
22
32
/// For more details, see https://docs.anthropic.com/en/docs/build-with-claude/message-batches#can-i-use-the-message-batches-api-with-other-api-features
23
33
publicletstream:Bool=false
34
+
/// Amount of randomness injected into the response.
24
35
publiclettemperature:Double?
36
+
/// Use nucleus sampling.
25
37
publiclettopP:Double?
38
+
/// Only sample from the top K options for each subsequent token.
26
39
publiclettopK:Int?
40
+
/// Definitions of tools that the model may use.
27
41
publiclettoolContainer:ToolContainer?
42
+
/// How the model should use the provided tools. The model can use a specific tool, any available tool, or decide by itself.
Copy file name to clipboardExpand all lines: Sources/AnthropicSwiftSDK/Entity/Batch/MessageBatch.swift
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,13 @@
6
6
//
7
7
8
8
publicstructMessageBatch{
9
+
/// Developer-provided ID created for each request in a Message Batch. Useful for matching results to requests, as results may be given out of request order.
10
+
///
11
+
/// Must be unique for each request within the Message Batch.
9
12
publicletcustomId:String
13
+
/// Messages API creation parameters for the individual request.
14
+
///
15
+
/// See the [Messages API](https://docs.anthropic.com/en/api/messages) reference for full documentation on available parameters.
Copy file name to clipboardExpand all lines: Sources/AnthropicSwiftSDK/Network/Request/CancelMessageBatchRequest.swift
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -5,12 +5,17 @@
5
5
// Created by 伊藤史 on 2024/10/16.
6
6
//
7
7
8
+
/// Batches may be canceled any time before processing ends.
9
+
///
10
+
/// Once cancellation is initiated, the batch enters a canceling state, at which time the system may complete any in-progress, non-interruptible requests before finalizing cancellation.
11
+
/// The number of canceled requests is specified in request_counts. To determine which requests were canceled, check the individual results within the batch. Note that cancellation may not result in any canceled requests if they were non-interruptible.
/// Developer-provided ID created for each request in a Message Batch. Useful for matching results to requests, as results may be given out of request order.
0 commit comments