Features
Caching
Smart caching for AI responses
Ultra AI offers advanced caching mechanisms to improve response times and reduce costs associated with AI API calls.
Note: Similarity caching requires at least one OpenAI key for embedding generation. You will incur charges for embedding generation.
Cache Configuration
You can configure caching in your API requests:
Cache Types
- Exact: Caches responses for exact matches of input
- Similarity: Uses semantic similarity to return cached responses for similar inputs
Cache Parameters
type
: “exact” or “similarity”maxAge
: Maximum age of cached results in secondsthreshold
: Similarity threshold for cache hits (0.0 - 1.0)