Shreyas094
commited on
Commit
•
b578a48
1
Parent(s):
85df365
Update app.py
Browse files
app.py
CHANGED
@@ -84,7 +84,7 @@ custom_models = fetch_custom_models()
|
|
84 |
all_models = ["huggingface", "groq", "mistral"] + custom_models
|
85 |
|
86 |
# Determine the default model
|
87 |
-
default_model = CUSTOM_LLM_DEFAULT_MODEL if CUSTOM_LLM_DEFAULT_MODEL in all_models else "
|
88 |
|
89 |
logger.info(f"Default model selected: {default_model}")
|
90 |
|
@@ -761,7 +761,7 @@ Remember to:
|
|
761 |
response = groq_client.chat.completions.create(
|
762 |
messages=messages,
|
763 |
model="llama-3.1-70b-versatile",
|
764 |
-
max_tokens=
|
765 |
temperature=temperature,
|
766 |
top_p=0.9,
|
767 |
presence_penalty=1.2,
|
@@ -773,7 +773,7 @@ Remember to:
|
|
773 |
response = mistral_client.chat.complete(
|
774 |
model="open-mistral-nemo",
|
775 |
messages=messages,
|
776 |
-
max_tokens=
|
777 |
temperature=temperature,
|
778 |
top_p=0.9,
|
779 |
stream=False
|
@@ -785,14 +785,14 @@ Remember to:
|
|
785 |
custom_model = CustomModel(model)
|
786 |
summary = custom_model.generate_response(
|
787 |
messages=messages,
|
788 |
-
max_tokens=
|
789 |
temperature=temperature
|
790 |
)
|
791 |
|
792 |
else: # huggingface
|
793 |
response = client.chat_completion(
|
794 |
messages=messages,
|
795 |
-
max_tokens=
|
796 |
temperature=temperature,
|
797 |
frequency_penalty=1.4,
|
798 |
top_p=0.9
|
|
|
84 |
all_models = ["huggingface", "groq", "mistral"] + custom_models
|
85 |
|
86 |
# Determine the default model
|
87 |
+
default_model = CUSTOM_LLM_DEFAULT_MODEL if CUSTOM_LLM_DEFAULT_MODEL in all_models else "groq"
|
88 |
|
89 |
logger.info(f"Default model selected: {default_model}")
|
90 |
|
|
|
761 |
response = groq_client.chat.completions.create(
|
762 |
messages=messages,
|
763 |
model="llama-3.1-70b-versatile",
|
764 |
+
max_tokens=300,
|
765 |
temperature=temperature,
|
766 |
top_p=0.9,
|
767 |
presence_penalty=1.2,
|
|
|
773 |
response = mistral_client.chat.complete(
|
774 |
model="open-mistral-nemo",
|
775 |
messages=messages,
|
776 |
+
max_tokens=300,
|
777 |
temperature=temperature,
|
778 |
top_p=0.9,
|
779 |
stream=False
|
|
|
785 |
custom_model = CustomModel(model)
|
786 |
summary = custom_model.generate_response(
|
787 |
messages=messages,
|
788 |
+
max_tokens=300,
|
789 |
temperature=temperature
|
790 |
)
|
791 |
|
792 |
else: # huggingface
|
793 |
response = client.chat_completion(
|
794 |
messages=messages,
|
795 |
+
max_tokens=300,
|
796 |
temperature=temperature,
|
797 |
frequency_penalty=1.4,
|
798 |
top_p=0.9
|