MariaFilipkowska commited on
Commit
d6b2bb5
·
verified ·
1 Parent(s): 3e5dcd4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -28,7 +28,7 @@ print("Loading LLM...")
28
  chat = ChatMistralAI(
29
  model="mistral-medium-2505",
30
  temperature=0.1,
31
- max_retries=10,
32
  mistral_api_key = os.getenv("Mistral")
33
  )
34
  print(f"Model {chat.model} downloaded!")
@@ -53,7 +53,7 @@ def get_ref_content(path: str) -> str | object:
53
  if path.endswith('mp3') or path.startswith('https://www.youtube.com/'):
54
  file = librosa.load(path)
55
  elif path.endswith('.xlsx') or path.endswith('.xls'):
56
- file = pd.read_excel(path).to_csv()
57
  elif path.startswith('http'):
58
  file = requests.get(path).content
59
  else:
@@ -112,7 +112,7 @@ extract_text_tool = Tool(
112
  )
113
 
114
  tools = [get_file_path_tool, get_content_tool, extract_text_tool, search_web_tool]
115
- chat_with_tools = chat.bind_tools(tools, parallel_tool_calls=False)
116
 
117
 
118
  # Generate the AgentState and Agent graph
 
28
  chat = ChatMistralAI(
29
  model="mistral-medium-2505",
30
  temperature=0.1,
31
+ max_retries=3,
32
  mistral_api_key = os.getenv("Mistral")
33
  )
34
  print(f"Model {chat.model} downloaded!")
 
53
  if path.endswith('mp3') or path.startswith('https://www.youtube.com/'):
54
  file = librosa.load(path)
55
  elif path.endswith('.xlsx') or path.endswith('.xls'):
56
+ file = pd.read_excel(path).T.to_json()
57
  elif path.startswith('http'):
58
  file = requests.get(path).content
59
  else:
 
112
  )
113
 
114
  tools = [get_file_path_tool, get_content_tool, extract_text_tool, search_web_tool]
115
+ chat_with_tools = chat.bind_tools(tools, parallel_tool_calls=True)
116
 
117
 
118
  # Generate the AgentState and Agent graph