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

Fix: Shiny Chat app crashes when clicking on options button #190

Merged
merged 3 commits into from
Apr 8, 2024

Conversation

calderonsamuel
Copy link
Collaborator

These PR tracks the fix of #181 and will allow users to install the patch with {pak}.

We still need to confirm that it actually achieves fixing the issue.


list_available_models.anthropic <- function(service) {
c(
"claude-3-opus-20240229", "claude-3-sonnet-20240229", "claude-3-haiku-20240229",

Check notice

Code scanning / lintr

Lines should not be more than 80 characters. This line is 84 characters. Note

Lines should not be more than 80 characters. This line is 84 characters.

list_available_models.openai <- function(service) {
models <-
request_base("models") %>%

Check warning

Code scanning / lintr

no visible global function definition for 'request_base' Warning

no visible global function definition for 'request_base'

list_available_models.openai <- function(service) {
models <-
request_base("models") %>%

Check warning

Code scanning / lintr

no visible global function definition for '%>%' Warning

no visible global function definition for '%>%'

list_available_models.openai <- function(service) {
models <-
request_base("models") %>%

Check warning

Code scanning / lintr

no visible global function definition for '%>%' Warning

no visible global function definition for '%>%'

list_available_models.openai <- function(service) {
models <-
request_base("models") %>%

Check warning

Code scanning / lintr

no visible global function definition for '%>%' Warning

no visible global function definition for '%>%'

list_available_models.ollama <- function(service) {
if (!ollama_is_available()) stop("Couldn't find ollama in your system")
ollama_list() %>%

Check warning

Code scanning / lintr

no visible global function definition for '%>%' Warning

no visible global function definition for '%>%'

list_available_models.ollama <- function(service) {
if (!ollama_is_available()) stop("Couldn't find ollama in your system")
ollama_list() %>%

Check warning

Code scanning / lintr

no visible global function definition for '%>%' Warning

no visible global function definition for '%>%'
}

list_available_models.google <- function(service) {
get_available_models_google()

Check warning

Code scanning / lintr

no visible global function definition for 'get_available_models_google' Warning

no visible global function definition for 'get_available_models_google'
list_available_models.google <- function(service) {
get_available_models_google()
}

Check notice

Code scanning / lintr

Trailing blank lines are superfluous. Note

Trailing blank lines are superfluous.
get_available_models_google()
}


Check notice

Code scanning / lintr

Trailing blank lines are superfluous. Note

Trailing blank lines are superfluous.
@calderonsamuel calderonsamuel marked this pull request as ready for review April 7, 2024 17:43
@calderonsamuel
Copy link
Collaborator Author

It looks like the error wasn't actually related to get_available_models(), but still it's nicer to have it as a generic wrapper for future debugging.

@JamesHWade JamesHWade merged commit 700bb96 into main Apr 8, 2024
11 checks passed
@calderonsamuel calderonsamuel deleted the bug-options-btn branch April 8, 2024 12:38
This pull request was closed.
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.

2 participants