Skip to content

Commit

Permalink
Fixed indentation issue (#382)
Browse files Browse the repository at this point in the history
  • Loading branch information
Deepak-Kesavan authored Jun 3, 2024
1 parent 828162c commit dabda23
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions prompt-service/src/unstract/prompt_service/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,19 +378,21 @@ 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,
Expand Down

0 comments on commit dabda23

Please sign in to comment.