Update app.py
Browse files
app.py
CHANGED
|
@@ -34,9 +34,11 @@ def analyze_attrition_with_llm(df_dict, hr_query):
|
|
| 34 |
employees_data = {row["Employee"].strip(): row["Sentiment"] for _, row in df.iterrows()}
|
| 35 |
|
| 36 |
prompt = f"HR Query: {hr_query}\nEmployees Data: {json.dumps(employees_data, indent=2)}"
|
| 37 |
-
response = client.chat.completions.create(
|
|
|
|
| 38 |
model="gpt-4o-mini",
|
| 39 |
-
messages=[{"role": "user", "content": prompt}],
|
|
|
|
| 40 |
functions=[
|
| 41 |
{
|
| 42 |
"name": "predict_attrition_risk",
|
|
|
|
| 34 |
employees_data = {row["Employee"].strip(): row["Sentiment"] for _, row in df.iterrows()}
|
| 35 |
|
| 36 |
prompt = f"HR Query: {hr_query}\nEmployees Data: {json.dumps(employees_data, indent=2)}"
|
| 37 |
+
#response = client.chat.completions.create(
|
| 38 |
+
response = client.responses.create(
|
| 39 |
model="gpt-4o-mini",
|
| 40 |
+
#messages=[{"role": "user", "content": prompt}],
|
| 41 |
+
input=[{"role": "user", "content": prompt}],
|
| 42 |
functions=[
|
| 43 |
{
|
| 44 |
"name": "predict_attrition_risk",
|