Skip to content

HeroSizy/genkit-go-plugins

Repository files navigation

Azure OpenAI Plugin for Firebase Genkit

Pure vibe coded SDK

🛠️ Crafted with Cursor, Claude Sonnet 4, and yuanyang ☕️

Go Reference License: MIT Go Report Card CI Release Go Coverage

A production-ready Azure OpenAI integration for Firebase Genkit that provides seamless access to Azure OpenAI's advanced language models and embedding services.

🚀 Quick Start

Installation

go get github.com/HeroSizy/genkit-go-plugins/azopenai

Basic Usage

package main

import (
    "context"
    "log"

    "github.com/firebase/genkit/go/genkit"
    "github.com/HeroSizy/genkit-go-plugins/azopenai"
)

func main() {
    ctx := context.Background()
    
    // Initialize Genkit
    g, err := genkit.Init(ctx)
    if err != nil {
        log.Fatal(err)
    }

    // Initialize Azure OpenAI plugin
    azurePlugin := &azopenai.AzureOpenAI{}
    if err := azurePlugin.Init(ctx, g); err != nil {
        log.Fatal(err)
    }

    // Ready to use Azure OpenAI models!
    model := azopenai.Model(g, azopenai.Gpt4o)
}

📦 Packages

The main Azure OpenAI plugin package providing:

  • 🤖 Complete Model Support - GPT-4.1, O-series reasoning models, GPT-4o variants
  • 🧠 Reasoning Models - O1, O3, O4 models for complex problem-solving
  • 🌊 Streaming Support - Real-time response streaming
  • 🛠️ Tool Calling - Function calling capabilities
  • 🔗 Vector Embeddings - text-embedding-3-small/large support
  • 🚀 Production Ready - Built with Azure SDK best practices

📖 View detailed documentation →

⚙️ Environment Setup

export AZURE_OPEN_AI_API_KEY="your-azure-openai-api-key"
export AZURE_OPEN_AI_ENDPOINT="https://your-resource.openai.azure.com/"
export AZURE_OPENAI_DEPLOYMENT_NAME="gpt-4o"  # Optional

🔧 Development

Requirements

  • Go 1.21 or later
  • Azure OpenAI resource with deployed models

Development Commands

# Install dependencies
go mod download

# Run tests
make test

# Run tests with coverage
make test-coverage

# Format code
make fmt

# Lint code
make lint

# Build
make build

🤝 Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

📞 Support


⭐ If this plugin helps you build amazing AI applications, please give it a star!

About

Genkit Plugins written in go

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published