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()) }
Videos
22:08
Build AI Agents in Go - Step By Step Tutorial - YouTube
36:43
AI AGENTS Updates From Google, OpenAI and Anthropic - YouTube
17:01
How openai and anthropic publish their SDK and you can too - YouTube
49:53
Anthropic’s Project Vend, computer science education and AI prompts ...
18:12
Claude Code & the evolution of agentic coding — Boris Cherny, ...
07:03
The AI Feature Nobody's Talking About (But Should Be) - YouTube
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 › 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
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 › 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) }
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, }, }, }, }, }
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 ·
Reddit
reddit.com › r/anthropic › golang mcp implementation
r/Anthropic on Reddit: Golang MCP Implementation
November 27, 2024 -
I've scaffolded a basic SDK implementation in Go with the help of the specification docs and Claude Sonnet. Would have taken forever otherwise lol.
I have a basic client implemented with stdio and sse transports. Would love to get this to parity with the JS and Python SDKs. I'm ok with Go but not an expert by any means. Happy to have some help or at least have people check out the lib and note what's missing or can be fixed.
Cheers!
https://github.com/mark3labs/mcp-go
Top answer 1 of 2
1
I've also gone ahead and implemented the filesystem-server in Go using the newly created SDK https://github.com/mark3labs/mcp-filesystem-server
2 of 2
1
Hey, I have made an alternative implementation, that is only intended to be used for servers, but provides somewhat more high level API to register tools, prompts and resources, which allows to colocate related things. It is based on "fx" DI framework to wire everything together. strowk/foxy-contexts: Foxy contexts is a library for building context servers supporting Model Context Protocol I use my own underlying server implementation, it is possible that I might switch to anything that would be an official sdk..
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
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.
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 ▴
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…
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) }
Go Packages
pkg.go.dev › github.com › madebywelch › anthropic-go › pkg › anthropic
anthropic package - github.com/madebywelch/anthropic-go/pkg/anthropic - Go Packages
CompletionResponse is the response from the Anthropic API for a completion request.
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