LLM-Driven Extraction of Unstructured Data — Built for API Deployments & ETL Pipeline Workflows
Python ai-agentsdata-engineeringdocument-aigenerative-aiidpjson-extractionllmmcp-serverocrpdf-extractionprompt-engineeringstructured-output
Fix indentation in function (#403)
Gayathri9d1e9b857043
diff --git a/prompt-service/src/unstract/prompt_service/main.py b/prompt-service/src/unstract/prompt_service/main.pyindex c2a1fc6ab..801fef9d0 100644--- a/prompt-service/src/unstract/prompt_service/main.py+++ b/prompt-service/src/unstract/prompt_service/main.py@@ -384,33 +384,34 @@ def prompt_processor() -> Any:"Retrieving context from adapter",)- retrieval_strategy = output.get(PSKeys.RETRIEVAL_STRATEGY)+ retrieval_strategy = output.get(PSKeys.RETRIEVAL_STRATEGY)- if retrieval_strategy in {PSKeys.SIMPLE, PSKeys.SUBQUESTION}:- answer, context = run_retrieval(- tool_settings=tool_settings,- output=output,- doc_id=doc_id,- llm=llm,- vector_index=vector_index,- retrieval_type=retrieval_strategy,- )- else:- app.logger.info(- "Invalid retrieval strategy passed: %s", retrieval_strategy- )+ if retrieval_strategy in {PSKeys.SIMPLE, PSKeys.SUBQUESTION}:+ answer, context = run_retrieval(+ tool_settings=tool_settings,+ output=output,+ doc_id=doc_id,+ llm=llm,+ vector_index=vector_index,+ retrieval_type=retrieval_strategy,+ )+ else:+ app.logger.info(+ "Invalid retrieval strategy passed: %s",+ retrieval_strategy,+ )- _publish_log(- log_events_id,- {- "tool_id": tool_id,- "prompt_key": prompt_name,- "doc_name": doc_name,- },- LogLevel.DEBUG,- RunLevel.RUN,- "Retrieved context from adapter",- )+ _publish_log(+ log_events_id,+ {+ "tool_id": tool_id,+ "prompt_key": prompt_name,+ "doc_name": doc_name,+ },+ LogLevel.DEBUG,+ RunLevel.RUN,+ "Retrieved context from adapter",+ )_publish_log(log_events_id,