mirror of
https://github.com/ollama/ollama.git
synced 2025-03-29 11:11:47 +01:00
Link to api.md
in README.md
This commit is contained in:
parent
371d4e5df3
commit
e184c1d035
17
README.md
17
README.md
@ -134,20 +134,15 @@ Finally, run a model!
|
||||
|
||||
## REST API
|
||||
|
||||
### `POST /api/generate`
|
||||
> See the [API documentation](./docs/api.md) for all endpoints.
|
||||
|
||||
Generate text from a model.
|
||||
Ollama has an API for running and managing models. For example to generate text from a model:
|
||||
|
||||
```
|
||||
curl -X POST http://localhost:11434/api/generate -d '{"model": "llama2", "prompt":"Why is the sky blue?"}'
|
||||
```
|
||||
|
||||
### `POST /api/create`
|
||||
|
||||
Create a model from a `Modelfile`.
|
||||
|
||||
```
|
||||
curl -X POST http://localhost:11434/api/create -d '{"name": "my-model", "path": "/path/to/modelfile"}'
|
||||
curl -X POST http://localhost:11434/api/generate -d '{
|
||||
"model": "llama2",
|
||||
"prompt":"Why is the sky blue?"
|
||||
}'
|
||||
```
|
||||
|
||||
## Tools using Ollama
|
||||
|
Loading…
x
Reference in New Issue
Block a user