Skip to content
Open
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
8 changes: 4 additions & 4 deletions src/graphn/_generated/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def __enter__(self) -> "Client":
self.get_httpx_client().__enter__()
return self

def __exit__(self, *args: Any, **kwargs: Any) -> None:
def __exit__(self, *args: object, **kwargs: Any) -> None:
"""Exit a context manager for internal httpx.Client (see httpx docs)"""
self.get_httpx_client().__exit__(*args, **kwargs)

Expand Down Expand Up @@ -131,7 +131,7 @@ async def __aenter__(self) -> "Client":
await self.get_async_httpx_client().__aenter__()
return self

async def __aexit__(self, *args: Any, **kwargs: Any) -> None:
async def __aexit__(self, *args: object, **kwargs: Any) -> None:
"""Exit a context manager for underlying httpx.AsyncClient (see httpx docs)"""
await self.get_async_httpx_client().__aexit__(*args, **kwargs)

Expand Down Expand Up @@ -241,7 +241,7 @@ def __enter__(self) -> "AuthenticatedClient":
self.get_httpx_client().__enter__()
return self

def __exit__(self, *args: Any, **kwargs: Any) -> None:
def __exit__(self, *args: object, **kwargs: Any) -> None:
"""Exit a context manager for internal httpx.Client (see httpx docs)"""
self.get_httpx_client().__exit__(*args, **kwargs)

Expand Down Expand Up @@ -277,6 +277,6 @@ async def __aenter__(self) -> "AuthenticatedClient":
await self.get_async_httpx_client().__aenter__()
return self

async def __aexit__(self, *args: Any, **kwargs: Any) -> None:
async def __aexit__(self, *args: object, **kwargs: Any) -> None:
"""Exit a context manager for underlying httpx.AsyncClient (see httpx docs)"""
await self.get_async_httpx_client().__aexit__(*args, **kwargs)
8 changes: 5 additions & 3 deletions src/graphn/_generated/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
from .tts_request_response_format import TTSRequestResponseFormat
from .validate_model_request import ValidateModelRequest
from .validate_model_request_quantization import ValidateModelRequestQuantization
from .validate_model_request_weight_source import ValidateModelRequestWeightSource
from .validate_model_response import ValidateModelResponse
from .validate_model_response_artifact_type import ValidateModelResponseArtifactType
from .weight_source import WeightSource
Expand Down Expand Up @@ -76,9 +77,9 @@
"CustomModelQuantization",
"CustomModelStatus",
"CustomModelUpdate",
"DiscoveredImportedModel",
"DiscoverImportedModelsRequest",
"DiscoverImportedModelsResponse",
"DiscoveredImportedModel",
"Error",
"GpuHoursResponse",
"InferenceError",
Expand All @@ -94,13 +95,14 @@
"SecretList",
"SecretUpdate",
"SupportedArchitectures",
"TTSRequest",
"TTSRequestResponseFormat",
"TestConnectionRequest",
"TestConnectionResponse",
"TestConnectionResponseUsage",
"TTSRequest",
"TTSRequestResponseFormat",
"ValidateModelRequest",
"ValidateModelRequestQuantization",
"ValidateModelRequestWeightSource",
"ValidateModelResponse",
"ValidateModelResponseArtifactType",
"WeightSource",
Expand Down
3 changes: 2 additions & 1 deletion src/graphn/_generated/models/architecture_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from typing import Any, TypeVar, cast

from attrs import define as _attrs_define
from typing_extensions import Self

T = TypeVar("T", bound="ArchitectureInfo")

Expand Down Expand Up @@ -39,7 +40,7 @@ def to_dict(self) -> dict[str, Any]:
return field_dict

@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
d = dict(src_dict)
name = d.pop("name")

Expand Down
3 changes: 2 additions & 1 deletion src/graphn/_generated/models/chat_completion_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from attrs import define as _attrs_define
from attrs import field as _attrs_field
from typing_extensions import Self

from ..types import UNSET, Unset

Expand Down Expand Up @@ -157,7 +158,7 @@ def to_dict(self) -> dict[str, Any]:
return field_dict

@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
from ..models.chat_completion_request_response_format import (
ChatCompletionRequestResponseFormat,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from attrs import define as _attrs_define
from attrs import field as _attrs_field
from typing_extensions import Self

T = TypeVar("T", bound="ChatCompletionRequestResponseFormat")

Expand All @@ -23,7 +24,7 @@ def to_dict(self) -> dict[str, Any]:
return field_dict

@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
d = dict(src_dict)
chat_completion_request_response_format = cls()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from attrs import define as _attrs_define
from attrs import field as _attrs_field
from typing_extensions import Self

T = TypeVar("T", bound="ChatCompletionRequestToolChoiceType1")

Expand All @@ -23,7 +24,7 @@ def to_dict(self) -> dict[str, Any]:
return field_dict

@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
d = dict(src_dict)
chat_completion_request_tool_choice_type_1 = cls()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from attrs import define as _attrs_define
from attrs import field as _attrs_field
from typing_extensions import Self

T = TypeVar("T", bound="ChatCompletionRequestToolsItem")

Expand All @@ -23,7 +24,7 @@ def to_dict(self) -> dict[str, Any]:
return field_dict

@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
d = dict(src_dict)
chat_completion_request_tools_item = cls()

Expand Down
3 changes: 2 additions & 1 deletion src/graphn/_generated/models/chat_completion_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from attrs import define as _attrs_define
from attrs import field as _attrs_field
from typing_extensions import Self

from ..models.chat_completion_response_object import ChatCompletionResponseObject
from ..types import UNSET, Unset
Expand Down Expand Up @@ -76,7 +77,7 @@ def to_dict(self) -> dict[str, Any]:
return field_dict

@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
from ..models.chat_completion_response_choices_item import (
ChatCompletionResponseChoicesItem,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from attrs import define as _attrs_define
from attrs import field as _attrs_field
from typing_extensions import Self

from ..types import UNSET, Unset

Expand Down Expand Up @@ -57,7 +58,7 @@ def to_dict(self) -> dict[str, Any]:
return field_dict

@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
from ..models.chat_message import ChatMessage

d = dict(src_dict)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from attrs import define as _attrs_define
from attrs import field as _attrs_field
from typing_extensions import Self

from ..types import UNSET, Unset

Expand Down Expand Up @@ -45,7 +46,7 @@ def to_dict(self) -> dict[str, Any]:
return field_dict

@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
d = dict(src_dict)
prompt_tokens = d.pop("prompt_tokens", UNSET)

Expand Down
3 changes: 2 additions & 1 deletion src/graphn/_generated/models/chat_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from attrs import define as _attrs_define
from attrs import field as _attrs_field
from typing_extensions import Self

from ..models.chat_message_role import ChatMessageRole
from ..types import UNSET, Unset
Expand Down Expand Up @@ -67,7 +68,7 @@ def to_dict(self) -> dict[str, Any]:
return field_dict

@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
from ..models.chat_message_tool_calls_item import ChatMessageToolCallsItem

d = dict(src_dict)
Expand Down
3 changes: 2 additions & 1 deletion src/graphn/_generated/models/chat_message_tool_calls_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from attrs import define as _attrs_define
from attrs import field as _attrs_field
from typing_extensions import Self

T = TypeVar("T", bound="ChatMessageToolCallsItem")

Expand All @@ -23,7 +24,7 @@ def to_dict(self) -> dict[str, Any]:
return field_dict

@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
d = dict(src_dict)
chat_message_tool_calls_item = cls()

Expand Down
8 changes: 4 additions & 4 deletions src/graphn/_generated/models/custom_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from attrs import define as _attrs_define
from attrs import field as _attrs_field
from dateutil.parser import isoparse
from typing_extensions import Self

from ..models.capability import Capability
from ..models.custom_model_artifact_type import CustomModelArtifactType
Expand Down Expand Up @@ -288,7 +288,7 @@ def to_dict(self) -> dict[str, Any]:
return field_dict

@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
d = dict(src_dict)
id = d.pop("id")

Expand Down Expand Up @@ -317,9 +317,9 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:

cooldown_seconds = d.pop("cooldown_seconds")

created_at = isoparse(d.pop("created_at"))
created_at = datetime.datetime.fromisoformat(d.pop("created_at"))

updated_at = isoparse(d.pop("updated_at"))
updated_at = datetime.datetime.fromisoformat(d.pop("updated_at"))

display_name = d.pop("display_name", UNSET)

Expand Down
3 changes: 2 additions & 1 deletion src/graphn/_generated/models/custom_model_access.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from typing import Any, TypeVar

from attrs import define as _attrs_define
from typing_extensions import Self

T = TypeVar("T", bound="CustomModelAccess")

Expand Down Expand Up @@ -31,7 +32,7 @@ def to_dict(self) -> dict[str, Any]:
return field_dict

@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
d = dict(src_dict)
allowed = d.pop("allowed")

Expand Down
3 changes: 2 additions & 1 deletion src/graphn/_generated/models/custom_model_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from typing import Any, TypeVar

from attrs import define as _attrs_define
from typing_extensions import Self

from ..models.capability import Capability
from ..models.custom_model_create_quantization import CustomModelCreateQuantization
Expand Down Expand Up @@ -176,7 +177,7 @@ def to_dict(self) -> dict[str, Any]:
return field_dict

@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
d = dict(src_dict)
name = d.pop("name")

Expand Down
3 changes: 2 additions & 1 deletion src/graphn/_generated/models/custom_model_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from attrs import define as _attrs_define
from attrs import field as _attrs_field
from typing_extensions import Self

from ..types import UNSET, Unset

Expand Down Expand Up @@ -53,7 +54,7 @@ def to_dict(self) -> dict[str, Any]:
return field_dict

@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
from ..models.custom_model import CustomModel

d = dict(src_dict)
Expand Down
3 changes: 2 additions & 1 deletion src/graphn/_generated/models/custom_model_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from typing import Any, TypeVar

from attrs import define as _attrs_define
from typing_extensions import Self

from ..types import UNSET, Unset

Expand Down Expand Up @@ -63,7 +64,7 @@ def to_dict(self) -> dict[str, Any]:
return field_dict

@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
d = dict(src_dict)
name = d.pop("name", UNSET)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from typing import Any, TypeVar

from attrs import define as _attrs_define
from typing_extensions import Self

T = TypeVar("T", bound="DiscoverImportedModelsRequest")

Expand Down Expand Up @@ -36,7 +37,7 @@ def to_dict(self) -> dict[str, Any]:
return field_dict

@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
d = dict(src_dict)
endpoint = d.pop("endpoint")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from typing import TYPE_CHECKING, Any, TypeVar

from attrs import define as _attrs_define
from typing_extensions import Self

if TYPE_CHECKING:
from ..models.discovered_imported_model import DiscoveredImportedModel
Expand Down Expand Up @@ -38,7 +39,7 @@ def to_dict(self) -> dict[str, Any]:
return field_dict

@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
from ..models.discovered_imported_model import DiscoveredImportedModel

d = dict(src_dict)
Expand Down
3 changes: 2 additions & 1 deletion src/graphn/_generated/models/discovered_imported_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from typing import Any, TypeVar

from attrs import define as _attrs_define
from typing_extensions import Self

T = TypeVar("T", bound="DiscoveredImportedModel")

Expand Down Expand Up @@ -36,7 +37,7 @@ def to_dict(self) -> dict[str, Any]:
return field_dict

@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
d = dict(src_dict)
id = d.pop("id")

Expand Down
Loading
Loading