ofermend commited on
Commit
4f39567
·
1 Parent(s): 125794f
Files changed (1) hide show
  1. agent.py +5 -3
agent.py CHANGED
@@ -31,7 +31,7 @@ def create_assistant_tools(cfg, agent_config):
31
 
32
  vec_factory = VectaraToolFactory(vectara_api_key=cfg.api_key,
33
  vectara_corpus_key=cfg.corpus_key)
34
- summarizer = 'vectara-experimental-summary-ext-2023-12-11-med-omni'
35
  ask_hackernews = vec_factory.create_rag_tool(
36
  tool_name = "ask_hackernews",
37
  tool_description = """
@@ -39,10 +39,11 @@ def create_assistant_tools(cfg, agent_config):
39
  """,
40
  tool_args_schema = QueryHackerNews,
41
  reranker = "multilingual_reranker_v1", rerank_k = 100,
42
- n_sentences_before = 2, n_sentences_after = 2, lambda_val = 0.005,
43
  summary_num_results = 10,
44
  vectara_summarizer = summarizer,
45
  include_citations = True,
 
46
  )
47
 
48
  def get_top_stories(
@@ -160,7 +161,8 @@ def initialize_agent(_cfg, agent_progress_callback = None):
160
  tools=create_assistant_tools(_cfg, agent_config),
161
  topic="hacker news",
162
  custom_instructions=bot_instructions,
163
- agent_progress_callback=agent_progress_callback
 
164
  )
165
  agent.report()
166
  return agent
 
31
 
32
  vec_factory = VectaraToolFactory(vectara_api_key=cfg.api_key,
33
  vectara_corpus_key=cfg.corpus_key)
34
+ summarizer = 'vectara-summary-ext-24-05-med-omni'
35
  ask_hackernews = vec_factory.create_rag_tool(
36
  tool_name = "ask_hackernews",
37
  tool_description = """
 
39
  """,
40
  tool_args_schema = QueryHackerNews,
41
  reranker = "multilingual_reranker_v1", rerank_k = 100,
42
+ n_sentences_before = 2, n_sentences_after = 2, lambda_val = 0.0,
43
  summary_num_results = 10,
44
  vectara_summarizer = summarizer,
45
  include_citations = True,
46
+ verbose=True
47
  )
48
 
49
  def get_top_stories(
 
161
  tools=create_assistant_tools(_cfg, agent_config),
162
  topic="hacker news",
163
  custom_instructions=bot_instructions,
164
+ agent_progress_callback=agent_progress_callback,
165
+ verbose=True
166
  )
167
  agent.report()
168
  return agent