tosanoob commited on
Commit
ac36f56
·
verified ·
1 Parent(s): 57d91e6

Update pages/chat_app.py

Browse files
Files changed (1) hide show
  1. pages/chat_app.py +1 -1
pages/chat_app.py CHANGED
@@ -140,7 +140,7 @@ def get_model_and_tools():
140
  get_ts_func = glm.FunctionDeclaration(name="get_smart_time_series", description="Get price history data after knowing the official stock symbol.", parameters=glm.Schema(type=glm.Type.OBJECT, properties={'symbol': glm.Schema(type=glm.Type.STRING), 'time_period': glm.Schema(type=glm.Type.STRING, enum=["intraday", "1_week", "1_month", "6_months", "1_year"])}, required=['symbol', 'time_period']))
141
  currency_func = glm.FunctionDeclaration(name="perform_currency_conversion", description="Convert currency after knowing the 3-letter code of source/target currency pair, e.g., USD/VND, JPY/EUR", parameters=glm.Schema(type=glm.Type.OBJECT, properties={'amount': glm.Schema(type=glm.Type.NUMBER), 'symbol': glm.Schema(type=glm.Type.STRING)}, required=['amount', 'symbol']))
142
  finance_tool = glm.Tool(function_declarations=[find_stock_func, get_ts_func, currency_func])
143
- model = genai.GenerativeModel(model_name="gemini-1.5-pro-latest", tools=[finance_tool], system_instruction=SYSTEM_INSTRUCTION)
144
  return model
145
  model = get_model_and_tools()
146
  if st.session_state.chat_session is None:
 
140
  get_ts_func = glm.FunctionDeclaration(name="get_smart_time_series", description="Get price history data after knowing the official stock symbol.", parameters=glm.Schema(type=glm.Type.OBJECT, properties={'symbol': glm.Schema(type=glm.Type.STRING), 'time_period': glm.Schema(type=glm.Type.STRING, enum=["intraday", "1_week", "1_month", "6_months", "1_year"])}, required=['symbol', 'time_period']))
141
  currency_func = glm.FunctionDeclaration(name="perform_currency_conversion", description="Convert currency after knowing the 3-letter code of source/target currency pair, e.g., USD/VND, JPY/EUR", parameters=glm.Schema(type=glm.Type.OBJECT, properties={'amount': glm.Schema(type=glm.Type.NUMBER), 'symbol': glm.Schema(type=glm.Type.STRING)}, required=['amount', 'symbol']))
142
  finance_tool = glm.Tool(function_declarations=[find_stock_func, get_ts_func, currency_func])
143
+ model = genai.GenerativeModel(model_name="gemini-2.5-flash", tools=[finance_tool], system_instruction=SYSTEM_INSTRUCTION)
144
  return model
145
  model = get_model_and_tools()
146
  if st.session_state.chat_session is None: