🌐
GitHub
github.com › 3JoB › anthropic-sdk-go
GitHub - 3JoB/anthropic-sdk-go: (Need to be maintained) Golang SDK for AnthRopic Claude AI. Provide complete encapsulated interfaces that are easy to quickly get started with.
(Need to be maintained) Golang SDK for AnthRopic Claude AI. Provide complete encapsulated interfaces that are easy to quickly get started with. - 3JoB/anthropic-sdk-go
Starred by 38 users
Forked by 6 users
Languages   Go
🌐
Go Packages
pkg.go.dev › github.com › 3JoB › anthropic-sdk-go
anthropic package - github.com/3JoB/anthropic-sdk-go - Go Packages
package main import ( "fmt" "github.com/3JoB/anthropic-sdk-go" "github.com/3JoB/anthropic-sdk-go/data" ) func main() { c, err := anthropic.New("api keys","modules") if err != nil { panic(err) } d, err := c.Send(&anthropic.Opts{ Message: data.MessageModule{ Human: "Do you know Golang, please answer me in the shortest possible way.", }, Sender: anthropic.Sender{MaxToken: 1200}, }) if err != nil { panic(err) } fmt.Println(d.Response.String()) ds, err := c.Send(&anthropic.Opts{ Message: data.MessageModule{ Human: "What is its current version number?", }, ContextID: d.ID, Sender: anthropic.Sender{MaxToken: 1200}, }) if err != nil { panic(err) } fmt.Println(ds.Response.String()) }
🌐
AIbase
aibase.com › repos › project › anthropic-sdk-go
Anthropic Sdk Go AI Project Repository Download and Installation Guide
(Need to be maintained) Golang SDK for AnthRopic Claude AI. Provide complete encapsulated interfaces that are easy to quickly get started with. aianthropicclaudeclaude-aigolanggolang-librarysdksdk-go · Creat:2023-03-23T17:18:20 · Update:2024-08-19T17:58:14 · https://pkg.go.dev/githu...
🌐
GitHub
github.com › 3JoB
3JoB (3JoB SRA) · GitHub
3JoB/README.md · anthropic-sdk-go · anthropic-sdk-go Public archive · (Need to be maintained) Golang SDK for AnthRopic Claude AI. Provide complete encapsulated interfaces that are easy to quickly get started with.
🌐
Go Packages
pkg.go.dev › github.com › adamchol › go-anthropic-sdk
anthropic package - github.com/adamchol/go-anthropic-sdk - Go Packages
package main import ( "context" "fmt" anthropic "github.com/adamchol/go-anthropic-sdk" ) func main() { client := anthropic.NewClient("your-token") resp, err := client.CreateMessage(context.Background(), anthropic.MessageRequest{ Model: anthropic.Claude35SonnetModel, Messages: []anthropic.InputMessage{ { Role: anthropic.MessageRoleUser, Content: "Hello, how are you?", }, }, MaxTokens: 4096, }) if err != nil { fmt.Println(err) } fmt.Println(resp.Content[0].Text) }
🌐
Go Packages
pkg.go.dev › github.com › fabiustech › anthropic
anthropic package - github.com/fabiustech/anthropic - Go Packages
Model Model `json:"model,omitempty"` // MaxTokensToSample is the maximum number of tokens to generate before stopping. Required. MaxTokensToSample int `json:"max_tokens_to_sample"` // StopSequences specifies a list of sequences to stop sampling at. Anthropic's models stop on "\n\nHuman:", and // may include additional built-in stop sequences in the future.
🌐
GitHub
github.com › anthropics › anthropic-sdk-go
GitHub - anthropics/anthropic-sdk-go: Access to Anthropic's safety-first language model APIs via Go
The Anthropic Go library provides convenient access to the Anthropic REST API from applications written in Go.
Starred by 665 users
Forked by 83 users
Languages   Go
🌐
GitHub
github.com › liushuangls › go-anthropic
GitHub - liushuangls/go-anthropic: Anthropic Claude API wrapper for Go
package main import ( "errors" "fmt" "github.com/liushuangls/go-anthropic/v2" ) func main() { client := anthropic.NewClient("your anthropic api key") resp, err := client.CreateMessages(context.Background(), anthropic.MessagesRequest{ Model: anthropic.ModelClaude3Haiku20240307, Messages: []anthropic.Message{ anthropic.NewUserTextMessage("What is your name?"), }, MaxTokens: 1000, }) if err != nil { var e *anthropic.APIError if errors.As(err, &e) { fmt.Printf("Messages error, type: %s, message: %s", e.Type, e.Message) } else { fmt.Printf("Messages error: %v\n", err) } return } fmt.Println(resp.Content[0].GetText()) }
Starred by 165 users
Forked by 26 users
Languages   Go
🌐
Go Packages
pkg.go.dev › github.com › liushuangls › go-anthropic
anthropic package - github.com/liushuangls/go-anthropic - Go Packages
package main import ( "errors" "fmt" "github.com/liushuangls/go-anthropic" ) func main() { client := anthropic.NewClient("your anthropic apikey") resp, err := client.CreateMessages(context.Background(), anthropic.MessagesRequest{ Model: anthropic.ModelClaudeInstant1Dot2, Messages: []anthropic.Message{ anthropic.NewUserTextMessage("What is your name?"), }, MaxTokens: 1000, }) if err != nil { var e *anthropic.APIError if errors.As(err, &e) { fmt.Printf("Messages error, type: %s, message: %s", e.Type, e.Message) } else { fmt.Printf("Messages error: %v\n", err) } return } fmt.Println(resp.Content[0].Text) }
Find elsewhere
🌐
DZone
dzone.com › data engineering › ai/ml › use anthropic claude 3 models to build generative ai applications with go
Use Anthropic Claude 3 Models With Go
May 14, 2024 - payload := Claude3Request{ AnthropicVersion: "bedrock-2023-05-31", MaxTokens: 1024, Messages: []Message{ { Role: "user", Content: []Content{ { Type: "image", Source: &Source{ Type: "base64", MediaType: "image/jpeg", Data: imageContents, }, }, { Type: "text", Text: msg, Source: nil, }, }, }, }, }
🌐
GitHub
github.com › unfunco › anthropic-sdk-go
GitHub - unfunco/anthropic-sdk-go: Go client library for interacting with the Anthropic safety-first language model REST APIs.
Go client library for interacting with the Anthropic safety-first language model REST APIs. - unfunco/anthropic-sdk-go
Author   unfunco
🌐
Go Packages
pkg.go.dev › github.com › staropshq › go-anthropic
go-anthropic module - github.com/staropshq/go-anthropic - Go Packages
completion, err := anthropic.Do(sdk.Request{ Prompt: "\n\nHuman: Why is the sky blue?\n\nAssistant:", Model: sdk.ModelClaude__V1, MaxTokensToSample: 255, }) if err != nil { panic(err) } fmt.Println(completion.Completion) Expand ▾ Collapse ▴
🌐
Codingmall
codingmall.com › knowledge-base › 25-global › 1558-anthropic-package-for-go
Anthropic Package for Go: Integration with Claude API
At CodingMall.com we provide Joomla extensions, components, WordPress Plugins, SEO and customized web development solutions.
🌐
Reddit
reddit.com › r/aitrailblazer › anthropic claude golang sdk
r/AITrailblazer on Reddit: Anthropic Claude Golang SDK
April 5, 2024 - A Go SDK for interacting with the Anthropic Claude API . This SDK allows you to send structured messages and handle responses from Anthropic's…
🌐
Reddit
reddit.com › r/golang › go client for anthropic ai's api w/ support for streaming completions
r/golang on Reddit: Go Client for Anthropic AI's API w/ support for streaming completions
May 19, 2022 - 278K subscribers in the golang community. Ask questions and post articles about the Go programming language and related tools, events etc.
🌐
GitHub
github.com › madebywelch › anthropic-go
GitHub - madebywelch/anthropic-go: Go SDK for Anthropic's Claude, a next-generation AI assistant for your tasks, no matter the scale.
Go SDK for Anthropic's Claude, a next-generation AI assistant for your tasks, no matter the scale. - madebywelch/anthropic-go
Starred by 36 users
Forked by 18 users
Languages   Go
🌐
Go Packages
pkg.go.dev › github.com › 3JoB › anthropic-sdk-go › v2 › pkg › compress › brotli
brotli package - github.com/3JoB/anthropic-sdk-go/v2/pkg/compress/brotli - Go Packages
github.com/3JoB/anthropic-sdk-go · Open Source Insights · func New() compress.Interface · type Brotli · func (b Brotli) Decode(v *bytes.Buffer) func (b Brotli) Encode(v []byte) (*bytes.Buffer, error) This section is empty. This section is empty. func New() compress.Interface ·
🌐
Restack
restack.io › p › anthropic-knowledge-answer-golang-sdk-cat-ai
Anthropic SDK Golang Overview | Restackio
Explore the Anthropic SDK for Golang, enabling seamless integration and advanced AI capabilities in your applications. | Restackio
🌐
Go Packages
pkg.go.dev › github.com › NikitosnikN › go-anthropic-api
go_anthropic_api package - github.com/NikitosnikN/go-anthropic-api - Go Packages
package main import ( "context" "fmt" claude "github.com/NikitosnikN/go-anthropic-api" "io" "os" ) func main() { // Create a new Claude client client := claude.NewClient("your-api-key") // Read image file file, err := os.Open("giraffe.jpg") if err != nil { panic(err) } defer file.Close() content, err := io.ReadAll(file) if err != nil { panic(err) } // Create a message request instance message := claude.MessagesRequest{ Model: "claude-3-haiku-20240307", MaxTokens: 1024, } message.AddImageMessage("user", content, "image/jpeg", "who is it?") // Send request response, _ := client.CreateMessageRequest(context.Background(), message) // Print the response fmt.Println(response) }