rare-sapphire•2y ago
Why do i get this error ?

27 Replies
rare-sapphireOP•2y ago
I think Braden talked with another guy about this issue maybe you already have a solution ( i dont want to tag you ) my project is also very big tho.
rising-crimson•2y ago
Luke is this consistent? Sometimes a refresh fixes this
rare-sapphireOP•2y ago
yes
most of the question are fine but a few question there is always coming this error
rising-crimson•2y ago
Are the questions going to a AI step? Also is it really long questions that result in the error?
rare-sapphireOP•2y ago
yes so not the vf ai block i use the api instead. The question is middle long 25 words
rising-crimson•2y ago
Got it - where is the API going? And I assume you have an error path right. I wonder if its a timeout issue
rare-sapphireOP•2y ago
first to the vf kb and then to the open ai api.
Are you using gpt-4-turbo?
rare-sapphireOP•2y ago
Yes
stormy-gold•2y ago
I have the same error calling the OpenAI API with a Chatgpt-turbo assistant created there
rare-sapphireOP•2y ago
I also have this problem

Can you provide some more screenshots of your response AI step? Also, if you change to GPT-3.5-turbo, does this still happen?
rare-sapphireOP•2y ago
true i will dm you
dependent-tan•2y ago
I've had the same error since this morning with Open Ai assistant API. I ask for calculations, without retrieval file. Maybe it's the long response time that's blocking it... (this is a Chatgpt suggestion). My flow works, and so do my API connections. I'm in the same situation, so if you want to please share here the solution you found, I'll use it! Thanks a lot!
stormy-gold•2y ago
Same here, simple questions are correctly answered. But complex one not, I don't know if there is a problem of timeout, text size or special characters in the response. Thanks a lot to anyone can help
rising-crimson•2y ago
This is likely a result of a timout from the Open AI side. This often happens with more complex queries. We've found that decreasing the size of the output tokens helps with this
rare-sapphireOP•2y ago
I will check that
absent-sapphire•2y ago
Hi Daniel, I tried to do It using code from Python Ide and I obtain the result. Could It be a timeout problem from voiceflow side? As you said It seems to happen only with big answers. I will try to train the agent to use only a limit of characters in the answers. I let you know if It works. Thanks for the help and sorry for my bad English.
rare-sapphireOP•2y ago
Hey guys, @W. Williams (SFT) found for this problem a solution again 🥳 . You have to paste this as a javascript block before the vf kb api block and then you have to delete the " " in the vf kb api block in the last_utterance step->
KB API Block { "chunkLimit": 4, "synthesis": false, "question": {last_utterance} # You should delete these " " here } -> Javascript block last_utterance = JSON.stringify(last_utterance) @Root , @Juan and @MunitisArquero
KB API Block { "chunkLimit": 4, "synthesis": false, "question": {last_utterance} # You should delete these " " here } -> Javascript block last_utterance = JSON.stringify(last_utterance) @Root , @Juan and @MunitisArquero

absent-sapphire•2y ago
Thanks a lot!! I Will test It ASAP. Thanks again
@justLuka did you get in touch with Niko and send your template to him? We chatted about it this morning.
rare-sapphireOP•2y ago
Yes 👍
stormy-gold•2y ago
Hi team,
Sorry because my english and programming habilities are very low 😄
I'm still having an error calling to OpenAI API managing complex answers. I was not abl to do a test using a delay pecause I can't use any función of SetTimeout in VoiceFlow functions. But I tried to test the numbers of calls to the "run" checking status just to check if there is any pattern. And yes, it seems to cut the conection in the 100 call. I did some test and always cut in this call.
stormy-gold•2y ago

stormy-gold•2y ago
Do you know if there is a liitation from voiceflow side or from OpenAI side? To check it a really need a method to set in the flow a delay and wait 1 or 2 sec before check again the run status.
Thanks a lot!
Update: I introduce a capture message from user after the count and I can manage the "time" waiting from user input. Using this, I finally obtain the answer from OpenAI API. So sure is a problem of numer of calls OpenAI allow after cut the connection, probably to defend against DDoS. Please, can you help me to create a delay function 👏
dependent-tan•2y ago
@W. Williams (SFT) is the best!
I sent you a DM @Juan
thanks Root