Skip to content
Snippets Groups Projects
Commit 9d99b5e4 authored by Yin Xi's avatar Yin Xi
Browse files

add get_models function

parent d40ae8d1
No related merge requests found
......@@ -2,6 +2,12 @@ library(jsonlite)
library(httr2)
get_models <- function(url){
test <- request(url) %>% req_perform() %>% resp_body_json
models <- test$models %>% lapply(data.frame) %>% bind_rows()
return(models$name)
}
ask_ollama <- function(url,model,prompt=NULL,message=NULL,sys=NULL,seed=1234, temperature=0){
body_list <- list(
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment