Skip to content

Commit

Permalink
add optional type
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnJyong committed Jun 14, 2024
1 parent 84a3015 commit 281ade3
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions api/core/rag/extractor/entity/extract_setting.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from typing import Optional

from pydantic import BaseModel, ConfigDict

from models.dataset import Document
Expand Down Expand Up @@ -42,10 +44,10 @@ class ExtractSetting(BaseModel):
Model class for provider response.
"""
datasource_type: str
upload_file: UploadFile = None
notion_info: NotionInfo = None
website_info: WebsiteInfo = None
document_model: str = None
upload_file: Optional[UploadFile]
notion_info: Optional[NotionInfo]
website_info: Optional[WebsiteInfo]
document_model: Optional[str]
model_config = ConfigDict(arbitrary_types_allowed=True)

def __init__(self, **data) -> None:
Expand Down

0 comments on commit 281ade3

Please sign in to comment.