Skip to content
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

fix: bump jiter dep #1180

Merged
merged 4 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion instructor/batch.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import Any, Union, TypeVar, Optional
from collections.abc import Iterable
from pydantic import BaseModel, Field
from pydantic import BaseModel, Field # type: ignore
from instructor.process_response import handle_response_model
import instructor
import uuid
Expand Down
2 changes: 1 addition & 1 deletion instructor/dsl/citation.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pydantic import BaseModel, Field, model_validator, ValidationInfo
from pydantic import BaseModel, Field, model_validator, ValidationInfo # type: ignore
from collections.abc import Generator


Expand Down
2 changes: 1 addition & 1 deletion instructor/dsl/iterable.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Any, Optional, cast, ClassVar
from collections.abc import AsyncGenerator, Generator, Iterable

from pydantic import BaseModel, Field, create_model
from pydantic import BaseModel, Field, create_model # type: ignore

from instructor.function_calls import OpenAISchema
from instructor.mode import Mode
Expand Down
2 changes: 1 addition & 1 deletion instructor/dsl/maybe.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pydantic import BaseModel, Field, create_model
from pydantic import BaseModel, Field, create_model # type: ignore
from typing import Generic, Optional, TypeVar

T = TypeVar("T", bound=BaseModel)
Expand Down
2 changes: 1 addition & 1 deletion instructor/dsl/validators.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Callable, Optional

from openai import OpenAI
from pydantic import Field
from pydantic import Field # type: ignore

from instructor.function_calls import OpenAISchema
from instructor.client import Instructor
Expand Down
8 changes: 4 additions & 4 deletions instructor/multimodal.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from urllib.parse import urlparse
import mimetypes
import requests
from pydantic import BaseModel, Field
from pydantic import BaseModel, Field # type:ignore
from .mode import Mode

F = TypeVar("F", bound=Callable[..., Any])
Expand All @@ -43,9 +43,9 @@ class ImageParams(ImageParamsBase, total=False):

class Image(BaseModel):
source: Union[str, Path] = Field( # noqa: UP007
..., description="URL, file path, or base64 data of the image"
description="URL, file path, or base64 data of the image"
)
media_type: str = Field(..., description="MIME type of the image")
media_type: str = Field(description="MIME type of the image")
data: Union[str, None] = Field( # noqa: UP007
None, description="Base64 encoded image data", repr=False
)
Expand Down Expand Up @@ -208,7 +208,7 @@ def to_openai(self) -> dict[str, Any]:
class Audio(BaseModel):
"""Represents an audio that can be loaded from a URL or file path."""

source: Union[str, Path] = Field(..., description="URL or file path of the audio") # noqa: UP007
source: Union[str, Path] = Field(description="URL or file path of the audio") # noqa: UP007
data: Union[str, None] = Field( # noqa: UP007
None, description="Base64 encoded audio data", repr=False
)
Expand Down
2,035 changes: 1,032 additions & 1,003 deletions poetry.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ rich = "^13.7.0"
aiohttp = "^3.9.1"
tenacity = ">=9.0.0,<10.0.0"
pydantic-core = "^2.18.0"
jiter = ">=0.5,<0.7"
jiter = ">=0.6.1,<0.7"
jinja2 = "^3.1.4"
requests = "^2.32.3"

Expand Down
Loading