-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
54 lines (37 loc) · 1.82 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# ollama
<!-- badges: start -->
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![CRAN status](https://www.r-pkg.org/badges/version/ollama)](https://CRAN.R-project.org/package=ollama)
[![R-CMD-check](https://github.com/calderonsamuel/ollama/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/calderonsamuel/ollama/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->
The goal of ollama is to wrap the [`ollama`](https://github.com/jmorganca/ollama/blob/main/docs/api.md) API and provide infrastructure to be used within [`{gptstudio}`](https://github.com/MichelNivard/gptstudio)
## Installation
You can install the development version of ollama like so:
``` r
pak::pak("calderonsamuel/ollama")
```
## Prerequisites
The user is in charge of downloading ollama and providing networking configuration. We recommend using [the official docker image](https://ollama.ai/blog/ollama-is-now-available-as-an-official-docker-image), which trivializes this process.
The following code downloads the default ollama image and runs an "ollama" container exposing the 11434 port.
```bash
docker run -d -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama
```
By default, this package will use `http://localhost:11434` as API host url. Although we provide methods to change this, only do it if you are absolutely sure of what it means.
## Example
This is a basic example which shows you how to solve a common problem:
```{r example}
library(ollama)
## basic example code
```