-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from davidjnevin/add_fastapi_cleanchat_endpoint
Add fastapi cleanchat endpoint
- Loading branch information
Showing
7 changed files
with
103 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
src/chatcleaner/adapters/entrypoints/api/v1/schemas_cleaning.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import datetime | ||
|
||
from pydantic import BaseModel | ||
|
||
|
||
class CleaningIn(BaseModel): | ||
body: str | ||
|
||
|
||
class CleaningOut(BaseModel): | ||
uuid: str | ||
chat: str | ||
cleaned_chat: str | ||
created_at: datetime.datetime | ||
updated_at: datetime.datetime | ||
|
||
|
||
class AllCleaningsOut(BaseModel): | ||
result: list[CleaningOut] | ||
|
||
|
||
class CleaningNotFound(BaseModel): | ||
result: str | ||
|
||
|
||
class SingleCleaningOut(BaseModel): | ||
result: CleaningOut | ||
|
||
|
||
class CleanedChatOut(BaseModel): | ||
uuid: str | ||
cleaned_chat: str |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters