heymenn commited on
Commit
6c47083
·
1 Parent(s): 38f4809

fix bug extract_text_from_url

Browse files
Files changed (1) hide show
  1. api/docs.py +5 -1
api/docs.py CHANGED
@@ -651,10 +651,14 @@ async def extract_requirements_from_docs(req: ExtractRequirementsRequest, llm_ro
651
 
652
  # ======================================================================================================================================================================================
653
 
 
 
 
654
  @router.post("/extract_text_from_url")
655
- async def extract_text_from_url(url: str, http_client: AsyncClient = Depends(get_http_client)) -> dict:
656
  """Extract text from a given document URL and return the text content."""
657
 
 
658
  logging.info(f"Extracting text from URL: {url}")
659
 
660
  try:
 
651
 
652
  # ======================================================================================================================================================================================
653
 
654
+ class URLRequest(BaseModel):
655
+ url: str
656
+
657
  @router.post("/extract_text_from_url")
658
+ async def extract_text_from_url(data: URLRequest, http_client: AsyncClient = Depends(get_http_client)) -> dict:
659
  """Extract text from a given document URL and return the text content."""
660
 
661
+ url = data.url
662
  logging.info(f"Extracting text from URL: {url}")
663
 
664
  try: