fix(app): 为图片嵌入 API 请求添加 Authorization 认证头
This commit is contained in:
2
app.py
2
app.py
@@ -190,7 +190,7 @@ def get_image_embedding(image_url: str, text: str = "这是什么病虫害?",
|
|||||||
try:
|
try:
|
||||||
resp = httpx.post(
|
resp = httpx.post(
|
||||||
IMAGE_EMBEDDING_API_URL,
|
IMAGE_EMBEDDING_API_URL,
|
||||||
headers={"Content-Type": "application/json"},
|
headers={"Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json"},
|
||||||
json=payload,
|
json=payload,
|
||||||
timeout=120,
|
timeout=120,
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user