Spaces:
Runtime error
Runtime error
Change function saving
Browse files
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 |
-
|
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': {'
|
230 |
-
'Model C': {'
|
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())
|