Response on prompt
POST Prompt
{
"agentId": "string", // The ID of the agent to which the prompt is sent (required)
"prompt": "string", // The prompt text to be sent to the agent (required)
"systemPrompt": "string", // Optional system prompt to provide context (optional)
"stream": "boolean" // Indicates whether to use streaming for the response (optional)
}var myHeaders = new Headers();
myHeaders.append("apikey", "{{apikey}}");
var raw = "{\r\n \"prompt\": \"Hello, how are you?\",\r\n \"agentId\": \"{{agentId}}\",\r\n \"stream\": false\r\n}";
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.fullmetal.ai/agent/prompt", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));curl --location 'https://api.fullmetal.ai/agent/prompt' \
--header 'apikey: {{apikey}}' \
--data '{
"prompt": "Hello, how are you?",
"agentId": "{{agentId}}",
"stream": false
}'Last updated