https://github.com/shaharia-lab/goai
AI SDK for building AI-powered applications in Go
https://github.com/shaharia-lab/goai
ai ai-sdk generative-ai goai library llm mcp model-context-protocol open-source sdk
Last synced: 18 days ago
JSON representation
AI SDK for building AI-powered applications in Go
- Host: GitHub
- URL: https://github.com/shaharia-lab/goai
- Owner: shaharia-lab
- License: mit
- Created: 2025-01-12T14:52:26.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-04-02T20:15:03.000Z (26 days ago)
- Last Synced: 2025-04-02T21:24:47.688Z (26 days ago)
- Topics: ai, ai-sdk, generative-ai, goai, library, llm, mcp, model-context-protocol, open-source, sdk
- Language: Go
- Homepage:
- Size: 185 KB
- Stars: 6
- Watchers: 0
- Forks: 0
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- Contributing: docs/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Security: docs/SECURITY.md
Awesome Lists containing this project
README
# 🚀 GoAI

[](https://pkg.go.dev/github.com/shaharia-lab/goai)
[](https://github.com/shaharia-lab/goai/actions/workflows/CI.yaml)
[](https://goreportcard.com/report/shaharia-lab/goai)
[](https://codecov.io/gh/shaharia-lab/goai)
[](https://sonarcloud.io/summary/new_code?id=shaharia-lab_goai)
[](https://sonarcloud.io/summary/new_code?id=shaharia-lab_goai)
[](https://sonarcloud.io/summary/new_code?id=shaharia-lab_goai)
[](https://sonarcloud.io/summary/new_code?id=shaharia-lab_goai)
[](https://sonarcloud.io/summary/new_code?id=shaharia-lab_goai)
[](https://sonarcloud.io/summary/new_code?id=shaharia-lab_goai)GoAI is a powerful Go library that seamlessly integrates multiple LLM providers, vector embeddings,
and vector storage capabilities. Built for developers who want a clean, unified interface for AI operations.## ✨ Features
🤖 **Multiple LLM Providers**
- OpenAI
- Anthropic Claude
- AWS Bedrock📊 **Vector Operations**
- Efficient embeddings generation
- PostgreSQL vector storage
- Similarity search🛠 **Developer Experience**
- Consistent interfaces
- Streaming support
- Type-safe operations## 🚀 Quick Start
### 📦 Installation
```bash
go get github.com/shaharia-lab/goai
```### Example
```go
package mainimport (
"github.com/shaharia-lab/goai"
"log"
"os"
)func main() {
// Initialize LLM
client := goai.NewAnthropicClient(os.Getenv("ANTHROPIC_API_KEY"))
provider := goai.NewAnthropicLLMProvider(goai.AnthropicProviderConfig{
Client: client,
})// Configure request
llm := goai.NewLLMRequest(goai.NewRequestConfig(
goai.WithMaxToken(200),
goai.WithTemperature(0.7),
), provider)// Generate response
response, err := llm.Generate([]goai.LLMMessage{
{Role: goai.UserRole, Text: "Explain quantum computing"},
})if err != nil {
panic(err)
}
log.Println(response)
}
```## 📚 Documentation
Visit our [documentation](docs/index.md) for detailed guides on:
- [Getting Started](docs/index)
- [LLM Integration](docs/llm.md)
- [Embedding Generation](docs/embeddings.md)
- [Vector Operations](docs/vector-store/index.md)
- [MCP (Model Context Protocol) Server in Go](docs/mcp.md)
- [API Reference](https://pkg.go.dev/github.com/shaharia-lab/goai)## 🤝 Contributing
We welcome contributions! See our [Contributing Guide](CONTRIBUTING.md) for details.
## 🔒 Security
Review our [Security Policy](docs/SECURITY.md) for reporting vulnerabilities.
## 📝 License
MIT License - see [LICENSE](LICENSE) for details.
---
Built with ❤️ by [Shaharia Lab](https://github.com/shaharia-lab) and
[Contributors](https://github.com/shaharia-lab/goai/graphs/contributors)