| 1 |
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. |
| 2 |
|
| 3 |
package anthropic_testscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go_test`/ |
| 4 |
|
| 5 |
import ( |
| 6 |
"contextscip-go gomod github.com/golang/go/src go1.23.0 context/" |
| 7 |
"errorsscip-go gomod github.com/golang/go/src go1.23.0 errors/" |
| 8 |
"osscip-go gomod github.com/golang/go/src go1.23.0 os/" |
| 9 |
"testingscip-go gomod github.com/golang/go/src go1.23.0 testing/" |
| 10 |
|
| 11 |
"github.com/anthropics/anthropic-sdk-goscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/" |
| 12 |
"github.com/anthropics/anthropic-sdk-go/internal/testutilscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go/internal/testutil`/" |
| 13 |
"github.com/anthropics/anthropic-sdk-go/optionscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go/option`/" |
| 14 |
) |
| 15 |
|
| 16 |
func TestBetaMessageBatchNewWithOptionalParamsscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go_test`/TestBetaMessageBatchNewWithOptionalParams().(t *testingscip-go gomod github.com/golang/go/src go1.23.0 testing/.Tscip-go gomod github.com/golang/go/src go1.23.0 testing/T#) { |
| •17 |
t.Skipscip-go gomod github.com/golang/go/src go1.23.0 testing/common#Skip().("This test needs a mock server (Steady from NPM)") |
| 18 |
baseURL := "http://localhost:4010" |
| 19 |
if envURL, ok := osscip-go gomod github.com/golang/go/src go1.23.0 os/.LookupEnvscip-go gomod github.com/golang/go/src go1.23.0 os/LookupEnv().("TEST_API_BASE_URL"); ok { |
| 20 |
baseURL = envURL |
| 21 |
} |
| 22 |
if !testutilscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go/internal/testutil`/.CheckTestServerscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go/internal/testutil`/CheckTestServer().(t, baseURL) { |
| 23 |
return |
| 24 |
} |
| 25 |
client := anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.NewClientscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/NewClient().( |
| 26 |
optionscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go/option`/.WithBaseURLscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go/option`/WithBaseURL().(baseURL), |
| 27 |
optionscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go/option`/.WithAPIKeyscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go/option`/WithAPIKey().("my-anthropic-api-key"), |
| 28 |
) |
| 29 |
_, err := client.Betascip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/Client#Beta..Messagesscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaService#Messages..Batchesscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageService#Batches..Newscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageBatchService#New().(contextscip-go gomod github.com/golang/go/src go1.23.0 context/.TODOscip-go gomod github.com/golang/go/src go1.23.0 context/TODO().(), anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.BetaMessageBatchNewParamsscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageBatchNewParams#{ |
| 30 |
Requestsscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageBatchNewParams#Requests.: []anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.BetaMessageBatchNewParamsRequestscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageBatchNewParamsRequest#{{ |
| 31 |
CustomIDscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageBatchNewParamsRequest#CustomID.: "my-custom-id-1", |
| 32 |
Paramsscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageBatchNewParamsRequest#Params.: anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.BetaMessageBatchNewParamsRequestParamsscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageBatchNewParamsRequestParams#{ |
| 33 |
MaxTokensscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageBatchNewParamsRequestParams#MaxTokens.: 1024, |
| 34 |
Messagesscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageBatchNewParamsRequestParams#Messages.: []anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.BetaMessageParamscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageParam#{{ |
| 35 |
Contentscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageParam#Content.: []anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.BetaContentBlockParamUnionscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaContentBlockParamUnion#{{ |
| 36 |
OfTextscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaContentBlockParamUnion#OfText.: &anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.BetaTextBlockParamscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaTextBlockParam#{ |
| 37 |
Textscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaTextBlockParam#Text.: "x", |
| 38 |
CacheControlscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaTextBlockParam#CacheControl.: anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.BetaCacheControlEphemeralParamscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaCacheControlEphemeralParam#{ |
| 39 |
TTLscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaCacheControlEphemeralParam#TTL.: anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.BetaCacheControlEphemeralTTLTTL5mscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaCacheControlEphemeralTTLTTL5m., |
| 40 |
}, |
| 41 |
Citationsscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaTextBlockParam#Citations.: []anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.BetaTextCitationParamUnionscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaTextCitationParamUnion#{{ |
| 42 |
OfCharLocationscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaTextCitationParamUnion#OfCharLocation.: &anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.BetaCitationCharLocationParamscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaCitationCharLocationParam#{ |
| 43 |
CitedTextscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaCitationCharLocationParam#CitedText.: "cited_text", |
| 44 |
DocumentIndexscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaCitationCharLocationParam#DocumentIndex.: 0, |
| 45 |
DocumentTitlescip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaCitationCharLocationParam#DocumentTitle.: anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.Stringscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/String().("x"), |
| 46 |
EndCharIndexscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaCitationCharLocationParam#EndCharIndex.: 0, |
| 47 |
StartCharIndexscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaCitationCharLocationParam#StartCharIndex.: 0, |
| 48 |
}, |
| 49 |
}}, |
| 50 |
}, |
| 51 |
}}, |
| 52 |
Rolescip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageParam#Role.: anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.BetaMessageParamRoleUserscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageParamRoleUser., |
| 53 |
}}, |
| 54 |
Modelscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageBatchNewParamsRequestParams#Model.: anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.ModelClaudeOpus4_6scip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/ModelClaudeOpus4_6., |
| 55 |
CacheControlscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageBatchNewParamsRequestParams#CacheControl.: anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.BetaCacheControlEphemeralParamscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaCacheControlEphemeralParam#{ |
| 56 |
TTLscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaCacheControlEphemeralParam#TTL.: anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.BetaCacheControlEphemeralTTLTTL5mscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaCacheControlEphemeralTTLTTL5m., |
| 57 |
}, |
| 58 |
Containerscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageBatchNewParamsRequestParams#Container.: anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.BetaMessageBatchNewParamsRequestParamsContainerUnionscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageBatchNewParamsRequestParamsContainerUnion#{ |
| 59 |
OfContainersscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageBatchNewParamsRequestParamsContainerUnion#OfContainers.: &anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.BetaContainerParamsscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaContainerParams#{ |
| 60 |
IDscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaContainerParams#ID.: anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.Stringscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/String().("id"), |
| 61 |
Skillsscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaContainerParams#Skills.: []anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.BetaSkillParamsscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaSkillParams#{{ |
| 62 |
SkillIDscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaSkillParams#SkillID.: "pdf", |
| 63 |
Typescip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaSkillParams#Type.: anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.BetaSkillParamsTypeAnthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaSkillParamsTypeAnthropic., |
| 64 |
Versionscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaSkillParams#Version.: anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.Stringscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/String().("latest"), |
| 65 |
}}, |
| 66 |
}, |
| 67 |
}, |
| 68 |
ContextManagementscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageBatchNewParamsRequestParams#ContextManagement.: anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.BetaContextManagementConfigParamscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaContextManagementConfigParam#{ |
| 69 |
Editsscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaContextManagementConfigParam#Edits.: []anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.BetaContextManagementConfigEditUnionParamscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaContextManagementConfigEditUnionParam#{{ |
| 70 |
OfClearToolUses20250919scip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaContextManagementConfigEditUnionParam#OfClearToolUses20250919.: &anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.BetaClearToolUses20250919EditParamscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaClearToolUses20250919EditParam#{ |
| 71 |
ClearAtLeastscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaClearToolUses20250919EditParam#ClearAtLeast.: anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.BetaInputTokensClearAtLeastParamscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaInputTokensClearAtLeastParam#{ |
| 72 |
Valuescip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaInputTokensClearAtLeastParam#Value.: 0, |
| 73 |
}, |
| 74 |
ClearToolInputsscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaClearToolUses20250919EditParam#ClearToolInputs.: anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.BetaClearToolUses20250919EditClearToolInputsUnionParamscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaClearToolUses20250919EditClearToolInputsUnionParam#{ |
| 75 |
OfBoolscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaClearToolUses20250919EditClearToolInputsUnionParam#OfBool.: anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.Boolscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/Bool().(true), |
| 76 |
}, |
| 77 |
ExcludeToolsscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaClearToolUses20250919EditParam#ExcludeTools.: []string{"string"}, |
| 78 |
Keepscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaClearToolUses20250919EditParam#Keep.: anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.BetaToolUsesKeepParamscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaToolUsesKeepParam#{ |
| 79 |
Valuescip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaToolUsesKeepParam#Value.: 0, |
| 80 |
}, |
| 81 |
Triggerscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaClearToolUses20250919EditParam#Trigger.: anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.BetaClearToolUses20250919EditTriggerUnionParamscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaClearToolUses20250919EditTriggerUnionParam#{ |
| 82 |
OfInputTokensscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaClearToolUses20250919EditTriggerUnionParam#OfInputTokens.: &anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.BetaInputTokensTriggerParamscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaInputTokensTriggerParam#{ |
| 83 |
Valuescip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaInputTokensTriggerParam#Value.: 1, |
| 84 |
}, |
| 85 |
}, |
| 86 |
}, |
| 87 |
}}, |
| 88 |
}, |
| 89 |
InferenceGeoscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageBatchNewParamsRequestParams#InferenceGeo.: anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.Stringscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/String().("inference_geo"), |
| 90 |
MCPServersscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageBatchNewParamsRequestParams#MCPServers.: []anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.BetaRequestMCPServerURLDefinitionParamscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaRequestMCPServerURLDefinitionParam#{{ |
| 91 |
Namescip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaRequestMCPServerURLDefinitionParam#Name.: "name", |
| 92 |
URLscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaRequestMCPServerURLDefinitionParam#URL.: "url", |
| 93 |
AuthorizationTokenscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaRequestMCPServerURLDefinitionParam#AuthorizationToken.: anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.Stringscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/String().("authorization_token"), |
| 94 |
ToolConfigurationscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaRequestMCPServerURLDefinitionParam#ToolConfiguration.: anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.BetaRequestMCPServerToolConfigurationParamscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaRequestMCPServerToolConfigurationParam#{ |
| 95 |
AllowedToolsscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaRequestMCPServerToolConfigurationParam#AllowedTools.: []string{"string"}, |
| 96 |
Enabledscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaRequestMCPServerToolConfigurationParam#Enabled.: anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.Boolscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/Bool().(true), |
| 97 |
}, |
| 98 |
}}, |
| 99 |
Metadatascip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageBatchNewParamsRequestParams#Metadata.: anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.BetaMetadataParamscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMetadataParam#{ |
| 100 |
UserIDscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMetadataParam#UserID.: anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.Stringscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/String().("13803d75-b4b5-4c3e-b2a2-6f21399b021b"), |
| 101 |
}, |
| 102 |
OutputConfigscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageBatchNewParamsRequestParams#OutputConfig.: anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.BetaOutputConfigParamscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaOutputConfigParam#{ |
| 103 |
Effortscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaOutputConfigParam#Effort.: anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.BetaOutputConfigEffortLowscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaOutputConfigEffortLow., |
| 104 |
Formatscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaOutputConfigParam#Format.: anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.BetaJSONOutputFormatParamscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaJSONOutputFormatParam#{ |
| 105 |
Schemascip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaJSONOutputFormatParam#Schema.: map[string]any{ |
| 106 |
"foo": "bar", |
| 107 |
}, |
| 108 |
}, |
| 109 |
}, |
| 110 |
OutputFormatscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageBatchNewParamsRequestParams#OutputFormat.: anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.BetaJSONOutputFormatParamscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaJSONOutputFormatParam#{ |
| 111 |
Schemascip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaJSONOutputFormatParam#Schema.: map[string]any{ |
| 112 |
"foo": "bar", |
| 113 |
}, |
| 114 |
}, |
| 115 |
ServiceTierscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageBatchNewParamsRequestParams#ServiceTier.: "auto", |
| 116 |
Speedscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageBatchNewParamsRequestParams#Speed.: "standard", |
| 117 |
StopSequencesscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageBatchNewParamsRequestParams#StopSequences.: []string{"string"}, |
| 118 |
Streamscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageBatchNewParamsRequestParams#Stream.: anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.Boolscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/Bool().(true), |
| 119 |
Systemscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageBatchNewParamsRequestParams#System.: []anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.BetaTextBlockParamscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaTextBlockParam#{{ |
| 120 |
Textscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaTextBlockParam#Text.: "Today's date is 2024-06-01.", |
| 121 |
CacheControlscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaTextBlockParam#CacheControl.: anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.BetaCacheControlEphemeralParamscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaCacheControlEphemeralParam#{ |
| 122 |
TTLscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaCacheControlEphemeralParam#TTL.: anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.BetaCacheControlEphemeralTTLTTL5mscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaCacheControlEphemeralTTLTTL5m., |
| 123 |
}, |
| 124 |
Citationsscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaTextBlockParam#Citations.: []anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.BetaTextCitationParamUnionscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaTextCitationParamUnion#{{ |
| 125 |
OfCharLocationscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaTextCitationParamUnion#OfCharLocation.: &anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.BetaCitationCharLocationParamscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaCitationCharLocationParam#{ |
| 126 |
CitedTextscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaCitationCharLocationParam#CitedText.: "cited_text", |
| 127 |
DocumentIndexscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaCitationCharLocationParam#DocumentIndex.: 0, |
| 128 |
DocumentTitlescip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaCitationCharLocationParam#DocumentTitle.: anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.Stringscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/String().("x"), |
| 129 |
EndCharIndexscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaCitationCharLocationParam#EndCharIndex.: 0, |
| 130 |
StartCharIndexscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaCitationCharLocationParam#StartCharIndex.: 0, |
| 131 |
}, |
| 132 |
}}, |
| 133 |
}}, |
| 134 |
Temperaturescip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageBatchNewParamsRequestParams#Temperature.: anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.Floatscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/Float().(1), |
| 135 |
Thinkingscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageBatchNewParamsRequestParams#Thinking.: anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.BetaThinkingConfigParamUnionscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaThinkingConfigParamUnion#{ |
| 136 |
OfAdaptivescip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaThinkingConfigParamUnion#OfAdaptive.: &anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.BetaThinkingConfigAdaptiveParamscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaThinkingConfigAdaptiveParam#{ |
| 137 |
Displayscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaThinkingConfigAdaptiveParam#Display.: anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.BetaThinkingConfigAdaptiveDisplaySummarizedscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaThinkingConfigAdaptiveDisplaySummarized., |
| 138 |
}, |
| 139 |
}, |
| 140 |
ToolChoicescip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageBatchNewParamsRequestParams#ToolChoice.: anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.BetaToolChoiceUnionParamscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaToolChoiceUnionParam#{ |
| 141 |
OfAutoscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaToolChoiceUnionParam#OfAuto.: &anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.BetaToolChoiceAutoParamscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaToolChoiceAutoParam#{ |
| 142 |
DisableParallelToolUsescip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaToolChoiceAutoParam#DisableParallelToolUse.: anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.Boolscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/Bool().(true), |
| 143 |
}, |
| 144 |
}, |
| 145 |
Toolsscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageBatchNewParamsRequestParams#Tools.: []anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.BetaToolUnionParamscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaToolUnionParam#{{ |
| 146 |
OfToolscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaToolUnionParam#OfTool.: &anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.BetaToolParamscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaToolParam#{ |
| 147 |
InputSchemascip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaToolParam#InputSchema.: anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.BetaToolInputSchemaParamscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaToolInputSchemaParam#{ |
| 148 |
Propertiesscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaToolInputSchemaParam#Properties.: map[string]any{ |
| 149 |
"location": "bar", |
| 150 |
"unit": "bar", |
| 151 |
}, |
| 152 |
Requiredscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaToolInputSchemaParam#Required.: []string{"location"}, |
| 153 |
}, |
| 154 |
Namescip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaToolParam#Name.: "name", |
| 155 |
AllowedCallersscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaToolParam#AllowedCallers.: []string{"direct"}, |
| 156 |
CacheControlscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaToolParam#CacheControl.: anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.BetaCacheControlEphemeralParamscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaCacheControlEphemeralParam#{ |
| 157 |
TTLscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaCacheControlEphemeralParam#TTL.: anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.BetaCacheControlEphemeralTTLTTL5mscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaCacheControlEphemeralTTLTTL5m., |
| 158 |
}, |
| 159 |
DeferLoadingscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaToolParam#DeferLoading.: anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.Boolscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/Bool().(true), |
| 160 |
Descriptionscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaToolParam#Description.: anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.Stringscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/String().("Get the current weather in a given location"), |
| 161 |
EagerInputStreamingscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaToolParam#EagerInputStreaming.: anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.Boolscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/Bool().(true), |
| 162 |
InputExamplesscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaToolParam#InputExamples.: []map[string]any{{ |
| 163 |
"foo": "bar", |
| 164 |
}}, |
| 165 |
Strictscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaToolParam#Strict.: anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.Boolscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/Bool().(true), |
| 166 |
Typescip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaToolParam#Type.: anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.BetaToolTypeCustomscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaToolTypeCustom., |
| 167 |
}, |
| 168 |
}}, |
| 169 |
TopKscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageBatchNewParamsRequestParams#TopK.: anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.Intscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/Int().(5), |
| 170 |
TopPscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageBatchNewParamsRequestParams#TopP.: anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.Floatscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/Float().(0.7), |
| 171 |
}, |
| 172 |
}}, |
| 173 |
Betasscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageBatchNewParams#Betas.: []anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.AnthropicBetascip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/AnthropicBeta#{anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.AnthropicBetaMessageBatches2024_09_24scip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/AnthropicBetaMessageBatches2024_09_24.}, |
| 174 |
}) |
| 175 |
if err != nil { |
| 176 |
var apierr *anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.Errorscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/Error# |
| 177 |
if errorsscip-go gomod github.com/golang/go/src go1.23.0 errors/.Asscip-go gomod github.com/golang/go/src go1.23.0 errors/As().(err, &apierr) { |
| 178 |
t.Logscip-go gomod github.com/golang/go/src go1.23.0 testing/common#Log().(string(apierr.DumpRequestscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go/internal/apierror`/Error#DumpRequest().(true))) |
| 179 |
} |
| 180 |
t.Fatalfscip-go gomod github.com/golang/go/src go1.23.0 testing/common#Fatalf().("err should be nil: %s", err.Error()) |
| 181 |
} |
| 182 |
} |
| 183 |
|
| 184 |
func TestBetaMessageBatchGetWithOptionalParamsscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go_test`/TestBetaMessageBatchGetWithOptionalParams().(t *testingscip-go gomod github.com/golang/go/src go1.23.0 testing/.Tscip-go gomod github.com/golang/go/src go1.23.0 testing/T#) { |
| •185 |
t.Skipscip-go gomod github.com/golang/go/src go1.23.0 testing/common#Skip().("This test needs a mock server (Steady from NPM)") |
| 186 |
baseURL := "http://localhost:4010" |
| 187 |
if envURL, ok := osscip-go gomod github.com/golang/go/src go1.23.0 os/.LookupEnvscip-go gomod github.com/golang/go/src go1.23.0 os/LookupEnv().("TEST_API_BASE_URL"); ok { |
| 188 |
baseURL = envURL |
| 189 |
} |
| 190 |
if !testutilscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go/internal/testutil`/.CheckTestServerscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go/internal/testutil`/CheckTestServer().(t, baseURL) { |
| 191 |
return |
| 192 |
} |
| 193 |
client := anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.NewClientscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/NewClient().( |
| 194 |
optionscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go/option`/.WithBaseURLscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go/option`/WithBaseURL().(baseURL), |
| 195 |
optionscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go/option`/.WithAPIKeyscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go/option`/WithAPIKey().("my-anthropic-api-key"), |
| 196 |
) |
| 197 |
_, err := client.Betascip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/Client#Beta..Messagesscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaService#Messages..Batchesscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageService#Batches..Getscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageBatchService#Get().( |
| 198 |
contextscip-go gomod github.com/golang/go/src go1.23.0 context/.TODOscip-go gomod github.com/golang/go/src go1.23.0 context/TODO().(), |
| 199 |
"message_batch_id", |
| 200 |
anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.BetaMessageBatchGetParamsscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageBatchGetParams#{ |
| 201 |
Betasscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageBatchGetParams#Betas.: []anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.AnthropicBetascip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/AnthropicBeta#{anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.AnthropicBetaMessageBatches2024_09_24scip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/AnthropicBetaMessageBatches2024_09_24.}, |
| 202 |
}, |
| 203 |
) |
| 204 |
if err != nil { |
| 205 |
var apierr *anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.Errorscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/Error# |
| 206 |
if errorsscip-go gomod github.com/golang/go/src go1.23.0 errors/.Asscip-go gomod github.com/golang/go/src go1.23.0 errors/As().(err, &apierr) { |
| 207 |
t.Logscip-go gomod github.com/golang/go/src go1.23.0 testing/common#Log().(string(apierr.DumpRequestscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go/internal/apierror`/Error#DumpRequest().(true))) |
| 208 |
} |
| 209 |
t.Fatalfscip-go gomod github.com/golang/go/src go1.23.0 testing/common#Fatalf().("err should be nil: %s", err.Error()) |
| 210 |
} |
| 211 |
} |
| 212 |
|
| 213 |
func TestBetaMessageBatchListWithOptionalParamsscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go_test`/TestBetaMessageBatchListWithOptionalParams().(t *testingscip-go gomod github.com/golang/go/src go1.23.0 testing/.Tscip-go gomod github.com/golang/go/src go1.23.0 testing/T#) { |
| •214 |
t.Skipscip-go gomod github.com/golang/go/src go1.23.0 testing/common#Skip().("This test needs a mock server (Steady from NPM)") |
| 215 |
baseURL := "http://localhost:4010" |
| 216 |
if envURL, ok := osscip-go gomod github.com/golang/go/src go1.23.0 os/.LookupEnvscip-go gomod github.com/golang/go/src go1.23.0 os/LookupEnv().("TEST_API_BASE_URL"); ok { |
| 217 |
baseURL = envURL |
| 218 |
} |
| 219 |
if !testutilscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go/internal/testutil`/.CheckTestServerscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go/internal/testutil`/CheckTestServer().(t, baseURL) { |
| 220 |
return |
| 221 |
} |
| 222 |
client := anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.NewClientscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/NewClient().( |
| 223 |
optionscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go/option`/.WithBaseURLscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go/option`/WithBaseURL().(baseURL), |
| 224 |
optionscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go/option`/.WithAPIKeyscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go/option`/WithAPIKey().("my-anthropic-api-key"), |
| 225 |
) |
| 226 |
_, err := client.Betascip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/Client#Beta..Messagesscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaService#Messages..Batchesscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageService#Batches..Listscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageBatchService#List().(contextscip-go gomod github.com/golang/go/src go1.23.0 context/.TODOscip-go gomod github.com/golang/go/src go1.23.0 context/TODO().(), anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.BetaMessageBatchListParamsscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageBatchListParams#{ |
| 227 |
AfterIDscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageBatchListParams#AfterID.: anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.Stringscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/String().("after_id"), |
| 228 |
BeforeIDscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageBatchListParams#BeforeID.: anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.Stringscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/String().("before_id"), |
| 229 |
Limitscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageBatchListParams#Limit.: anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.Intscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/Int().(1), |
| 230 |
Betasscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageBatchListParams#Betas.: []anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.AnthropicBetascip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/AnthropicBeta#{anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.AnthropicBetaMessageBatches2024_09_24scip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/AnthropicBetaMessageBatches2024_09_24.}, |
| 231 |
}) |
| 232 |
if err != nil { |
| 233 |
var apierr *anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.Errorscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/Error# |
| 234 |
if errorsscip-go gomod github.com/golang/go/src go1.23.0 errors/.Asscip-go gomod github.com/golang/go/src go1.23.0 errors/As().(err, &apierr) { |
| 235 |
t.Logscip-go gomod github.com/golang/go/src go1.23.0 testing/common#Log().(string(apierr.DumpRequestscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go/internal/apierror`/Error#DumpRequest().(true))) |
| 236 |
} |
| 237 |
t.Fatalfscip-go gomod github.com/golang/go/src go1.23.0 testing/common#Fatalf().("err should be nil: %s", err.Error()) |
| 238 |
} |
| 239 |
} |
| 240 |
|
| 241 |
func TestBetaMessageBatchDeleteWithOptionalParamsscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go_test`/TestBetaMessageBatchDeleteWithOptionalParams().(t *testingscip-go gomod github.com/golang/go/src go1.23.0 testing/.Tscip-go gomod github.com/golang/go/src go1.23.0 testing/T#) { |
| •242 |
t.Skipscip-go gomod github.com/golang/go/src go1.23.0 testing/common#Skip().("This test needs a mock server (Steady from NPM)") |
| 243 |
baseURL := "http://localhost:4010" |
| 244 |
if envURL, ok := osscip-go gomod github.com/golang/go/src go1.23.0 os/.LookupEnvscip-go gomod github.com/golang/go/src go1.23.0 os/LookupEnv().("TEST_API_BASE_URL"); ok { |
| 245 |
baseURL = envURL |
| 246 |
} |
| 247 |
if !testutilscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go/internal/testutil`/.CheckTestServerscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go/internal/testutil`/CheckTestServer().(t, baseURL) { |
| 248 |
return |
| 249 |
} |
| 250 |
client := anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.NewClientscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/NewClient().( |
| 251 |
optionscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go/option`/.WithBaseURLscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go/option`/WithBaseURL().(baseURL), |
| 252 |
optionscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go/option`/.WithAPIKeyscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go/option`/WithAPIKey().("my-anthropic-api-key"), |
| 253 |
) |
| 254 |
_, err := client.Betascip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/Client#Beta..Messagesscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaService#Messages..Batchesscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageService#Batches..Deletescip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageBatchService#Delete().( |
| 255 |
contextscip-go gomod github.com/golang/go/src go1.23.0 context/.TODOscip-go gomod github.com/golang/go/src go1.23.0 context/TODO().(), |
| 256 |
"message_batch_id", |
| 257 |
anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.BetaMessageBatchDeleteParamsscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageBatchDeleteParams#{ |
| 258 |
Betasscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageBatchDeleteParams#Betas.: []anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.AnthropicBetascip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/AnthropicBeta#{anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.AnthropicBetaMessageBatches2024_09_24scip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/AnthropicBetaMessageBatches2024_09_24.}, |
| 259 |
}, |
| 260 |
) |
| 261 |
if err != nil { |
| 262 |
var apierr *anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.Errorscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/Error# |
| 263 |
if errorsscip-go gomod github.com/golang/go/src go1.23.0 errors/.Asscip-go gomod github.com/golang/go/src go1.23.0 errors/As().(err, &apierr) { |
| 264 |
t.Logscip-go gomod github.com/golang/go/src go1.23.0 testing/common#Log().(string(apierr.DumpRequestscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go/internal/apierror`/Error#DumpRequest().(true))) |
| 265 |
} |
| 266 |
t.Fatalfscip-go gomod github.com/golang/go/src go1.23.0 testing/common#Fatalf().("err should be nil: %s", err.Error()) |
| 267 |
} |
| 268 |
} |
| 269 |
|
| 270 |
func TestBetaMessageBatchCancelWithOptionalParamsscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go_test`/TestBetaMessageBatchCancelWithOptionalParams().(t *testingscip-go gomod github.com/golang/go/src go1.23.0 testing/.Tscip-go gomod github.com/golang/go/src go1.23.0 testing/T#) { |
| •271 |
t.Skipscip-go gomod github.com/golang/go/src go1.23.0 testing/common#Skip().("This test needs a mock server (Steady from NPM)") |
| 272 |
baseURL := "http://localhost:4010" |
| 273 |
if envURL, ok := osscip-go gomod github.com/golang/go/src go1.23.0 os/.LookupEnvscip-go gomod github.com/golang/go/src go1.23.0 os/LookupEnv().("TEST_API_BASE_URL"); ok { |
| 274 |
baseURL = envURL |
| 275 |
} |
| 276 |
if !testutilscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go/internal/testutil`/.CheckTestServerscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go/internal/testutil`/CheckTestServer().(t, baseURL) { |
| 277 |
return |
| 278 |
} |
| 279 |
client := anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.NewClientscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/NewClient().( |
| 280 |
optionscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go/option`/.WithBaseURLscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go/option`/WithBaseURL().(baseURL), |
| 281 |
optionscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go/option`/.WithAPIKeyscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go/option`/WithAPIKey().("my-anthropic-api-key"), |
| 282 |
) |
| 283 |
_, err := client.Betascip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/Client#Beta..Messagesscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaService#Messages..Batchesscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageService#Batches..Cancelscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageBatchService#Cancel().( |
| 284 |
contextscip-go gomod github.com/golang/go/src go1.23.0 context/.TODOscip-go gomod github.com/golang/go/src go1.23.0 context/TODO().(), |
| 285 |
"message_batch_id", |
| 286 |
anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.BetaMessageBatchCancelParamsscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageBatchCancelParams#{ |
| 287 |
Betasscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/BetaMessageBatchCancelParams#Betas.: []anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.AnthropicBetascip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/AnthropicBeta#{anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.AnthropicBetaMessageBatches2024_09_24scip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/AnthropicBetaMessageBatches2024_09_24.}, |
| 288 |
}, |
| 289 |
) |
| 290 |
if err != nil { |
| 291 |
var apierr *anthropicscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/.Errorscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go`/Error# |
| 292 |
if errorsscip-go gomod github.com/golang/go/src go1.23.0 errors/.Asscip-go gomod github.com/golang/go/src go1.23.0 errors/As().(err, &apierr) { |
| 293 |
t.Logscip-go gomod github.com/golang/go/src go1.23.0 testing/common#Log().(string(apierr.DumpRequestscip-go gomod github.com/anthropics/anthropic-sdk-go . `github.com/anthropics/anthropic-sdk-go/internal/apierror`/Error#DumpRequest().(true))) |
| 294 |
} |
| 295 |
t.Fatalfscip-go gomod github.com/golang/go/src go1.23.0 testing/common#Fatalf().("err should be nil: %s", err.Error()) |
| 296 |
} |
| 297 |
} |