pvanand commited on
Commit
04e4009
1 Parent(s): b93fcc8

Update document_generator.py

Browse files
Files changed (1) hide show
  1. document_generator.py +7 -3
document_generator.py CHANGED
@@ -453,12 +453,16 @@ router = APIRouter()
453
  class JsonDocumentResponse(BaseModel):
454
  json_document: Dict
455
 
456
- class MarkdownDocumentRequest(BaseModel):
457
- json_document: Dict
458
  query: str
459
  template: bool = False
460
  images: Optional[List[UploadFile]] = File(None)
461
 
 
 
 
 
462
  MESSAGE_DELIMITER = b"\n---DELIMITER---\n"
463
 
464
  def yield_message(message):
@@ -547,7 +551,7 @@ async def generate_markdown_document_stream_endpoint(request: MarkdownDocumentRe
547
  @cache(expire=600*24*7)
548
  @router.post("/generate-document/json", response_model=JsonDocumentResponse)
549
  async def generate_document_outline_endpoint(
550
- request: MarkdownDocumentRequest = Depends(),
551
  images: List[UploadFile] = File(None)
552
  ):
553
  ai_client = AIClient()
 
453
  class JsonDocumentResponse(BaseModel):
454
  json_document: Dict
455
 
456
+
457
+ class JsonDocumentRequest(BaseModel):
458
  query: str
459
  template: bool = False
460
  images: Optional[List[UploadFile]] = File(None)
461
 
462
+ class MarkdownDocumentRequest(BaseModel):
463
+ json_document: Dict
464
+ query: str
465
+
466
  MESSAGE_DELIMITER = b"\n---DELIMITER---\n"
467
 
468
  def yield_message(message):
 
551
  @cache(expire=600*24*7)
552
  @router.post("/generate-document/json", response_model=JsonDocumentResponse)
553
  async def generate_document_outline_endpoint(
554
+ request: JsonDocumentRequest = Depends(),
555
  images: List[UploadFile] = File(None)
556
  ):
557
  ai_client = AIClient()