Skip to content

Commit

Permalink
Import Field from pydantic instead of pydantic.dataclasses (#1568)
Browse files Browse the repository at this point in the history
  • Loading branch information
Viicos authored Dec 4, 2024
1 parent 1000c91 commit 8b2d4ba
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
3 changes: 2 additions & 1 deletion backend/chainlit/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
from typing import Optional

from dataclasses_json import DataClassJsonMixin
from pydantic.dataclasses import Field, dataclass
from pydantic import Field
from pydantic.dataclasses import dataclass

from chainlit.context import context
from chainlit.telemetry import trace_event
Expand Down
3 changes: 2 additions & 1 deletion backend/chainlit/chat_settings.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from typing import List

from pydantic.dataclasses import Field, dataclass
from pydantic import Field
from pydantic.dataclasses import dataclass

from chainlit.context import context
from chainlit.input_widget import InputWidget
Expand Down
3 changes: 2 additions & 1 deletion backend/chainlit/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@

import tomli
from dataclasses_json import DataClassJsonMixin
from pydantic.dataclasses import Field, dataclass
from pydantic import Field
from pydantic.dataclasses import dataclass
from starlette.datastructures import Headers

from chainlit.data.base import BaseDataLayer
Expand Down
3 changes: 2 additions & 1 deletion backend/chainlit/element.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
)

import filetype
from pydantic.dataclasses import Field, dataclass
from pydantic import Field
from pydantic.dataclasses import dataclass
from syncer import asyncio

from chainlit.context import context
Expand Down
3 changes: 2 additions & 1 deletion backend/chainlit/input_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
from collections import defaultdict
from typing import Any, Dict, List, Optional

from pydantic.dataclasses import Field, dataclass
from pydantic import Field
from pydantic.dataclasses import dataclass

from chainlit.types import InputWidgetType

Expand Down
3 changes: 2 additions & 1 deletion backend/chainlit/user.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from typing import Dict, Literal, Optional, TypedDict

from dataclasses_json import DataClassJsonMixin
from pydantic.dataclasses import Field, dataclass
from pydantic import Field
from pydantic.dataclasses import dataclass

Provider = Literal[
"credentials",
Expand Down

0 comments on commit 8b2d4ba

Please sign in to comment.