Actions
Actions are the core functionality to interact with AI models.
Inference
The inference action allows you to generate responses from AI models.
Parameters
model(string, required): Name of the model to usecontext(object, required): The context object containing:messages(array): Array of message objectstemperature(number, optional): Sampling temperature, defaults to 1.0max_tokens(number, optional): Maximum tokens to generate
Returns
response(object):text(string): Generated response textusage(object): Token usage statisticsmodel(string): Model used for inference
Example
POST /api/inference
Headers:
X-Vuedoo-Domain: your-domain
X-Vuedoo-Access-Key: your-access-key
{
"model": "gpt-3.5-turbo",
"context": {
"messages": [
{"role": "user", "content": "Hello"}
],
"temperature": 0.7
}
}