MCP ExplorerExplorer

Goai

@shaharia-labon 9 months ago
9 MIT
FreeCommunity
AI Systems
#ai#ai-sdk#goai#library#open-source#sdk#generative-ai#llm#mcp#model-context-protocol
AI SDK for building AI-powered applications in Go

Overview

What is Goai

GoAI is an AI SDK designed for building AI-powered applications using the Go programming language. It provides a unified interface for integrating various large language model (LLM) providers and vector operations.

Use cases

Use cases for GoAI include developing conversational agents, implementing AI-based search functionalities, creating personalized content recommendations, and enhancing applications with AI capabilities.

How to use

To use GoAI, developers can install the SDK via Go modules, import it into their Go projects, and utilize its functions to interact with multiple LLM providers and perform vector operations.

Key features

Key features of GoAI include support for multiple LLM providers (such as OpenAI, Anthropic Claude, and AWS Bedrock), efficient vector operations for generating embeddings, and a clean, unified interface for AI operations.

Where to use

GoAI can be used in various fields including natural language processing, chatbots, recommendation systems, and any application that requires AI-driven functionalities.

Content

🚀 GoAI

AI Package Banner

Go Reference
CI Status
Go Report Card
codecov
Quality Gate Status
Reliability Rating
Security Rating
Maintainability Rating
Bugs
Code Smells

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

go get github.com/shaharia-lab/goai

Example

You can find more examples in the _examples directory which
you can run simply by go run _examples/simple_chat.go

package main

import (
   "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 for detailed guides on:

🤝 Contributing

We welcome contributions! See our Contributing Guide for details.

🔒 Security

Review our Security Policy for reporting vulnerabilities.

📝 License

MIT License - see LICENSE for details.


Built with ❤️ by Shaharia Lab and
Contributors

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers