Created an Open AI Assistant, nothing in chat but ...
# 🤝help
g
I followed the tutorial and template to "Deploy a Custom Open AI Assistant". On the positive side it was super easy. On the negative side, it doesn't seem to work. I published it and shared it, entered my AI Assistant name and API keys as instructed, but after that interaction with the chat, every response now says "Sorry, an error occured. Please try again later." I'm new to Botpress, trying it out as the interface for an AI Assistant. Is there any place to find/troubleshoot errors? It doesn't look like there's anything useful for this purpose in the audit log. Thanks. https://cdn.discordapp.com/attachments/1245398320298590238/1245398320617361419/image.png?ex=66589b12&is=66574992&hm=d157be160959c2c81d25377a5c8ed60e082ec4ab74c08b6fbec4c2fd5d1ff8ff&
a
Hey @great-laptop-30228 , can you send me a report id? I will look into your issue @square-energy-41150
s
# Sending a Problem Report Here's how to send the Botpress Team a problem report: 1. In the Botpress Cloud Studio, locate the "Help" icon in the bottom left corner of the screen. 2. Click "Report a problem" and follow the steps on the screen. 3. Copy the Report ID to your clipboard and provide it to a member of the Botpress Team on Discord.
message has been deleted
g
report_01HZ2G2NZ731FFZ1A2TSJPY30M Thanks!
I did find an error message attached to the bot in the workspace. Error thrown in Execute Code card 2 hours ago | Last seen 6 minutes ago About this error An error occured while running Execute Code card: Request failed with status code 400 Transpiled Code: 003 var __defProp = Object.defineProperty; 004 var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); 005 const creationResponse = await axios.request({ 006 method: "post", 007 maxBodyLength: Infinity, 008 url:
https://api.openai.com/v1/threads/${workflow.threadId}/runs
, 009 headers: { 010 "OpenAI-Beta": "assistants=v1", 011 Authorization:
Bearer ${bot.openAIToken}
, 012 "Content-Type": "application/json" 013 }, 014 data: JSON.stringify({ 015 assistant_id: bot.assistantId 016 }) 017 }); 018 const runId = creationResponse.data.id; 019 const waitTillRunComplete = /* @__PURE__ */ __name(async () => { 020 const statusResponse = await axios.request({ 021 method: "get", 022 maxBodyLength: Infinity, 023 url:
https://api.openai.com/v1/threads/${workflow.threadId}/runs/${runId}
, 024 headers: { 025 "OpenAI-Beta": "assistants=v1", 026 Authorization:
Bearer ${bot.openAIToken}
, 027 "Content-Type": "application/json" 028 } 029 }); 030 if (["queued", "in_progress"].includes(statusResponse.data.status) === false) { 031 console.log("the status is:", statusResponse.data.status); 032 return; 033 } 034 await new Promise((resolve) => { 035 setTimeout(resolve, 1e3); 036 }); 037 await waitTillRunComplete(); 038 }, "waitTillRunComplete"); 039 await waitTillRunComplete(); 040
ChatGPT says it's a bad request, and has suggestions for improving the code. 😂
q
In those projects that are not using tools or files, the only thing I needed to do was change 'v1' to 'v2' in the beta version headers. So, assistants="v1" becomes assistants="v2" (v1 works also until the end of 2024). Meanwhile, you can use the Assistants API with Botpress in community-built projects, like these (there are many other projects also) https://discord.com/channels/1108396290624213082/1180023587646746715/1244193401214210072 https://discord.com/channels/1108396290624213082/1232193993836855347/1232194050774536263
⬆️ In that OpenAI link, there are instructions on how to change everything else.
g
Thank you!! It's working now. 🙏
8 Views