Skip to content

Commit

Permalink
fix retry in query handler
Browse files Browse the repository at this point in the history
  • Loading branch information
morganmcg1 committed Jan 9, 2025
1 parent 67a7005 commit a3d0714
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wandbot/rag/query_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def _load_chain(self, model: ChatOpenAI) -> Runnable:

# Add retry specifically for validation errors
query_enhancer_chain = base_query_enhancer.with_retry(
retry_if_exception_type=ValidationError,
retry_if_exception_type=(ValidationError,),
wait_exponential_jitter=True, # Add jitter to prevent thundering herd
stop_after_attempt=6,
)
Expand Down

0 comments on commit a3d0714

Please sign in to comment.