Add to docs (#5309)
This commit is contained in:
parent
6f133a0bdd
commit
ed52833bb1
1 changed files with 13 additions and 0 deletions
|
@ -29,6 +29,8 @@ chat_completion = client.chat.completions.create(
|
|||
)
|
||||
|
||||
list_completion = client.models.list()
|
||||
|
||||
model = client.models.retrieve("llama3")
|
||||
```
|
||||
|
||||
### OpenAI JavaScript library
|
||||
|
@ -49,6 +51,8 @@ const chatCompletion = await openai.chat.completions.create({
|
|||
})
|
||||
|
||||
const listCompletion = await openai.models.list()
|
||||
|
||||
const model = await openai.models.retrieve("llama3");
|
||||
```
|
||||
|
||||
### `curl`
|
||||
|
@ -71,6 +75,8 @@ curl http://localhost:11434/v1/chat/completions \
|
|||
}'
|
||||
|
||||
curl http://localhost:11434/v1/models
|
||||
|
||||
curl https://api.openai.com/v1/models/llama3
|
||||
```
|
||||
|
||||
## Endpoints
|
||||
|
@ -115,6 +121,13 @@ curl http://localhost:11434/v1/models
|
|||
- `created` corresponds to when the model was last modified
|
||||
- `owned_by` corresponds to the ollama username, defaulting to `"library"`
|
||||
|
||||
### `/v1/models/{model}`
|
||||
|
||||
#### Notes
|
||||
|
||||
- `created` corresponds to when the model was last modified
|
||||
- `owned_by` corresponds to the ollama username, defaulting to `"library"`
|
||||
|
||||
## Models
|
||||
|
||||
Before using a model, pull it locally `ollama pull`:
|
||||
|
|
Loading…
Reference in a new issue