ofermend commited on
Commit
7fba95a
1 Parent(s): dee34c5
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -47,7 +47,6 @@ def create_tools(cfg):
47
  class QueryTranscriptsArgs(BaseModel):
48
  query: str = Field(..., description="The user query.")
49
  year: int = Field(..., description=f"The year. an integer between {min(years)} and {max(years)}.")
50
- quarter: int = Field(..., description="The quarter. an integer between 1 and 4.")
51
  ticker: str = Field(..., description=f"The company ticker. Must be a valid ticket symbol from the list {tickers.keys()}.")
52
 
53
  tools_factory = ToolsFactory(vectara_api_key=cfg.api_key,
@@ -57,12 +56,12 @@ def create_tools(cfg):
57
  tool_name = "ask_transcripts",
58
  tool_description = """
59
  Given a company name and year,
60
- returns a response (str) to a user question about a company, based on analyst call transcripts about the company's financial reports for that year and quarter.
61
  You can ask this tool any question about the compaany including risks, opportunities, financial performance, competitors and more.
62
  make sure to provide the a valid company ticker and year.
63
  """,
64
  tool_args_schema = QueryTranscriptsArgs,
65
- tool_filter_template = "doc.year = {year} and doc.quarter = {quarter} and doc.ticker = '{ticker}'",
66
  reranker = "multilingual_reranker_v1", rerank_k = 100,
67
  n_sentences_before = 2, n_sentences_after = 2, lambda_val = 0.01,
68
  summary_num_results = 10,
 
47
  class QueryTranscriptsArgs(BaseModel):
48
  query: str = Field(..., description="The user query.")
49
  year: int = Field(..., description=f"The year. an integer between {min(years)} and {max(years)}.")
 
50
  ticker: str = Field(..., description=f"The company ticker. Must be a valid ticket symbol from the list {tickers.keys()}.")
51
 
52
  tools_factory = ToolsFactory(vectara_api_key=cfg.api_key,
 
56
  tool_name = "ask_transcripts",
57
  tool_description = """
58
  Given a company name and year,
59
+ returns a response (str) to a user question about a company, based on analyst call transcripts about the company's financial reports for that year.
60
  You can ask this tool any question about the compaany including risks, opportunities, financial performance, competitors and more.
61
  make sure to provide the a valid company ticker and year.
62
  """,
63
  tool_args_schema = QueryTranscriptsArgs,
64
+ tool_filter_template = "doc.year = {year} and doc.ticker = '{ticker}'",
65
  reranker = "multilingual_reranker_v1", rerank_k = 100,
66
  n_sentences_before = 2, n_sentences_after = 2, lambda_val = 0.01,
67
  summary_num_results = 10,