-
Notifications
You must be signed in to change notification settings - Fork 494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add ci tests/lint #1
Conversation
9903840
to
319037d
Compare
f45c8d4
to
eedfcc2
Compare
### Using the Synchronous Client | ||
|
||
```python | ||
from ollama import Client |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this much different than just calling ollama.chat
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you can change the base url. ollama.chat
uses the default base url of https://127.0.0.1:11434
. Client
will likely need to support other things like TLS and proxies pretty soon
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, so this is using a "custom client" effectively
Requires Python 3.8 or higher. | ||
|
||
```sh | ||
pip install ollama |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
Looking very solid - a few minor |
return response.json() | ||
|
||
async def _stream(self, method, url, **kwargs): | ||
async def inner(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is necessary because _stream
needs to return a coroutine and a generator. Otherwise the caller will need to decide whether to return await
or just return
based on stream
since an async generator cannot be awaited
8f3029b
to
677be58
Compare
TODO: