36 lines
778 B
Python
36 lines
778 B
Python
from pydantic import BaseModel
|
|
from typing import Optional
|
|
|
|
class ChatRequest(BaseModel):
|
|
message: str
|
|
session_id: str
|
|
persona_id: Optional[str] = "default"
|
|
|
|
class ChatResponse(BaseModel):
|
|
reply: str
|
|
session_id: str
|
|
image_prompt: Optional[str] = None
|
|
|
|
class PersonaCreate(BaseModel):
|
|
persona_id: str
|
|
name: str
|
|
emoji: str = "🤖"
|
|
description: str = ""
|
|
prompt: str
|
|
sd_enabled: bool = False
|
|
lora_name: str = ""
|
|
lora_weight: float = 0.8
|
|
appearance_tags: str = ""
|
|
|
|
class PersonaResponse(BaseModel):
|
|
persona_id: str
|
|
name: str
|
|
emoji: str
|
|
description: str
|
|
prompt: str
|
|
custom: bool = False
|
|
sd_enabled: bool = False
|
|
lora_name: str = ""
|
|
lora_weight: float = 0.8
|
|
appearance_tags: str = ""
|