Spaces:
Sleeping
Sleeping
update json with history when calling chat_with_mistral()
Browse files- excel_chat.py +3 -1
excel_chat.py
CHANGED
@@ -6,6 +6,7 @@ import pandas as pd
|
|
6 |
import numpy as np
|
7 |
from groq import Groq
|
8 |
import anthropic
|
|
|
9 |
|
10 |
|
11 |
def ask_llm(query, input, client_index):
|
@@ -69,7 +70,8 @@ def filter_df(df, column_name, keywords):
|
|
69 |
filtered_df = df
|
70 |
return filtered_df
|
71 |
|
72 |
-
def chat_with_mistral(source_cols, dest_col, prompt, excel_file, url, search_col, keywords, client):
|
|
|
73 |
print(f'xlsxfile = {excel_file}')
|
74 |
df = pd.read_excel(excel_file)
|
75 |
df[dest_col] = ""
|
|
|
6 |
import numpy as np
|
7 |
from groq import Groq
|
8 |
import anthropic
|
9 |
+
from user_management import update_json
|
10 |
|
11 |
|
12 |
def ask_llm(query, input, client_index):
|
|
|
70 |
filtered_df = df
|
71 |
return filtered_df
|
72 |
|
73 |
+
def chat_with_mistral(source_cols, dest_col, prompt, excel_file, url, search_col, keywords, client, user):
|
74 |
+
update_json(user, prompt, keywords)
|
75 |
print(f'xlsxfile = {excel_file}')
|
76 |
df = pd.read_excel(excel_file)
|
77 |
df[dest_col] = ""
|