Skip to content

plexusone/omni-aws

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Omni-AWS

Go CI Go Lint Go SAST Go Report Card Docs Docs Visualization License

AWS provider packages for PlexusOne libraries.

Modules

This repository contains multiple Go modules for AWS integrations:

Module Description Install
omnillm AWS Bedrock provider for omnillm-core go get github.com/plexusone/omni-aws/omnillm
omnistorage S3 backend for omnistorage-core go get github.com/plexusone/omni-aws/omnistorage
omnivault AWS Secrets Manager & Parameter Store for omnivault go get github.com/plexusone/omni-aws/omnivault

Quick Start

OmniLLM - AWS Bedrock

import (
    "github.com/plexusone/omni-aws/omnillm"
    "github.com/plexusone/omnillm-core"
)

// Create Bedrock provider
provider := omnillm.NewProvider("us-east-1")

// Use with OmniLLM
client := omnillm.NewClient(provider)
resp, err := client.CreateChatCompletion(ctx, omnillm.ChatCompletionRequest{
    Model: "anthropic.claude-3-5-sonnet-20241022-v2:0",
    Messages: []omnillm.Message{
        {Role: "user", Content: "Hello!"},
    },
})

See omnillm/README.md for full documentation.

OmniStorage - S3 Backend

import (
    "github.com/plexusone/omni-aws/omnistorage/backend/s3"
)

// Create S3 backend
backend, err := s3.New(s3.Config{
    Bucket: "my-bucket",
    Region: "us-east-1",
})

// Write
w, _ := backend.NewWriter(ctx, "path/to/file.txt")
w.Write([]byte("hello"))
w.Close()

// Read
r, _ := backend.NewReader(ctx, "path/to/file.txt")
data, _ := io.ReadAll(r)
r.Close()

See omnistorage/README.md for full documentation including S3-compatible services (R2, MinIO, Wasabi).

OmniVault - AWS Secrets Manager & Parameter Store

import (
    aws "github.com/plexusone/omni-aws/omnivault"
)

// Create Secrets Manager provider
provider, err := aws.NewSecretsManager(aws.Config{
    Region: "us-east-1",
})

// Get a secret
secret, err := provider.Get(ctx, "prod/database/credentials")
fmt.Println("Password:", secret.Value)
fmt.Println("Username:", secret.Fields["username"])

// Or use Parameter Store
ssmProvider, err := aws.NewParameterStore(aws.Config{
    Region: "us-east-1",
})
param, err := ssmProvider.Get(ctx, "/myapp/prod/api-key")

See omnivault/README.md for full documentation including IRSA, versioning, and rotation.

License

MIT

About

OmniLLM Provider for AWS Bedrock is an external provider module that demonstrates how to create custom providers for OmniLLM without adding heavy dependencies to the core library.

Resources

Stars

Watchers

Forks

Contributors

Languages