Update environment configuration and enhance API endpoints

- Changed ANALYSIS_SERVICE_URL to localhost for local development.
- Updated ANALYSIS_AUTH_TOKEN and APP_ID for improved security.
- Added new functions in endpoints.py for form extraction and stage code normalization.
- Enhanced chat handling to support form updates and improved event streaming.
- Updated models to include new fields for form update handling.
This commit is contained in:
Xin Wang
2026-06-17 11:36:42 +08:00
parent 1ea1d86d5a
commit ffd3bf0385
4 changed files with 159 additions and 95 deletions

View File

@@ -5,11 +5,13 @@ class ProcessRequest_chat(BaseModel):
sessionId: str = Field(..., max_length=64)
timeStamp: str = Field(..., max_length=32)
text: str = Field(...)
needFormUpdate: bool = False
class ProcessResponse_chat(BaseModel):
sessionId: str = Field(..., max_length=64)
timeStamp: str = Field(..., max_length=32)
outputText: str = Field(...)
formUpdate: str = Field(default="")
nextStage: str = Field(..., max_length=32)
nextStageCode: str = Field(..., max_length=4)
code: str = Field(..., max_length=4)
@@ -19,6 +21,7 @@ class ProcessRequest_get(BaseModel):
sessionId: str = Field(..., max_length=64)
timeStamp: str = Field(..., max_length=32)
key: str = Field(...)
includeInputInfo: bool = False
class ProcessResponse_get(BaseModel):
sessionId: str = Field(..., max_length=64)
@@ -32,6 +35,7 @@ class ProcessRequest_set(BaseModel):
timeStamp: str = Field(..., max_length=32)
key: str = Field(...)
value: str = Field(...)
includeInputInfo: bool = False
class ProcessResponse_set(BaseModel):
sessionId: str = Field(..., max_length=64)