Support multimodal planner scenes without OCR
This commit is contained in:
@@ -19,6 +19,7 @@ TIMEOUT_ENV = "AI_PLANNER_TIMEOUT_SECONDS"
|
||||
THINKING_BUDGET_ENV = "AI_PLANNER_THINKING_BUDGET_TOKENS"
|
||||
API_KEY_ENV = "AI_PLANNER_API_KEY"
|
||||
BASE_URL_ENV = "AI_PLANNER_BASE_URL"
|
||||
MULTIMODAL_ENV = "AI_PLANNER_MULTIMODAL"
|
||||
|
||||
SUPPORTED_PROVIDERS = frozenset(DEFAULT_MODEL_BY_PROVIDER)
|
||||
|
||||
@@ -32,6 +33,7 @@ class PlannerConfig:
|
||||
thinking_budget_tokens: int | None = None
|
||||
api_key: str | None = None
|
||||
base_url: str | None = None
|
||||
multimodal: bool = False
|
||||
|
||||
def resolved_model(self) -> str:
|
||||
return self.model or DEFAULT_MODEL_BY_PROVIDER[self.provider]
|
||||
@@ -47,6 +49,7 @@ def load_config(env: Mapping[str, str] | None = None) -> PlannerConfig:
|
||||
thinking_budget_tokens=_parse_thinking_budget(values.get(THINKING_BUDGET_ENV)),
|
||||
api_key=values.get(API_KEY_ENV) or _provider_key(values),
|
||||
base_url=values.get(BASE_URL_ENV) or None,
|
||||
multimodal=_parse_bool(values.get(MULTIMODAL_ENV), default=False),
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user