-
Notifications
You must be signed in to change notification settings - Fork 140
Open
Labels
bugSomething isn't workingSomething isn't working
Description
When running the following example,
$ curl -X 'POST' 'http://localhost:6969/v1/chat/completions' -H 'accept: application/json' -H 'Content-Type: application/json' -d '{
"model": "gemini-1.5-pro",
"messages": [{ "role": "user", "content": "Hello!" }]
}'
[RESPONSE]
{"detail":"Gemini client is not initialized."}
When I execute "poetry run python src/run.py",
The starting server log indicates that the gemini_client has been initialized,
but on the following line, the get_gemini_client returns None.
https://github.com/Amm1rr/WebAI-to-API/blob/master/src/app/endpoints/chat.py#L51
It seems likely that there is a timing issue with object creation, or that the uvicorn web server does not share objects internally between processes or threads.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working