File tree Expand file tree Collapse file tree 2 files changed +0
-5
lines changed Expand file tree Collapse file tree 2 files changed +0
-5
lines changed Original file line number Diff line number Diff line change @@ -177,7 +177,6 @@ async def wrapper(
177177 metadata = create_langfuse_metadata (
178178 query_id = response .query_id , user_id = query_refined .user_id
179179 )
180-
181180 response = await _check_align_score (response , metadata )
182181 return response
183182
@@ -194,7 +193,6 @@ async def _check_align_score(
194193 Only runs if the generate_llm_response flag is set to True.
195194 Requires "llm_response" and "search_results" in the response.
196195 """
197-
198196 if isinstance (response , QueryResponseError ) or response .llm_response is None :
199197 return response
200198
@@ -216,7 +214,6 @@ async def _check_align_score(
216214 logger .warning ("No alignment score method specified." )
217215 return response
218216 elif ALIGN_SCORE_METHOD == "AlignScore" :
219-
220217 if ALIGN_SCORE_API is not None :
221218 align_score = await _get_alignScore_score (ALIGN_SCORE_API , align_score_data )
222219 else :
@@ -276,7 +273,6 @@ async def _get_alignScore_score(
276273
277274 result = await resp .json ()
278275 logger .info (f"AlignScore result: { result } " )
279-
280276 alignment_score = AlignmentScore (score = result ["alignscore" ], reason = "N/A" )
281277
282278 return alignment_score
Original file line number Diff line number Diff line change @@ -232,7 +232,6 @@ async def search(
232232
233233 if type (response ) is QueryResponse :
234234 return response
235-
236235 elif type (response ) is QueryResponseError :
237236 return JSONResponse (
238237 status_code = status .HTTP_400_BAD_REQUEST , content = response .model_dump ()
You can’t perform that action at this time.
0 commit comments