Spaces:
Running
Running
axeronis commited on
Commit ·
2abcc5f
1
Parent(s): 3cca0f6
fix: smart-correct AttributeError - use ai_settings instead of tenant.playbook
Browse files- backend/app/api/demo.py +2 -2
backend/app/api/demo.py
CHANGED
|
@@ -145,7 +145,7 @@ async def smart_correct(
|
|
| 145 |
# Get FULL settings context
|
| 146 |
ai_settings = tenant.ai_settings or {}
|
| 147 |
ai_identity = ai_settings.get("ai_identity", {})
|
| 148 |
-
playbook =
|
| 149 |
|
| 150 |
# Build comprehensive context
|
| 151 |
current_config = f"""
|
|
@@ -171,7 +171,7 @@ async def smart_correct(
|
|
| 171 |
|
| 172 |
[ДРУГОЕ]
|
| 173 |
- Идеальный клиент: {ai_settings.get('ideal_customer_profile', '(не задано)')[:200]}
|
| 174 |
-
- Описание бизнеса: {
|
| 175 |
"""
|
| 176 |
|
| 177 |
# Build the analysis prompt
|
|
|
|
| 145 |
# Get FULL settings context
|
| 146 |
ai_settings = tenant.ai_settings or {}
|
| 147 |
ai_identity = ai_settings.get("ai_identity", {})
|
| 148 |
+
playbook = ai_settings.get("playbook", {})
|
| 149 |
|
| 150 |
# Build comprehensive context
|
| 151 |
current_config = f"""
|
|
|
|
| 171 |
|
| 172 |
[ДРУГОЕ]
|
| 173 |
- Идеальный клиент: {ai_settings.get('ideal_customer_profile', '(не задано)')[:200]}
|
| 174 |
+
- Описание бизнеса: {ai_settings.get('business_description', '(не задано)')[:200]}
|
| 175 |
"""
|
| 176 |
|
| 177 |
# Build the analysis prompt
|