chore: bump ruff and ensure imports are sorted (#385)

* chore: upgrade ruff & sort imports
This commit is contained in:
Aarni Koskela
2025-01-14 16:34:16 -08:00
committed by GitHub
parent 02495ffd77
commit 89e719ab92
25 changed files with 99 additions and 91 deletions
+1
View File
@@ -1,4 +1,5 @@
import asyncio
from ollama import AsyncClient
+1
View File
@@ -1,4 +1,5 @@
import asyncio
import ollama
+4 -2
View File
@@ -1,7 +1,9 @@
from pydantic import BaseModel
from ollama import AsyncClient
import asyncio
from pydantic import BaseModel
from ollama import AsyncClient
# Define the schema for the response
class FriendInfo(BaseModel):
+2 -1
View File
@@ -1,6 +1,7 @@
import asyncio
from ollama import ChatResponse
import ollama
from ollama import ChatResponse
def add_two_numbers(a: int, b: int) -> int:
-1
View File
@@ -1,6 +1,5 @@
from ollama import chat
messages = [
{
'role': 'user',
-1
View File
@@ -1,6 +1,5 @@
from ollama import chat
messages = [
{
'role': 'user',
-1
View File
@@ -1,5 +1,4 @@
from ollama import generate
for part in generate('llama3.2', 'Why is the sky blue?', stream=True):
print(part['response'], end='', flush=True)
-1
View File
@@ -1,5 +1,4 @@
from ollama import generate
response = generate('llama3.2', 'Why is the sky blue?')
print(response['response'])
+1 -2
View File
@@ -1,5 +1,4 @@
from ollama import list
from ollama import ListResponse
from ollama import ListResponse, list
response: ListResponse = list()
+1
View File
@@ -1,4 +1,5 @@
from ollama import chat
# from pathlib import Path
# Pass in the path to the image
+2 -2
View File
@@ -1,10 +1,10 @@
import sys
import random
import sys
import httpx
from ollama import generate
latest = httpx.get('https://xkcd.com/info.0.json')
latest.raise_for_status()
+1 -2
View File
@@ -1,5 +1,4 @@
from ollama import ps, pull, chat
from ollama import ProcessResponse
from ollama import ProcessResponse, chat, ps, pull
# Ensure at least one model is loaded
response = pull('llama3.2', stream=True)
+1 -1
View File
@@ -1,6 +1,6 @@
from tqdm import tqdm
from ollama import pull
from ollama import pull
current_digest, bars = '', {}
for progress in pull('llama3.2', stream=True):
+3 -1
View File
@@ -1,6 +1,8 @@
from pathlib import Path
from pydantic import BaseModel
from typing import Literal
from pydantic import BaseModel
from ollama import chat
+2 -1
View File
@@ -1,6 +1,7 @@
from ollama import chat
from pydantic import BaseModel
from ollama import chat
# Define the schema for the response
class FriendInfo(BaseModel):
+1 -2
View File
@@ -1,5 +1,4 @@
from ollama import chat
from ollama import ChatResponse
from ollama import ChatResponse, chat
def add_two_numbers(a: int, b: int) -> int: