aigc-director/aigc-claw/backend/models/vlm_gpt.py
File was renamed from aigc-director/aigc-claw/backend/tool/vlm_gpt.py
@@ -12,8 +12,12 @@
import time
import base64
import httpx
import logging
from openai import OpenAI
from typing import Dict, List, Optional
logger = logging.getLogger(__name__)
class GPTVLClient:
    """
@@ -127,7 +131,7 @@
                    return response.choices[0].message.content
            except Exception as e:
                print(f"GPTVL 请求错误: {e}")
                logger.warning("GPT VLM request failed: %s", e)
                attempts += 1
                if attempts < self.max_attempts:
                    time.sleep(2 * attempts)  # 指数退避
@@ -167,4 +171,4 @@
                else:
                    print(f"✗ 返回空结果 ({elapsed:.1f}s)")
            except Exception as e:
                print(f"✗ 失败: {e}")
                print(f"✗ 失败: {e}")