Skip to content

Commit

Permalink
selected cached question and answers 10% probability.
Browse files Browse the repository at this point in the history
  • Loading branch information
acer-king committed Oct 3, 2024
1 parent dcaccc8 commit 2a270c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion validators/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ async def wrapper(*args, **kwargs):
model = args[3]
questions_answers = cache_service.get_all_question_to_answers(provider=provider, model=model)
if not questions_answers or random.random() > 0.1:
# create question using openai service
# if no cached question and answers, then create question using openai service with probability 90%
query_syn = await func(*args, **kwargs)
return query_syn
# select one of questions_answers from cache database.
Expand Down

0 comments on commit 2a270c3

Please sign in to comment.