Add api server code and workflow
This commit is contained in:
50
src/schemas/models.py
Normal file
50
src/schemas/models.py
Normal file
@@ -0,0 +1,50 @@
|
||||
from pydantic import BaseModel, Field
|
||||
from typing import Optional
|
||||
|
||||
class ProcessRequest_chat(BaseModel):
|
||||
sessionId: str = Field(..., max_length=64)
|
||||
timeStamp: str = Field(..., max_length=32)
|
||||
text: str = Field(...)
|
||||
|
||||
class ProcessResponse_chat(BaseModel):
|
||||
sessionId: str = Field(..., max_length=64)
|
||||
timeStamp: str = Field(..., max_length=32)
|
||||
outputText: str = Field(...)
|
||||
nextStage: str = Field(..., max_length=32)
|
||||
nextStageCode: str = Field(..., max_length=4)
|
||||
code: str = Field(..., max_length=4)
|
||||
msg: Optional[str] = None
|
||||
|
||||
class ProcessRequest_get(BaseModel):
|
||||
sessionId: str = Field(..., max_length=64)
|
||||
timeStamp: str = Field(..., max_length=32)
|
||||
key: str = Field(...)
|
||||
|
||||
class ProcessResponse_get(BaseModel):
|
||||
sessionId: str = Field(..., max_length=64)
|
||||
timeStamp: str = Field(..., max_length=32)
|
||||
value: str = Field(...)
|
||||
code: str = Field(..., max_length=4)
|
||||
msg: Optional[str] = None
|
||||
|
||||
class ProcessRequest_set(BaseModel):
|
||||
sessionId: str = Field(..., max_length=64)
|
||||
timeStamp: str = Field(..., max_length=32)
|
||||
key: str = Field(...)
|
||||
value: str = Field(...)
|
||||
|
||||
class ProcessResponse_set(BaseModel):
|
||||
sessionId: str = Field(..., max_length=64)
|
||||
timeStamp: str = Field(..., max_length=32)
|
||||
code: str = Field(..., max_length=4)
|
||||
msg: Optional[str] = None
|
||||
|
||||
class ProcessRequest_delete_session(BaseModel):
|
||||
sessionId: str = Field(..., max_length=64)
|
||||
timeStamp: str = Field(..., max_length=32)
|
||||
|
||||
class ProcessResponse_delete_session(BaseModel):
|
||||
sessionId: str = Field(..., max_length=64)
|
||||
timeStamp: str = Field(..., max_length=32)
|
||||
code: str = Field(..., max_length=4)
|
||||
msg: Optional[str] = None
|
||||
Reference in New Issue
Block a user