Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
6fdea030
Commit
6fdea030
authored
Jul 14, 2023
by
Jeffrey Morgan
Browse files
docs: remove `python.md`
parent
38021ba4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
64 deletions
+0
-64
docs/python.md
docs/python.md
+0
-64
No files found.
docs/python.md
deleted
100644 → 0
View file @
38021ba4
# Python SDK
## Install
```
pip install ollama
```
## Example
```
python
import
ollama
ollama
.
generate
(
"orca-mini-3b"
,
"hi"
)
```
## Reference
### `ollama.generate(model, message)`
Generate a completion
```
python
ollama
.
generate
(
"./llama-7b-ggml.bin"
,
"hi"
)
```
### `ollama.models()`
List available local models
```
python
models
=
ollama
.
models
()
```
### `ollama.load(model)`
Manually a model for generation
```
python
ollama
.
load
(
"model"
)
```
### `ollama.unload(model)`
Unload a model
```
python
ollama
.
unload
(
"model"
)
```
### `ollama.pull(model)`
Download a model
```
python
ollama
.
pull
(
"huggingface.co/thebloke/llama-7b-ggml"
)
```
### `ollama.search(query)`
Search for compatible models that Ollama can run
```
python
ollama
.
search
(
"llama-7b"
)
```
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment