Creates a httr2 request object with base URL, headers and endpoint. Used by other functions in the package and not intended to be used directly.
Examples
create_request("/api/tags")
#> <httr2_request>
#> GET http://127.0.0.1:11434/api/tags
#> Headers:
#> • content_type: "application/json"
#> • accept: "application/json"
#> • user_agent: "ollama-r/1.2.2.9000 (x86_64-pc-linux-gnu) R/4.4.2"
#> Body: empty
create_request("/api/chat")
#> <httr2_request>
#> GET http://127.0.0.1:11434/api/chat
#> Headers:
#> • content_type: "application/json"
#> • accept: "application/json"
#> • user_agent: "ollama-r/1.2.2.9000 (x86_64-pc-linux-gnu) R/4.4.2"
#> Body: empty
create_request("/api/embeddings")
#> <httr2_request>
#> GET http://127.0.0.1:11434/api/embeddings
#> Headers:
#> • content_type: "application/json"
#> • accept: "application/json"
#> • user_agent: "ollama-r/1.2.2.9000 (x86_64-pc-linux-gnu) R/4.4.2"
#> Body: empty