ofermend commited on
Commit
d8719e6
·
1 Parent(s): d1c53b9
Files changed (3) hide show
  1. agent.py +1 -1
  2. requirements.txt +3 -2
  3. utils.py +4 -1
agent.py CHANGED
@@ -56,6 +56,7 @@ def create_assistant_tools(cfg):
56
  n_sentences_before = 2, n_sentences_after = 2, lambda_val = 0.005,
57
  vectara_summarizer = summarizer,
58
  include_citations = True,
 
59
  )
60
 
61
  tools_factory = ToolsFactory()
@@ -77,7 +78,6 @@ def initialize_agent(_cfg, agent_progress_callback=None):
77
  - You are a helpful research assistant,
78
  with expertise in finance and complaints from the CFPB (Consumer Financial Protection Bureau),
79
  in conversation with a user.
80
- - For analytical/numeric questions, try to use the cfpb_load_data and other database tools.
81
  - For questions about customers' complaints (the text of the complaint), use the ask_complaints tool.
82
  You only need the query parameter to use this tool, but you can supply other parameters if provided.
83
  Do not include the "References" section in your response.
 
56
  n_sentences_before = 2, n_sentences_after = 2, lambda_val = 0.005,
57
  vectara_summarizer = summarizer,
58
  include_citations = True,
59
+ verbose=False
60
  )
61
 
62
  tools_factory = ToolsFactory()
 
78
  - You are a helpful research assistant,
79
  with expertise in finance and complaints from the CFPB (Consumer Financial Protection Bureau),
80
  in conversation with a user.
 
81
  - For questions about customers' complaints (the text of the complaint), use the ask_complaints tool.
82
  You only need the query parameter to use this tool, but you can supply other parameters if provided.
83
  Do not include the "References" section in your response.
requirements.txt CHANGED
@@ -1,10 +1,11 @@
1
  omegaconf==2.3.0
2
  python-dotenv==1.0.1
3
- streamlit==1.39.0
4
  streamlit_pills==0.3.0
5
  streamlit-feedback==0.1.3
6
  langdetect==1.0.9
7
  langcodes==3.4.0
8
  datasets==2.19.2
9
  uuid==1.30
10
- vectara-agentic==0.1.19
 
 
1
  omegaconf==2.3.0
2
  python-dotenv==1.0.1
3
+ streamlit==1.41.1
4
  streamlit_pills==0.3.0
5
  streamlit-feedback==0.1.3
6
  langdetect==1.0.9
7
  langcodes==3.4.0
8
  datasets==2.19.2
9
  uuid==1.30
10
+ vectara-agentic==0.1.21
11
+ anthropic==0.40.0
utils.py CHANGED
@@ -31,8 +31,11 @@ def thumbs_feedback(feedback, **kwargs):
31
 
32
  def send_amplitude_data(user_query, bot_response, demo_name, feedback=None):
33
  # Send query and response to Amplitude Analytics
 
 
 
34
  data = {
35
- "api_key": os.getenv('AMPLITUDE_TOKEN'),
36
  "events": [{
37
  "device_id": st.session_state.device_id,
38
  "event_type": "submitted_query",
 
31
 
32
  def send_amplitude_data(user_query, bot_response, demo_name, feedback=None):
33
  # Send query and response to Amplitude Analytics
34
+ amplitude_token = os.environ.get('AMPLITUDE_TOKEN', None)
35
+ if amplitude_token is None:
36
+ return
37
  data = {
38
+ "api_key": amplitude_token,
39
  "events": [{
40
  "device_id": st.session_state.device_id,
41
  "event_type": "submitted_query",