Skip to content

Commit 3858453

Browse files
committed
Cleanups
1 parent 3bde173 commit 3858453

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

core_backend/app/llm_call/llm_prompts.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,9 @@ def get_prompt(cls) -> str:
178178
question using the REFERENCE TEXT below.
179179
"""
180180
RETRY_PROMPT_SUFFIX = """
181-
If the response above is not aligned with the question, please rectify this by considering \
182-
the following reason(s) for misalignment: "{failure_reason}". Make necessary adjustments \
183-
to ensure the answer is aligned with the question.
181+
If the response above is not aligned with the question, please rectify this by \
182+
considering the following reason(s) for misalignment: "{failure_reason}".
183+
Make necessary adjustments to ensure the answer is aligned with the question.
184184
"""
185185
RAG_RESPONSE_PROMPT = (
186186
_RAG_PROFILE_PROMPT

core_backend/app/llm_call/process_output.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,11 @@ async def generate_llm_query_response(
5656
Only runs if the generate_llm_response flag is set to True.
5757
Requires "search_results" and "original_language" in the response.
5858
"""
59-
if isinstance(response, QueryResponseError) and not metadata["failure_reason"]:
59+
if (
60+
isinstance(response, QueryResponseError)
61+
and metadata
62+
and not metadata["failure_reason"]
63+
):
6064
return response
6165

6266
if response.search_results is None:

core_backend/app/question_answer/routers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ async def get_search_response(
302302
n_similar
303303
The number of similar contents to retrieve.
304304
asession
305-
`AsyncSession` object for database POtransactions.
305+
`AsyncSession` object for database transactions.
306306
exclude_archived
307307
Specifies whether to exclude archived content.
308308

0 commit comments

Comments
 (0)