-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Getting thread error when trying to use autogen through api #340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I can add the the problem is triggered when I post a question like this: curl -X POST http://localhost:5000/api/chat -H "Content-Type: application/json" -d '{"question":"My question here?"}' |
Taking a look. Will post an update here once I have one. |
i have the same problem running AutoGen inside Gradio `-------------------------------------------------------------------------------- Multiplication is a mathematical operation that combines two numbers to find their product. It can be thought of as repeated addition. For example, if you want to multiply 3 by 4, you can think of it as adding 3 four times: 3 + 3 + 3 + 3 = 12. The result, 12, is the product of the multiplication. In general, to multiply two numbers, you can follow these steps:
Here's an example of multiplying 23 by 5:
The product of 23 and 5 is 115. In Python, you can perform multiplication using the result = 3 * 4
print(result) # Output: 12 This code multiplies 3 by 4 and prints the result, which is 12.
` |
@vashat .. so I am able to replicate the issue you mention.
To get you unblocked, I might suggest trying out FastAPI (without sockets). I have an example project where a fastapi endpoint returns simple queries to a frontend here Can you confirm if you are able to run the fastapi sample above? In general, we might experience more usecases/workflows where the client application may require autogen to run in a separate thread. For this, we will probably need to discuss alternatives to signal. @sonichi |
#224 |
Any resolution to this problem? It seems happening when autogen runs in the cloud and executing code (Gradio, streamline etc.). Any work around ? |
Hi @fdchiu , Can you share the error you are getting? |
Hi,
I was running autogen through streamlit when the error reported. I found
the later version of autogen actually solved the issue.
Thanks for getting back though!
david
…On Mon, Feb 12, 2024 at 10:39 AM Victor Dibia ***@***.***> wrote:
Hi @fdchiu <https://github.com/fdchiu> ,
Can you share the error you are getting?
Is this related to signal e.g. "ValueError: signal only works in main
thread of the main interpreter"
—
Reply to this email directly, view it on GitHub
<#340 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABKEYUKMMIBC2QAZHV6FTP3YTJOXDAVCNFSM6AAAAAA6KLEPN2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZZGMYTSNRQGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@vashat is this issue resolved for you? If so please close. thanks! |
Hi!
Trying to wrap an api around an autogen setup, but it fails with "ValueError: signal only works in main thread of the main interpreter". This happen both if I try to put the app in Flask or when using FastAPI. Here's my code:
The error I get is:
So the error is triggered somewhere in autogen package.
Are there any examples out there on how to wrap tautogen app into an API?
The text was updated successfully, but these errors were encountered: