Using AIML with Fireworks
Learn how to use AIML with Fireworks AI API
Using AIML with Fireworks API
This guide will help you run your AIML agents using the Fireworks AI API.
Important: Currently requires the enable-api-preview=true
header to be set while AIML is still in preview.
Prerequisites
Before you begin, you'll need:
- A Fireworks AI account
- An API key from Fireworks AI
- Your AIML prompt
That's it. No Special SDKs or anything. In fact, if you are already using an SDK such as the Vercel AI SDK or another such tool you absolutely do not need to change anything except adding the enable-api-preview=true
header and sending the AIML content as a system prompt.
API Integration
To use AIML with Fireworks, you'll send your AIML content as a system prompt to the Fireworks API. The API will process the AIML workflow and return the results.
API Examples
Here are examples of how to call the Fireworks API with AIML loaded from a file, assuming you have a file called my-first-agent.aiml
containing your AIML prompt:
Next Steps
- Explore AIML Elements for more advanced workflows
- Check out Examples for inspiration
- Learn about Streaming for real-time responses