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:
178
178
question using the REFERENCE TEXT below.
179
179
"""
180
180
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.
184
184
"""
185
185
RAG_RESPONSE_PROMPT = (
186
186
_RAG_PROFILE_PROMPT
Original file line number Diff line number Diff line change @@ -56,7 +56,11 @@ async def generate_llm_query_response(
56
56
Only runs if the generate_llm_response flag is set to True.
57
57
Requires "search_results" and "original_language" in the response.
58
58
"""
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
+ ):
60
64
return response
61
65
62
66
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(
302
302
n_similar
303
303
The number of similar contents to retrieve.
304
304
asession
305
- `AsyncSession` object for database POtransactions .
305
+ `AsyncSession` object for database transactions .
306
306
exclude_archived
307
307
Specifies whether to exclude archived content.
308
308
You can’t perform that action at this time.
0 commit comments