Spaces:
Running
Running
Update document_generator.py
Browse files- document_generator.py +6 -4
document_generator.py
CHANGED
@@ -456,8 +456,8 @@ class JsonDocumentResponse(BaseModel):
|
|
456 |
class JsonDocumentRequest(BaseModel):
|
457 |
query: str
|
458 |
template: bool = False
|
459 |
-
images: Optional[List[UploadFile]] = None
|
460 |
-
documents: Optional[List[UploadFile]] = None
|
461 |
conversation_id: str = ""
|
462 |
|
463 |
class Config:
|
@@ -535,8 +535,10 @@ async def generate_document_stream(document_generator: DocumentGenerator, docume
|
|
535 |
|
536 |
db_manager.update_database("elevatics", query, markdown_document)
|
537 |
|
538 |
-
@router.post("/generate-document/
|
539 |
-
async def
|
|
|
|
|
540 |
ai_client = AIClient()
|
541 |
document_generator = DocumentGenerator(ai_client)
|
542 |
|
|
|
456 |
class JsonDocumentRequest(BaseModel):
|
457 |
query: str
|
458 |
template: bool = False
|
459 |
+
images: Optional[List[Union[UploadFile, str]]] = None
|
460 |
+
documents: Optional[List[Union[UploadFile, str]]] = None
|
461 |
conversation_id: str = ""
|
462 |
|
463 |
class Config:
|
|
|
535 |
|
536 |
db_manager.update_database("elevatics", query, markdown_document)
|
537 |
|
538 |
+
@router.post("/generate-document/json", response_model=JsonDocumentResponse)
|
539 |
+
async def generate_document_outline_endpoint(
|
540 |
+
request: JsonDocumentRequest = Depends()
|
541 |
+
):
|
542 |
ai_client = AIClient()
|
543 |
document_generator = DocumentGenerator(ai_client)
|
544 |
|