mirror of
https://github.com/tcsenpai/pensieve.git
synced 2025-06-09 12:37:12 +00:00
feat: always enable vlm and ocr plugin
This commit is contained in:
parent
559f7e9732
commit
a3cacb02e9
@ -16,7 +16,6 @@ import typer
|
|||||||
|
|
||||||
|
|
||||||
class VLMSettings(BaseModel):
|
class VLMSettings(BaseModel):
|
||||||
enabled: bool = True
|
|
||||||
modelname: str = "minicpm-v"
|
modelname: str = "minicpm-v"
|
||||||
endpoint: str = "http://localhost:11434"
|
endpoint: str = "http://localhost:11434"
|
||||||
token: str = ""
|
token: str = ""
|
||||||
@ -28,7 +27,6 @@ class VLMSettings(BaseModel):
|
|||||||
|
|
||||||
|
|
||||||
class OCRSettings(BaseModel):
|
class OCRSettings(BaseModel):
|
||||||
enabled: bool = True
|
|
||||||
# will by ignored if use_local is True
|
# will by ignored if use_local is True
|
||||||
endpoint: str = "http://localhost:5555/predict"
|
endpoint: str = "http://localhost:5555/predict"
|
||||||
token: str = ""
|
token: str = ""
|
||||||
|
@ -16,7 +16,6 @@ default_plugins:
|
|||||||
# using ollama as the vlm server
|
# using ollama as the vlm server
|
||||||
vlm:
|
vlm:
|
||||||
concurrency: 1
|
concurrency: 1
|
||||||
enabled: true
|
|
||||||
endpoint: http://localhost:11434
|
endpoint: http://localhost:11434
|
||||||
force_jpeg: true
|
force_jpeg: true
|
||||||
modelname: minicpm-v
|
modelname: minicpm-v
|
||||||
@ -26,7 +25,6 @@ vlm:
|
|||||||
# using local ocr
|
# using local ocr
|
||||||
ocr:
|
ocr:
|
||||||
concurrency: 1
|
concurrency: 1
|
||||||
enabled: true
|
|
||||||
# this is not used if use_local is true
|
# this is not used if use_local is true
|
||||||
endpoint: http://localhost:5555/predict
|
endpoint: http://localhost:5555/predict
|
||||||
force_jpeg: false
|
force_jpeg: false
|
||||||
|
@ -878,14 +878,12 @@ def run_server():
|
|||||||
print(f"OCR plugin enabled: {settings.ocr}")
|
print(f"OCR plugin enabled: {settings.ocr}")
|
||||||
|
|
||||||
# Add VLM plugin router
|
# Add VLM plugin router
|
||||||
if settings.vlm.enabled:
|
# Removed check for settings.vlm.enabled
|
||||||
print("VLM plugin is enabled")
|
|
||||||
vlm_main.init_plugin(settings.vlm)
|
vlm_main.init_plugin(settings.vlm)
|
||||||
app.include_router(vlm_main.router, prefix="/plugins/vlm")
|
app.include_router(vlm_main.router, prefix="/plugins/vlm")
|
||||||
|
|
||||||
# Add OCR plugin router
|
# Add OCR plugin router
|
||||||
if settings.ocr.enabled:
|
# Removed check for settings.ocr.enabled
|
||||||
print("OCR plugin is enabled")
|
|
||||||
ocr_main.init_plugin(settings.ocr)
|
ocr_main.init_plugin(settings.ocr)
|
||||||
app.include_router(ocr_main.router, prefix="/plugins/ocr")
|
app.include_router(ocr_main.router, prefix="/plugins/ocr")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user