Skip to content

Commit

Permalink
Update the task for entry extraction using llm for mock;
Browse files Browse the repository at this point in the history
  • Loading branch information
ranjan-stha committed Dec 3, 2024
1 parent d348c52 commit 4f6a25b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion analysis_module/mockserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,12 @@ def process_entry_extraction_mock(body) -> Any:
except Exception:
logger.error("Could not send data to callback url", exc_info=True)

def entry_extraction_llm_mock(body) -> Any:
process_entry_extraction_llm_mock.apply_async(
args=(body,), countdown=2
) # Trigger task after 2 seconds
return json.dumps({"status": "Successfully received the request."}), 200

@shared_task
def process_entry_extraction_llm_mock(body) -> Any:
documents = body.get("documents") or []
Expand Down Expand Up @@ -616,7 +622,7 @@ def process_entry_classification_llm_mock(body) -> Any:
"geolocation": geolocation_mock_model,
"text-extraction": text_extraction_mock,
"entry-extraction-classification": entry_extraction_mock,
"entry-extraction-classification-llm": entry_classification_llm_mock,
"entry-extraction-classification-llm": entry_extraction_llm_mock,
"entry-classification": entry_classification_mock,
"entry-classification-llm": entry_classification_llm_mock
}
Expand Down

0 comments on commit 4f6a25b

Please sign in to comment.