mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-08-09 10:39:11 +02:00
Merge 2baf0e2ba3 into 42da399b4d
This commit is contained in:
commit
3d37825bc7
2 changed files with 6 additions and 3 deletions
|
|
@ -20,7 +20,7 @@ from src.upload_limits import (
|
|||
GALLERY_UPLOAD_MAX_BYTES,
|
||||
GALLERY_TRANSFORM_UPLOAD_MAX_BYTES,
|
||||
)
|
||||
from src.constants import GENERATED_IMAGES_DIR
|
||||
from src.constants import GENERATED_IMAGES_DIR, VISION_MAX_TOKENS
|
||||
from src.optional_deps import patch_realesrgan_torchvision_compat
|
||||
|
||||
from routes.gallery.gallery_helpers import (
|
||||
|
|
@ -2285,7 +2285,7 @@ def setup_gallery_routes() -> APIRouter:
|
|||
{"type": "image_url", "image_url": {"url": f"data:{mime};base64,{b64}"}},
|
||||
],
|
||||
}],
|
||||
_tok_key: 200,
|
||||
_tok_key: VISION_MAX_TOKENS,
|
||||
"temperature": 0.3,
|
||||
}
|
||||
# Reasoning models (o1/o3/o4/gpt-5) reject an explicit temperature.
|
||||
|
|
|
|||
|
|
@ -107,7 +107,10 @@ PASSWORD_MIN_LENGTH = 8
|
|||
# Default parameters
|
||||
DEFAULT_TEMPERATURE = 1.0
|
||||
DEFAULT_MAX_TOKENS = 0
|
||||
|
||||
# Vision/OCR calls need more headroom than a plain caption would suggest:
|
||||
# thinking-capable models (Gemma 4, Qwen3-VL Thinking) spend the budget in
|
||||
# `reasoning` and return empty `content` if capped too low.
|
||||
VISION_MAX_TOKENS = 1200
|
||||
|
||||
def internal_api_base() -> str:
|
||||
"""Base URL for in-process loopback calls to Odysseus's own API.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue