create_request: Create a httr2 request object

View source: R/ollama.R

create_requestR Documentation

Create a httr2 request object

Description

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.

Usage

create_request(endpoint, host = NULL)

Arguments

endpoint

The endpoint to create the request

host

The base URL to use. Default is NULL, which uses http://127.0.0.1:11434

Value

A httr2 request object.

Examples

create_request("/api/tags")
create_request("/api/chat")
create_request("/api/embeddings")

ollamar documentation built on April 3, 2025, 8:31 p.m.