Skip to content

Commit 204897b

Browse files
committed
Translate comments in llm.py to English for better clarity
1 parent d739de6 commit 204897b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

services/llm.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
RETRY_DELAY = 5 # Icrease delay for each retry
1515

1616

17-
# Локальный генератор
17+
# Local plan generator
1818
def generate_local_plan(topic: str) -> list:
1919
"""Generate a basic study plan without using API"""
2020
logger.info("Using local plan generator for topic: %s", topic)
@@ -37,7 +37,7 @@ def generate_local_plan(topic: str) -> list:
3737

3838
async def generate_study_plan(topic: str) -> list:
3939
"""Generate a study plan using OpenAI API or fallback to local generation"""
40-
# Проверка наличия API ключа
40+
# Check if OpenAI API key is set
4141
if not OPENAI_API_KEY:
4242
logger.warning("OpenAI API key is missing, using local generator")
4343
return generate_local_plan(topic)
@@ -61,7 +61,7 @@ async def generate_study_plan(topic: str) -> list:
6161
except RateLimitError as e:
6262
logger.warning("Rate limit error: %s. Retrying in %s seconds...",
6363
str(e), RETRY_DELAY * (attempt + 1))
64-
await asyncio.sleep(RETRY_DELAY * (attempt + 1)) # Exponential backoff
64+
await asyncio.sleep(RETRY_DELAY * (attempt + 1))
6565

6666
except (APIError, OpenAIError) as e:
6767
logger.error("OpenAI API error: %s", str(e))

0 commit comments

Comments
 (0)