Commit Graph

54 Commits

Author SHA1 Message Date
Patrick Devine
427b0c6291 create api 2025-01-12 22:48:16 -08:00
Parth Sareen
ee349ecc6d
bugfix: fix passing Image type in messages for chat (#390)
---------

Co-authored-by: Aarni Koskela <akx@iki.fi>
2024-12-29 14:43:07 -08:00
Jeffrey Morgan
1066246ab5
fix validation of format field to allow empty strings as it did previously (#369) 2024-12-07 19:37:55 -08:00
Parth Sareen
4b10dee2b2
Structured outputs support with examples (#354) 2024-12-05 15:40:49 -08:00
Julia Scheaffer
b50a65b27d
Add Callable type annotation for Tools (#344) 2024-11-27 09:53:26 -08:00
Parth Sareen
64c1eb78ff
Examples refactor (#329)
* Examples and README updates

---------

Co-authored-by: fujitatomoya <tomoya.fujita825@gmail.com>
Co-authored-by: Michael Yang <mxyng@pm.me>
2024-11-21 15:14:59 -08:00
Parth Sareen
139c89e833
Passing Functions as Tools (#321)
* Functions can now be passed as tools
2024-11-20 15:49:50 -08:00
Michael Yang
dc38fe4675
Merge pull request #277 from ollama/mxyng/no-head
no head request for create blob
2024-11-08 11:20:43 -08:00
Parth Sareen
72052188c3 Fixing empty header + ensuring security (#313)
* Fixing empty header + ensuring security
2024-11-08 10:03:14 -08:00
Michael Yang
b0da4ff2d8 no head
this request is unnecessary since the POST will short circuit the
request if the blob already exists
2024-11-08 09:59:04 -08:00
Michael Yang
0bbc246007 pydantic types 2024-11-08 09:59:03 -08:00
Patrick Devine
eff2afd827 update docs 2024-09-12 16:49:38 -07:00
Oscar Neira
81edab1b64
_stream in async client raises RuntimeError processing HTTP errors (#266)
Fixes a bug processing errors in async client. When response in _stream has an HTTP error, the process raises a RuntimeError("Attempted to call a sync iterator on an async stream.") due to use of e.response.read() instead of await e.response.aread()
2024-08-29 16:45:57 -07:00
Johannes Binder
d98f646929
IPv6 support (#262)
* Support IPv6 host addresses

* Add missing tests

* Integrate feedback review to make it generally more stable and remove redundancies

* Remove unused import

* Fix formatting
2024-08-27 16:51:14 -07:00
Ben Plunkert
dfdeb7cef3
Add URL path to client URL in in Client._parse_host() (#170)
* Add URL path to client URL in in Client._parse_host()

* add tests for url path

* improve URL path handling

* restore trailing space

* remove extraneous path assignment

* Fix url path test

Co-authored-by: Michael Yang <mxyng@pm.me>

---------

Co-authored-by: Ben Plunkert <ben@plunkert.com>
Co-authored-by: Michael Yang <mxyng@pm.me>
2024-08-23 13:09:45 -07:00
royjhan
33c4b61ff9
add insert support to generate endpoint (#215)
* add suffix

* update fill-in-the-middle example

* keep example

* lint

* variables
2024-07-18 11:04:17 -07:00
royjhan
b0ea6d9e44
Support api/embed (#208)
* api/embed

* api/embed

* api/embed

* rm legacy
2024-07-18 10:40:30 -07:00
Josh
359c63daa7
integrate tool calls (#213) 2024-07-17 09:40:49 -07:00
royjhan
ce56f279e8
Add type overloads to methods (#181)
* Add type overloads for chat() method in _client.py

* Overloading

* Fix Overload Overlap

* Fix async chat

* Lint

* Reverse

---------

Co-authored-by: Simon Ottenhaus <simon.ottenhaus@kenbun.de>
2024-06-19 16:10:44 -07:00
Michael Yang
57c597b60e
Merge pull request #158 from tillfalko/main
Avoid side effects if chat message contains images
2024-06-05 11:28:41 -07:00
royjhan
d5316d023a
Python API PS (#177)
* Python API PS

* PS Rename

* Readme
2024-06-05 11:12:32 -07:00
tillfalko
0f8c20a596 Avoid side effects if chat message contains images 2024-05-18 16:48:53 +02:00
Michael Yang
5dc857ea66
Merge pull request #150 from ollama/mxyng/quantization
add quantization to create requests
2024-05-10 14:11:38 -07:00
Michael Yang
309007da80 add quantization to create requests 2024-05-10 14:10:37 -07:00
jingfelix
2ac751fb79 fix: annotation in AsyncClient.embedding
Signed-off-by: jingfelix <jingfelix@outlook.com>
2024-05-03 16:29:03 +08:00
Michael Yang
5b94a8d872
Merge pull request #118 from DSLstandard/fix-content-check
fix 'content' check on messages in chat()
2024-04-24 17:12:41 -07:00
DSLstandard
dc9543ba5f
fix 'content' check on messages in chat() 2024-04-15 20:39:49 +08:00
Niko
42f9f70bae modified embeddings return annotation 2024-04-05 11:56:16 +02:00
Michael Yang
ec8bf88c2b add content-type and accept
mirrors header values set by ollama cli
2024-02-08 11:59:43 -08:00
Michael Yang
8b929ab496 python user agent
add a user agent to ollama-python requests
2024-02-08 11:17:06 -08:00
Michael Yang
cdec2ad99e
Merge pull request #31 from ollama/keepalive
add keep_alive
2024-02-02 08:52:08 -08:00
Michael Yang
98ad0d884e fix: encode base64 inputs 2024-02-01 12:12:14 -08:00
Michael Yang
8e5d431d0d fix parse modelfile
- do not add newlines while parsing
- do not add leading whitespace
2024-01-29 13:42:34 -08:00
Michael Yang
fbb6553e03 add keep_alive 2024-01-26 11:33:03 -08:00
Michael Yang
3119736eda s/base_url/host/ 2024-01-19 14:00:49 -08:00
Erik Sp
27e2ef1161 Changed 'show' to use POST instead of GET 2024-01-14 12:00:20 -08:00
Michael Yang
582839f24f s/target/destination/ 2024-01-12 14:59:32 -08:00
Bruce MacDonald
e3733a235d fix tests 2024-01-12 11:03:40 -05:00
Bruce MacDonald
b232a6c04d fix: remote create new file 2024-01-12 10:48:59 -05:00
Michael Yang
1f68bae483 wording 2024-01-11 09:35:10 -08:00
Michael Yang
d2ea72ae07 return full list objects 2024-01-10 17:21:22 -08:00
Michael Yang
008a6a6b00 add embeddings 2024-01-10 17:21:21 -08:00
Michael Yang
7c2ec01d2f docstrings 2024-01-10 17:02:36 -08:00
Michael Yang
f7e6980b1b literal 2024-01-10 16:39:55 -08:00
Michael Yang
7601947a35 request/response errors 2024-01-10 16:39:54 -08:00
Michael Yang
2804a03d82 httpx: kwargs 2024-01-10 10:52:50 -08:00
Michael Yang
cea391a041 add generate and chat responses 2024-01-10 10:52:50 -08:00
Michael Yang
c67ef1ae34 fix: type hints 2024-01-09 16:57:07 -08:00
Michael Yang
bf56bed816 remove default async client 2024-01-09 16:52:19 -08:00
Michael Yang
2236de230c s/base/base_url/ 2023-12-21 17:00:31 -08:00