pvanand commited on
Commit
036bd38
1 Parent(s): 17d0d22

Update document_generator.py

Browse files
Files changed (1) hide show
  1. 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/markdown-stream")
539
- async def generate_markdown_document_stream_endpoint(request: MarkdownDocumentRequest):
 
 
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