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

Set default model to first model available, not llama2. Refactor API connectivity check. #127

Merged
merged 1 commit into from
Mar 11, 2024

Conversation

andrewnguonly
Copy link
Owner

Summary

This PR resolves #126.

If a user never opens the Options page, then the default model is hardcoded to llama2. If llama2 isn't available, then no error is displayed and the app hangs when calling /api/generate (which returns a 404).

Solution: Set the default model to the first model returned from /api/tags and persist the model even if the user never visits the Options page. The API connectivity check logic is also refactored into a common function.

@andrewnguonly andrewnguonly changed the title Set default model to first model available, not llama2. Refactor API connectivity check. Set default model to first model available, not llama2. Refactor API connectivity check. Mar 10, 2024
@andrewnguonly andrewnguonly mentioned this pull request Mar 10, 2024
@andrewnguonly andrewnguonly merged commit eb29253 into 1.0.11 Mar 11, 2024
1 check passed
@andrewnguonly andrewnguonly deleted the api-check branch March 11, 2024 04:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant