mirror of
https://github.com/snailyp/gemini-balance.git
synced 2026-09-05 15:36:45 +08:00
feat: 支持图像生成流式响应并优化配置
- 为 OpenAI 兼容路由的图像生成聊天添加流式支持。 - 重构 `gemini-2.0-flash-exp` 安全设置,使用常量统一管理。 - 更改图像生成默认响应格式为 `url`。 - 启用 `.env.example` 中的 `AUTH_TOKEN`。 - 清理部分代码注释。
This commit is contained in:
@@ -39,7 +39,7 @@ class EmbeddingService:
|
||||
client = openai.OpenAI(api_key=api_key, base_url=settings.BASE_URL)
|
||||
response = client.embeddings.create(input=input_text, model=model)
|
||||
is_success = True
|
||||
status_code = 200 # Assume 200 OK on success
|
||||
status_code = 200
|
||||
return response
|
||||
except APIStatusError as e:
|
||||
is_success = False
|
||||
|
||||
Reference in New Issue
Block a user