aloof-iron-61329
02/09/2024, 10:24 AMasync function callApi() {
const url = 'https://aicyberbot.net/api/generate';
const data = {
model: "mixtral:8x7b-instruct-v0.1-q5_K_M",
prompt: `${workflow.prompt}`,
stream: false
};
const config = {
headers: {
'Content-Type': 'application/json'
}
};
try {
const response = await axios.post(url, data, config);
workflow.response = response.data.response
console.log(response.data);
} catch (error) {
console.error('Error calling the API:', error.message);
}
}
callApi();