mirror of
https://github.com/ParisNeo/lollms.git
synced 2024-12-18 20:27:58 +00:00
fixed warning
This commit is contained in:
parent
7e414334d9
commit
e37aca6f63
@ -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 ------------------------------
|
||||
|
@ -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
|
||||
|
@ -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 ------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user