Skip to content

shaharia-lab/goai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

46 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ 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

Sponsor this project

 

Packages

No packages published

Contributors 2

  •  
  •  

Languages