A Go plugin for Firebase GenKit that provides seamless integration with VolcEngine's models. This plugin enables developers to leverage advanced AI capabilities including text generation, streaming responses, tool calling, and multimodal support.
- 🚀 Text Generation: Support for various Doubao and DeepSeek models
- 📡 Streaming Support: Real-time response streaming for better user experience
- 🛠️ Tool Calling: Function calling capabilities for complex AI workflows
- 🎯 Multimodal Support: Handle text, images, audio, and video inputs
- ⚡ High Performance: Optimized for production workloads
- 🔧 Easy Configuration: Multiple initialization methods for different use cases
- Go 1.24.1 or higher
- VolcEngine API Key (Get one here)
go get github.com/ipfans/genkit-plugin-volcengineimport (
"github.com/firebase/genkit/go/genkit"
volcengine "github.com/ipfans/genkit-plugin-volcengine"
) // Initialize GenKit with VolcEngine plugin
genkit.Init(
ctx,
genkit.WithPlugins(
volcengine.VolcEngineWithAPIKey(
os.Getenv("VOLCENGINE_API_KEY"),
),
),
)Set your VolcEngine API key:
export VOLCENGINE_API_KEY="your_volcengine_api_key_here"Or create a .env file:
echo "VOLCENGINE_API_KEY=your_volcengine_api_key_here" > .env| Model | Type | Capabilities | Latest Version |
|---|---|---|---|
| doubao-seed-1-6 | Multimodal | Text, Images, Audio, Video, Tools | doubao-seed-1-6-250615 |
| doubao-seed-1-6-vision | Multimodal | Text, Images, Audio, Video, Tools | doubao-seed-1-6-vision-250815 |
| doubao-seed-1-6-flash | Multimodal | Text, Images, Audio, Video, Tools | doubao-seed-1-6-flash-250828 |
| deepseek-r1 | Text | Text Generation, Tools | deepseek-r1-250120 |
| deepseek-v3 | Text | Text Generation, Tools | deepseek-v3-250324 |
| deepseek-v3-1 | Text | Text Generation, Tools | deepseek-v3-1-250821 |
- ✅ Multiturn Conversations: All models support conversation history
- ✅ Tool Calling: Function calling for external integrations
- ✅ System Messages: Custom system prompts for behavior control
- ✅ Streaming: Real-time response generation
- ✅ Multimodal: Image, audio, and video support (Doubao models only)
volcengine.VolcEngineWithAPIKey("your_api_key")volcengine.VolcEngineWithClient(client)# Clone the repository
git clone https://github.com/ipfans/genkit-plugin-volcengine.git
cd genkit-plugin-volcengine
# Build the module
go build
# Run tests
go test ./...
# Update dependencies
go mod tidy# Format code
go fmt ./...
# Vet code
go vet ./...
# Static analysis
golangci-lint runCheck out the example directory for a complete working example that demonstrates:
- Basic setup and configuration
- Model selection and usage
- Development server setup
- Task automation with Taskfile
API Key Not Set
Error: VOLCENGINE_API_KEY environment variable is not set
Solution: Set the environment variable or pass the key during initialization
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Ensure all tests pass
- Submit a pull request
Please use the GitHub Issues page to report bugs or request features.
This project is licensed under the MIT License. See the LICENSE file for details.