Skip to content

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

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages