Spaces:
Running
Running
Commit
·
a4ba91b
1
Parent(s):
d12a6b6
fixed requirements
Browse files- requirements.txt +1 -1
- src/google_api_client.py +1 -1
requirements.txt
CHANGED
@@ -3,4 +3,4 @@ uvicorn
|
|
3 |
requests
|
4 |
python-dotenv
|
5 |
google-auth-oauthlib
|
6 |
-
|
|
|
3 |
requests
|
4 |
python-dotenv
|
5 |
google-auth-oauthlib
|
6 |
+
asyncio
|
src/google_api_client.py
CHANGED
@@ -11,6 +11,7 @@ from google.auth.transport.requests import Request as GoogleAuthRequest
|
|
11 |
from .auth import get_credentials, save_credentials, get_user_project_id, onboard_user
|
12 |
from .utils import get_user_agent
|
13 |
from .config import CODE_ASSIST_ENDPOINT, DEFAULT_SAFETY_SETTINGS
|
|
|
14 |
|
15 |
|
16 |
def send_gemini_request(payload: dict, is_streaming: bool = False) -> Response:
|
@@ -89,7 +90,6 @@ def send_gemini_request(payload: dict, is_streaming: bool = False) -> Response:
|
|
89 |
|
90 |
def _handle_streaming_response(resp) -> StreamingResponse:
|
91 |
"""Handle streaming response from Google API."""
|
92 |
-
import asyncio
|
93 |
|
94 |
async def stream_generator():
|
95 |
try:
|
|
|
11 |
from .auth import get_credentials, save_credentials, get_user_project_id, onboard_user
|
12 |
from .utils import get_user_agent
|
13 |
from .config import CODE_ASSIST_ENDPOINT, DEFAULT_SAFETY_SETTINGS
|
14 |
+
import asyncio
|
15 |
|
16 |
|
17 |
def send_gemini_request(payload: dict, is_streaming: bool = False) -> Response:
|
|
|
90 |
|
91 |
def _handle_streaming_response(resp) -> StreamingResponse:
|
92 |
"""Handle streaming response from Google API."""
|
|
|
93 |
|
94 |
async def stream_generator():
|
95 |
try:
|