why did stackAI can't work?
# 🤝help
I am trying to make a botpress in Bahasa Indonesia and connect in to StackAI for further questions but the result always error, anyone can help me please?
Hey @shy-arm-26198, what's the code you're running and what is the error?
Here is my execute code on my botrpess: // Add your stack AI endpoint URL in place of "YOUR_STACK_AI_ENDPOINT_URL" const endpoint = 'https://www.stack-inference.com/run_deployed_flow?flow_id=649a3c8ff31189e77b528c4b&org=77c5786e-e3ed-451c-9152-cafe2136beda' // Add your stack AI API key in place of "YOUR_API_KEY_HERE" const headers = { Authorization:
Bearer cf9919f2-0677-425c-af08-e585afbb2af7
, 'Content-Type': 'application/json' } const data = { 'in-0': workflow.question } try { const response = await axios.post(endpoint, data, { headers }) workflow.apiResponse = response.data['out-0'] } catch (error) { throw new Error(
stack-error: ${error}
) }
and here is my stackAI dashboard:
problem: the output of stackAI sometimes not relevant and using other language
1. Change your stack AI token, anybody can use it and rack up a bill for you now. 2. I was able to get an answer with your code, so it isn't an error in there I think you should try experimenting with whatever prompt you're using in stack ai. For the language, you can try using the Translator agent in Botpress to translate messges back into bahasa in case Stack AI returns something in English