https://discord.gg/botpress logo
```async function callApi() { const url = 'https...
# 🌎general
a
Copy code
async 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();
8 Views