Spaces:
Sleeping
Sleeping
Update data_planner.py
Browse files- data_planner.py +6 -3
data_planner.py
CHANGED
|
@@ -2,7 +2,7 @@ import json
|
|
| 2 |
from openai_client import ask_gpt
|
| 3 |
from schema_map import schema # 👈 Import the full schema
|
| 4 |
|
| 5 |
-
def determine_data_requirements(user_prompt: str, company_code: str):
|
| 6 |
system_msg = {
|
| 7 |
"role": "system",
|
| 8 |
"content": (
|
|
@@ -20,8 +20,11 @@ def determine_data_requirements(user_prompt: str, company_code: str):
|
|
| 20 |
|
| 21 |
user_msg = {
|
| 22 |
"role": "user",
|
| 23 |
-
"content":
|
| 24 |
-
|
|
|
|
|
|
|
|
|
|
| 25 |
|
| 26 |
try:
|
| 27 |
result = ask_gpt([system_msg, user_msg])
|
|
|
|
| 2 |
from openai_client import ask_gpt
|
| 3 |
from schema_map import schema # 👈 Import the full schema
|
| 4 |
|
| 5 |
+
def determine_data_requirements(user_prompt: str, company_code: str, user_id: str):
|
| 6 |
system_msg = {
|
| 7 |
"role": "system",
|
| 8 |
"content": (
|
|
|
|
| 20 |
|
| 21 |
user_msg = {
|
| 22 |
"role": "user",
|
| 23 |
+
"content": (
|
| 24 |
+
f"User question: {user_prompt}\n"
|
| 25 |
+
f"CompanyCode: {company_code}\n"
|
| 26 |
+
f"UserID: {user_id}"
|
| 27 |
+
)
|
| 28 |
|
| 29 |
try:
|
| 30 |
result = ask_gpt([system_msg, user_msg])
|