Update utils_image.py

pull/1301/head
foxplaying 2025-10-17 13:37:55 +08:00 committed by GitHub
parent 13008a14be
commit 9fdfb71801
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -273,7 +273,7 @@ class ImageManager:
prompt = global_config.personality.visual_style
logger.info(f"[VLM调用] 为图片生成新描述 (Hash: {image_hash[:8]}...)")
description, _ = await self.vlm.generate_response_for_image(
prompt, image_base64, image_format, temperature=0.4
prompt, image_base64, image_format, temperature=0.4, max_tokens = model_config.model_task_config.vlm.img_tokens if max_tokens is None else max_tokens
)
if description is None:
@ -570,7 +570,7 @@ class ImageManager:
# 获取VLM描述
description, _ = await self.vlm.generate_response_for_image(
prompt, image_base64, image_format, temperature=0.4
prompt, image_base64, image_format, temperature=0.4, max_tokens = model_config.model_task_config.vlm.img_tokens if max_tokens is None else max_tokens
)
if description is None: