Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add default model #380

Merged
merged 1 commit into from
Nov 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions naas_drivers/tools/naas_chat_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ def check_tokens(self, prompt, model, limit=0.2):
"""
# Check if the model is in the MODELS dictionary
if model not in list(MODELS.keys()):
print(f"⛔ Model {model} not found. Must be one of {list(MODELS.keys())}")
return None, None
print(f"⛔ Model {model} not found. Default model: 'gpt-3.5-turbo'")
model = 'gpt-3.5-turbo'

# Get max tokens
max_tokens = MODELS.get(model)

Expand Down
Loading