Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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
@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