File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed
Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -178,9 +178,9 @@ def get_prompt(cls) -> str:
178178 question using the REFERENCE TEXT below.
179179"""
180180RETRY_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"""
185185RAG_RESPONSE_PROMPT = (
186186 _RAG_PROFILE_PROMPT
Original file line number Diff line number Diff 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 :
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments