phidatahq / phidata

Build AI Assistants with memory, knowledge and tools.
https://docs.phidata.com
Mozilla Public License 2.0
11.23k stars 1.67k forks source link

Connection Error if function_call run too long time. #995

Open ju1987yetchung opened 4 months ago

ju1987yetchung commented 4 months ago

I made a self-defined function as tool of the assistant. the self-defined function is a program of train a simple neural network. if this functiong is running, it cost about 30 minitues. phidata can call this function easily, but during the running of this self-defined function, phidata will give a error and stop: image I think it is because there is limitation of time cost of the response. And I want to change this limitation to a longer time. Could you tell me where is this definition? Thank you all!

ysolanky commented 3 months ago

Hey @ju1987yetchung! This error is being raised by Streamlit. I found a discussion on their forum related to your issue

Out of all the solutions listed I think the one that would work best for your use case of training a NN would be to send progress updates to the Streamlit front end. Maybe after each epoch of training?

ju1987yetchung commented 3 months ago

Hey @ju1987yetchung! This error is being raised by Streamlit. I found a discussion on their forum related to your issue

Out of all the solutions listed I think the one that would work best for your use case of training a NN would be to send progress updates to the Streamlit front end. Maybe after each epoch of training?

Thank you Sir, I think I understand it. I will try to give some response to Streamit when I calling the function. Your reply is very helpful, thank you!