fixed warning

This commit is contained in:
Saifeddine ALOUI 2024-08-20 12:48:32 +02:00
parent 7e414334d9
commit e37aca6f63
3 changed files with 10 additions and 3 deletions

View File

@ -8,7 +8,7 @@ description:
"""
from fastapi import APIRouter, Request
from lollms.server.elf_server import LOLLMSElfServer
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
from starlette.responses import StreamingResponse
from lollms.types import MSG_OPERATION_TYPE
from lollms.main_config import BaseConfig
@ -27,6 +27,8 @@ lollmsElfServer:LOLLMSElfServer = LOLLMSElfServer.get_instance()
class Identification(BaseModel):
client_id: str
class ModelPost(BaseModel):
model_config = ConfigDict(protected_namespaces=())
client_id: str
model_url: str
# ----------------------- voice ------------------------------

View File

@ -11,7 +11,7 @@ description:
from fastapi import APIRouter, HTTPException
from fastapi.responses import PlainTextResponse
from lollms.server.elf_server import LOLLMSElfServer
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
from starlette.responses import StreamingResponse
from lollms.types import MSG_OPERATION_TYPE
from lollms.utilities import detect_antiprompt, remove_text_from_string, trace_exception
@ -80,6 +80,8 @@ async def lollms_detokenize(request: LollmsDeTokenizeRequest):
return {"status":False,"error":str(ex)}
class LollmsGenerateRequest(BaseModel):
model_config = ConfigDict(protected_namespaces=())
prompt: str
model_name: Optional[str] = None
personality: Optional[int] = -1
@ -223,6 +225,7 @@ async def lollms_generate(request: LollmsGenerateRequest):
class LollmsGenerateRequest(BaseModel):
model_config = ConfigDict(protected_namespaces=())
prompt: str
images: List[str]
model_name: Optional[str] = None

View File

@ -9,7 +9,7 @@ description:
"""
from fastapi import APIRouter, Request
from lollms_webui import LOLLMSWebUI
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
from starlette.responses import StreamingResponse
from lollms.types import MSG_OPERATION_TYPE
from lollms.main_config import BaseConfig
@ -28,6 +28,8 @@ lollmsElfServer:LOLLMSWebUI = LOLLMSWebUI.get_instance()
class Identification(BaseModel):
client_id: str
class ModelPost(BaseModel):
model_config = ConfigDict(protected_namespaces=())
client_id: str
model_url: str
# ----------------------- voice ------------------------------