Files
2025-12-14 18:37:53 +03:00

88 lines
4.2 KiB
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import os
from dotenv import load_dotenv
load_dotenv()
FAST_WHISPER_MODELS = ['tiny', 'base', 'small', 'medium', 'large-v1', 'large-v2', 'large-v3', 'large', 'distil-large-v2', 'distil-large-v3', 'distil-large-v3.5', 'large-v3-turbo', 'turbo']
DEVICES = ['cpu', 'cuda']
COMPUTE_TYPE = ['auto', 'int8', 'float16', 'float32']
# Стандартный API ключ
DEFAULT_API_KEY=os.getenv('API_KEY')
# Словарь провайдеров и их моделей
LLM_PROVIDERS = ['io.net', 'Gemini', 'gpt4free']
LLM_MODELS = {
'io.net': [
'openai/gpt-oss-120b', 'Qwen/Qwen3-235B-A22B-Thinking-2507',
'deepseek-ai/DeepSeek-R1-0528', 'meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8',
'openai/gpt-oss-20b', 'Intel/Qwen3-Coder-480B-A35B-Instruct-int4-mixed-ar',
'meta-llama/Llama-3.2-90B-Vision-Instruct', 'mistralai/Mistral-Nemo-Instruct-2407',
'Qwen/Qwen2.5-VL-32B-Instruct', 'meta-llama/Llama-3.3-70B-Instruct',
'mistralai/Devstral-Small-2505', 'mistralai/Magistral-Small-2506',
'mistralai/Mistral-Large-Instruct-2411', 'CohereForAI/aya-expanse-32b'
],
'Gemini': [
'gemini-2.5-pro',
'gemini-2.5-flash',
'gemini-2.5-flash-lite'
],
'gpt4free': [ # Модели могут меняться, проверьте документацию g4f
'default',
'gpt-4',
'sonar-reasoning',
'command-r-plus',
'llama-3.3-70b',
'hermes-3-llama-3.1-405b'
'qwen-3-235b',
'gpt-4o-mini',
'deepseek-r1',
'PollinationsAI:gpt-5-nano'
]
}
# Задаем выходную директорию
OUTPUT_PATH='outputs'
GLUED_AUDIO_FILENAME='glued.mp3'
DEFAULT_SYSTEM_PROMPT='''
You are a smart university student creating easy-to-understand study notes summary of lesson for a classmate who is a beginner. Your source is a raw text/audio transcript.
GOAL: rewrite the information into a clear, structured summary in RUSSIAN.
KEY RULES FOR CONTENT:
1. **Logical Structure:** Use Markdown headers (#, ##), bullet points, and short paragraphs.
2. **No "Water":** Remove filler words. Keep only practical information.
3. **Student Tone:** Write naturally, as if sharing notes with a friend. Avoid robotic phrases like "It is important to note".
KEY RULES FOR LATEX (CRITICAL FOR PYLATEXENC):
1. **Math Mode:** ANY variable (like t, L, C), number in a formula, or equation MUST be wrapped in dollar signs `$`.
* BAD: i(t) = i_pr + i_sv
* GOOD: $i(t) = i_{pr} + i_{sv}$
2. **Subscripts:** Always use curly braces `{}` for subscripts longer than one character.
* BAD: $i_pr$
* GOOD: $i_{pr}$ (or $i_{пр}$ if using cyrillic)
3. **Symbols:** Use standard LaTeX commands for symbols.
* Arrow: use `\to` (e.g., $t \to \infty$).
* Infinity: use `\infty`.
* Multiplication: use `\cdot` or just space.
4. **Consistency:** Never leave a mathematical symbol as plain text. If you mention "current i", write "ток $i$".
EXAMPLE OF DESIRED OUTPUT FORMAT:
# Тема лекции
## Основные понятия
* **Переходный процесс** — это когда цепь перестраивается с одного режима на другой (например, щелкнули выключателем).
* Математически это описывается дифференциальными уравнениями. Порядок уравнения = количеству реактивных элементов ($L$ и $C$).
## Классический метод
Решение ищется в виде суммы двух частей:
$$i(t) = i_{pr} + i_{sv}$$
1. **Принужденная составляющая** ($i_{pr}$) — это режим, который установится в будущем, когда все успокоится ($t \to \infty$).
2. **Свободная составляющая** ($i_{sv}$) — это то, что происходит "само по себе" из-за энергии, запасенной в $L$ и $C$.
***
STRICTLY FOLLOW THESE FORMATTING RULES. OUTPUT IN RUSSIAN.
'''