Browse Source

feat:帖子智能回复增加图片识别

zhangwl 1 month ago
parent
commit
eb139156b7
2 changed files with 3 additions and 1 deletions
  1. 1 1
      app/routers/chat_tools.py
  2. 2 0
      app/routers/users.py

+ 1 - 1
app/routers/chat_tools.py

@@ -68,7 +68,7 @@ async def generate_post_comment(request: CommentRequest):
     file_list = []
     if images:
         for img_url in images:
-            file_list.append({"type": "input_image", "file_url": img_url})
+            file_list.append({"type": "input_image", "image_url": img_url})
 
 
     prompt_config = get_circle_prompt(app_name)

+ 2 - 0
app/routers/users.py

@@ -447,6 +447,8 @@ async def refresh_access_token(refresh_token: str) -> Token:
         headers={"WWW-Authenticate": "Bearer"},
     )
 
+    print("刷新令牌")
+
     try:
         payload = jwt.decode(refresh_token, config.SECRET_KEY, algorithms=[config.ALGORITHM])
         if payload.get("type") != "refresh":