Clean up the code.

This commit is contained in:
Cristiano Ferreira
2024-04-10 22:21:30 +01:00
parent f1d2ec3bf8
commit 6e2355ee4c
24 changed files with 36 additions and 6397 deletions

View File

@@ -1,17 +1,17 @@
import queue
import string
import nltk
import random
import re
import string
import uuid
import nltk
from wonderwords import RandomWord
from helper.api_messages import QuestionType
from helper.constants import *
from helper.firebase_helper import get_all
from helper.openai_interface import make_openai_instruct_call, make_openai_call
from helper.token_counter import count_tokens
from helper.constants import *
from wonderwords import RandomWord
nltk.download('words')
@@ -84,6 +84,7 @@ def gen_reading_passage_3(topic, req_exercises, difficulty):
"difficulty": difficulty
}
def divide_number_into_parts(number, parts):
if number < parts:
return None