Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(api): tool use is GA and available on 3P #429

Merged
merged 1 commit into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 3
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/anthropic-11e9f674e1fe0eb85a713c2852de663254d4e9254dea701008dcd605a04987d5.yml
configured_endpoints: 2
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/anthropic-4f6df1026ffeed840bbfada906ac51144508d1e1b099084c593aa9bac97a3362.yml
32 changes: 5 additions & 27 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Types:
- <code><a href="./src/resources/messages.ts">ContentBlockStartEvent</a></code>
- <code><a href="./src/resources/messages.ts">ContentBlockStopEvent</a></code>
- <code><a href="./src/resources/messages.ts">ImageBlockParam</a></code>
- <code><a href="./src/resources/messages.ts">InputJsonDelta</a></code>
- <code><a href="./src/resources/messages.ts">Message</a></code>
- <code><a href="./src/resources/messages.ts">MessageDeltaEvent</a></code>
- <code><a href="./src/resources/messages.ts">MessageDeltaUsage</a></code>
Expand All @@ -24,35 +25,12 @@ Types:
- <code><a href="./src/resources/messages.ts">TextBlock</a></code>
- <code><a href="./src/resources/messages.ts">TextBlockParam</a></code>
- <code><a href="./src/resources/messages.ts">TextDelta</a></code>
- <code><a href="./src/resources/messages.ts">Tool</a></code>
- <code><a href="./src/resources/messages.ts">ToolResultBlockParam</a></code>
- <code><a href="./src/resources/messages.ts">ToolUseBlock</a></code>
- <code><a href="./src/resources/messages.ts">ToolUseBlockParam</a></code>
- <code><a href="./src/resources/messages.ts">Usage</a></code>

Methods:

- <code title="post /v1/messages">client.messages.<a href="./src/resources/messages.ts">create</a>({ ...params }) -> Message</code>

# Beta

## Tools

### Messages

Types:

- <code><a href="./src/resources/beta/tools/messages.ts">InputJsonDelta</a></code>
- <code><a href="./src/resources/beta/tools/messages.ts">RawToolsBetaContentBlockDeltaEvent</a></code>
- <code><a href="./src/resources/beta/tools/messages.ts">RawToolsBetaContentBlockStartEvent</a></code>
- <code><a href="./src/resources/beta/tools/messages.ts">RawToolsBetaMessageStreamEvent</a></code>
- <code><a href="./src/resources/beta/tools/messages.ts">Tool</a></code>
- <code><a href="./src/resources/beta/tools/messages.ts">ToolResultBlockParam</a></code>
- <code><a href="./src/resources/beta/tools/messages.ts">ToolUseBlock</a></code>
- <code><a href="./src/resources/beta/tools/messages.ts">ToolUseBlockParam</a></code>
- <code><a href="./src/resources/beta/tools/messages.ts">ToolsBetaContentBlock</a></code>
- <code><a href="./src/resources/beta/tools/messages.ts">ToolsBetaContentBlockDeltaEvent</a></code>
- <code><a href="./src/resources/beta/tools/messages.ts">ToolsBetaContentBlockStartEvent</a></code>
- <code><a href="./src/resources/beta/tools/messages.ts">ToolsBetaMessage</a></code>
- <code><a href="./src/resources/beta/tools/messages.ts">ToolsBetaMessageParam</a></code>
- <code><a href="./src/resources/beta/tools/messages.ts">ToolsBetaMessageStreamEvent</a></code>

Methods:

- <code title="post /v1/messages?beta=tools">client.beta.tools.messages.<a href="./src/resources/beta/tools/messages.ts">create</a>({ ...params }) -> ToolsBetaMessage</code>
8 changes: 5 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ export class Anthropic extends Core.APIClient {

completions: API.Completions = new API.Completions(this);
messages: API.Messages = new API.Messages(this);
beta: API.Beta = new API.Beta(this);

protected override defaultQuery(): Core.DefaultQuery | undefined {
return this._options.defaultQuery;
Expand Down Expand Up @@ -242,6 +241,7 @@ export namespace Anthropic {
export import ContentBlockStartEvent = API.ContentBlockStartEvent;
export import ContentBlockStopEvent = API.ContentBlockStopEvent;
export import ImageBlockParam = API.ImageBlockParam;
export import InputJsonDelta = API.InputJsonDelta;
export import Message = API.Message;
export import MessageDeltaEvent = API.MessageDeltaEvent;
export import MessageDeltaUsage = API.MessageDeltaUsage;
Expand All @@ -259,12 +259,14 @@ export namespace Anthropic {
export import TextBlock = API.TextBlock;
export import TextBlockParam = API.TextBlockParam;
export import TextDelta = API.TextDelta;
export import Tool = API.Tool;
export import ToolResultBlockParam = API.ToolResultBlockParam;
export import ToolUseBlock = API.ToolUseBlock;
export import ToolUseBlockParam = API.ToolUseBlockParam;
export import Usage = API.Usage;
export import MessageCreateParams = API.MessageCreateParams;
export import MessageCreateParamsNonStreaming = API.MessageCreateParamsNonStreaming;
export import MessageCreateParamsStreaming = API.MessageCreateParamsStreaming;

export import Beta = API.Beta;
}

export default Anthropic;
12 changes: 0 additions & 12 deletions src/resources/beta/beta.ts

This file was deleted.

4 changes: 0 additions & 4 deletions src/resources/beta/index.ts

This file was deleted.

23 changes: 0 additions & 23 deletions src/resources/beta/tools/index.ts

This file was deleted.

Loading