testing new features

This commit is contained in:
2026-07-22 12:12:09 +03:00
parent 3cc8e94863
commit 9ed71cbc58
15 changed files with 1201 additions and 40 deletions
+21 -1
View File
@@ -7,6 +7,10 @@ ANALYZE_PROMPT = """
### Прогноз на {months} месяцев:
{forecast_json}
### Валюта:
Базовая валюта модели: {base_currency}
Отображаемая валюта: {display_currency}
Дай анализ по пунктам:
1. Общее финансовое состояние
2. Тренд денежного потока (рост/падение)
@@ -23,6 +27,10 @@ ADVICE_PROMPT = """
### Прогноз:
{forecast_json}
### Валюта:
Базовая валюта модели: {base_currency}
Отображаемая валюта: {display_currency}
Вопрос пользователя: {question}
Ответь как опытный финансовый консультант.
@@ -34,13 +42,25 @@ SCENARIO_COMPARISON_PROMPT = """
### Результаты сценариев:
{scenarios_json}
### Валюта:
Базовая валюта модели: {base_currency}
Отображаемая валюта: {display_currency}
Дай рекомендацию: какой сценарий наиболее вероятен и почему.
"""
def format_context(model_json: str, forecast_json: str, months: int = 12) -> str:
def format_context(
model_json: str,
forecast_json: str,
months: int = 12,
base_currency: str = "RUB",
display_currency: str = "RUB",
) -> str:
return ANALYZE_PROMPT.format(
model_json=model_json,
forecast_json=forecast_json,
months=months,
base_currency=base_currency,
display_currency=display_currency,
)