mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-08-13 04:13:35 +08:00
fix: align LocalAI vision constructor arguments (#16920)
## What problem does this PR solve? `TenantLLMService.model_instance` constructs vision providers with `lang` as the third positional argument and `base_url` as a keyword argument. `LocalAICV` declared `base_url` as its third parameter, causing: ```text TypeError: LocalAICV.__init__() got multiple values for argument 'base_url' ``` This prevents LocalAI vision models from being used during document parsing. Co-authored-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
@@ -728,7 +728,7 @@ class OpenRouterCV(GptV4):
|
||||
class LocalAICV(GptV4):
|
||||
_FACTORY_NAME = "LocalAI"
|
||||
|
||||
def __init__(self, key, model_name, base_url, lang="Chinese", **kwargs):
|
||||
def __init__(self, key, model_name, lang="Chinese", base_url="", **kwargs):
|
||||
if not base_url:
|
||||
raise ValueError("Local cv model url cannot be None")
|
||||
base_url = ensure_v1(base_url)
|
||||
|
||||
Reference in New Issue
Block a user