mirror of
https://github.com/ollama/ollama-python.git
synced 2026-01-13 21:57:16 +08:00
Allows construction of `Message(..., images=Image(value=...))` without having to import from `._types`
54 lines
910 B
Python
54 lines
910 B
Python
from ollama._client import Client, AsyncClient
|
|
from ollama._types import (
|
|
Options,
|
|
Message,
|
|
Image,
|
|
Tool,
|
|
GenerateResponse,
|
|
ChatResponse,
|
|
EmbedResponse,
|
|
EmbeddingsResponse,
|
|
StatusResponse,
|
|
ProgressResponse,
|
|
ListResponse,
|
|
ShowResponse,
|
|
ProcessResponse,
|
|
RequestError,
|
|
ResponseError,
|
|
)
|
|
|
|
__all__ = [
|
|
'Client',
|
|
'AsyncClient',
|
|
'Options',
|
|
'Message',
|
|
'Image',
|
|
'Tool',
|
|
'GenerateResponse',
|
|
'ChatResponse',
|
|
'EmbedResponse',
|
|
'EmbeddingsResponse',
|
|
'StatusResponse',
|
|
'ProgressResponse',
|
|
'ListResponse',
|
|
'ShowResponse',
|
|
'ProcessResponse',
|
|
'RequestError',
|
|
'ResponseError',
|
|
]
|
|
|
|
_client = Client()
|
|
|
|
generate = _client.generate
|
|
chat = _client.chat
|
|
embed = _client.embed
|
|
embeddings = _client.embeddings
|
|
pull = _client.pull
|
|
push = _client.push
|
|
create = _client.create
|
|
delete = _client.delete
|
|
list = _client.list
|
|
copy = _client.copy
|
|
show = _client.show
|
|
ps = _client.ps
|