ERROR WITH OPENAI Assistent TEMPLATE
# 🤝help
h
b
Same problem here 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 the error is followed by others
b
Hey I have the same error code too, did you find a way to fix it ?
b
Unfortunally no. Waiting to see if anyone from Botpress help us
Hey guys, just solved it. I was using gtp-4o as my model, changed to gpt-4turbo and it's working. Also tested with 3.5 and works as well @User @User
q
God bless you for this message. Helped me out a lot. Cheers
h
Thank you mate. Btw if you want to use Gpt-4o, you can simulate the OpenAI assistent using the AI Task card.
66 Views