Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -115,7 +115,6 @@ async def list_models(authorization: str = Header(None)):
|
|
115 |
await verify_authorization(authorization)
|
116 |
async with key_lock:
|
117 |
api_key = next(key_cycle)
|
118 |
-
logger.info(f"Using API key: {api_key}")
|
119 |
try:
|
120 |
response = get_gemini_models(api_key)
|
121 |
logger.info("Successfully retrieved models list")
|
@@ -131,7 +130,6 @@ async def chat_completion(request: ChatRequest, authorization: str = Header(None
|
|
131 |
await verify_authorization(authorization)
|
132 |
async with key_lock:
|
133 |
api_key = next(key_cycle)
|
134 |
-
logger.info(f"Using API key: {api_key}")
|
135 |
|
136 |
try:
|
137 |
logger.info(f"Chat completion request - Model: {request.model}")
|
@@ -166,7 +164,6 @@ async def embedding(request: EmbeddingRequest, authorization: str = Header(None)
|
|
166 |
await verify_authorization(authorization)
|
167 |
async with key_lock:
|
168 |
api_key = next(key_cycle)
|
169 |
-
logger.info(f"Using API key: {api_key}")
|
170 |
|
171 |
try:
|
172 |
client = openai.OpenAI(api_key=api_key, base_url=config.settings.BASE_URL)
|
|
|
115 |
await verify_authorization(authorization)
|
116 |
async with key_lock:
|
117 |
api_key = next(key_cycle)
|
|
|
118 |
try:
|
119 |
response = get_gemini_models(api_key)
|
120 |
logger.info("Successfully retrieved models list")
|
|
|
130 |
await verify_authorization(authorization)
|
131 |
async with key_lock:
|
132 |
api_key = next(key_cycle)
|
|
|
133 |
|
134 |
try:
|
135 |
logger.info(f"Chat completion request - Model: {request.model}")
|
|
|
164 |
await verify_authorization(authorization)
|
165 |
async with key_lock:
|
166 |
api_key = next(key_cycle)
|
|
|
167 |
|
168 |
try:
|
169 |
client = openai.OpenAI(api_key=api_key, base_url=config.settings.BASE_URL)
|