vmoras commited on
Commit
13dabab
1 Parent(s): 78a814f

Change function saving

Browse files
Files changed (1) hide show
  1. utils.py +3 -6
utils.py CHANGED
@@ -55,10 +55,7 @@ def get_answer(chatbot: list[tuple[str, str]], message: str, model: str) -> tupl
55
  :return: chatbot answer
56
  """
57
  # Setup which function will be called (depends on the model)
58
- if COMPANIES[model]['real name'] == 'Gemini':
59
- call_model = _call_google
60
- else:
61
- call_model = _call_openai
62
 
63
  # Get standalone question
64
  standalone_question = _get_standalone_question(chatbot, message, call_model)
@@ -226,7 +223,7 @@ PROMPT_GENERAL = download_prompt('general')
226
 
227
  # Constants used in the app
228
  COMPANIES = {
229
- 'Model G': {'company': 'Google', 'real name': 'Gemini'},
230
- 'Model C': {'company': 'OpenAI', 'real name': 'ChatGPT 4'},
231
  }
232
  MODELS = list(COMPANIES.keys())
 
55
  :return: chatbot answer
56
  """
57
  # Setup which function will be called (depends on the model)
58
+ call_model = COMPANIES[model]['calling']
 
 
 
59
 
60
  # Get standalone question
61
  standalone_question = _get_standalone_question(chatbot, message, call_model)
 
223
 
224
  # Constants used in the app
225
  COMPANIES = {
226
+ 'Model G': {'calling': _call_google, 'real name': 'Gemini'},
227
+ 'Model C': {'calling': _call_openai, 'real name': 'ChatGPT 4'},
228
  }
229
  MODELS = list(COMPANIES.keys())