Skip to content

Commit 89e719a

Browse files
authored
chore: bump ruff and ensure imports are sorted (#385)
* chore: upgrade ruff & sort imports
1 parent 02495ff commit 89e719a

25 files changed

+97
-89
lines changed

examples/async-chat.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import asyncio
2+
23
from ollama import AsyncClient
34

45

examples/async-generate.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import asyncio
2+
23
import ollama
34

45

examples/async-structured-outputs.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
import asyncio
2+
13
from pydantic import BaseModel
4+
25
from ollama import AsyncClient
3-
import asyncio
46

57

68
# Define the schema for the response

examples/async-tools.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import asyncio
2-
from ollama import ChatResponse
2+
33
import ollama
4+
from ollama import ChatResponse
45

56

67
def add_two_numbers(a: int, b: int) -> int:

examples/chat-stream.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from ollama import chat
22

3-
43
messages = [
54
{
65
'role': 'user',

examples/chat-with-history.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from ollama import chat
22

3-
43
messages = [
54
{
65
'role': 'user',

examples/generate-stream.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
from ollama import generate
22

3-
43
for part in generate('llama3.2', 'Why is the sky blue?', stream=True):
54
print(part['response'], end='', flush=True)

examples/generate.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
from ollama import generate
22

3-
43
response = generate('llama3.2', 'Why is the sky blue?')
54
print(response['response'])

examples/list.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
from ollama import list
2-
from ollama import ListResponse
1+
from ollama import ListResponse, list
32

43
response: ListResponse = list()
54

examples/multimodal-chat.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from ollama import chat
2+
23
# from pathlib import Path
34

45
# Pass in the path to the image

0 commit comments

Comments
 (0)