Skip to content

Releases: madebywelch/anthropic-go

v2.1.2

24 Dec 18:32
4f967e7
Compare
Choose a tag to compare

What's Changed

Full Changelog: v2.1.1...v2.1.2

v2.1.1

23 Nov 16:27
fe17df3
Compare
Choose a tag to compare

What's Changed

Full Changelog: v2.1.0...v2.1.1

v2.1.0

22 Nov 20:59
ab255ba
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.0.1...v2.1.0

v2.0.0

24 Oct 21:11
Compare
Choose a tag to compare

Full Changelog: v1.0.1...v2.0.0

Changelog v2.0.0

Highlights:

  • Introducing Functional Options: A major shift to enhance the developer experience. Functional options simplify and make it more intuitive to send completion requests.
  • New Utilities: Added utilities to streamline creating prompts, understanding supported regions, and managing IP allowlists.
  • Integration Tests: Incorporated integration tests for the Complete method.

Details:

Functional Options:

  • Adopted functional options to construct a completion request, providing a more flexible and idiomatic way to specify various parameters.
  • Replaced the previous method of direct struct population with functional options, ensuring backward compatibility.

Utilities:

Prompts:

  • GetPrompt(userQuestion string): Easily construct a valid Anthropic prompt with this utility function.
  • GetChatPrompt(chat []Message): Construct a series of back-and-forths for the Anthropic API.

Regions:

  • New SupportedRegions array to quickly determine if a region is supported.

IP Allowlists:

  • Added utility functions to handle Anthropic's provided IP ranges.

Completion Requests:

Regular Completion Request:

  • Simpler and cleaner approach to send completion requests without streaming.
  • See example in the repository for detailed usage.

Streaming Completion Request:

  • Added streaming capabilities for the completion requests.
  • Enables real-time, chunked responses from the Anthropic API.
  • Enhanced the developer experience by making it more intuitive to decide between streaming and non-streaming requests.