Skip to content

Commit

Permalink
Pinned Pydantic version, updated pydantic references
Browse files Browse the repository at this point in the history
  • Loading branch information
3coins committed Sep 1, 2023
1 parent 3d024de commit 9bc1438
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
OpenAIEmbeddings,
)
from langchain.embeddings.base import Embeddings
from langchain.pydantic_v1 import BaseModel, Extra
from pydantic import BaseModel, Extra


class BaseEmbeddingsProvider(BaseModel):
Expand Down
2 changes: 1 addition & 1 deletion packages/jupyter-ai-magics/jupyter_ai_magics/parsers.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Literal, Optional, get_args

import click
from langchain.pydantic_v1 import BaseModel
from pydantic import BaseModel

FORMAT_CHOICES_TYPE = Literal[
"code", "html", "image", "json", "markdown", "math", "md", "text"
Expand Down
2 changes: 1 addition & 1 deletion packages/jupyter-ai-magics/jupyter_ai_magics/providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
)
from langchain.llms.sagemaker_endpoint import LLMContentHandler
from langchain.llms.utils import enforce_stop_tokens
from langchain.pydantic_v1 import BaseModel, Extra, root_validator
from langchain.utils import get_from_dict_or_env
from pydantic import BaseModel, Extra, root_validator


class EnvAuthStrategy(BaseModel):
Expand Down
2 changes: 1 addition & 1 deletion packages/jupyter-ai-magics/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ dynamic = ["version", "description", "authors", "urls", "keywords"]

dependencies = [
"ipython",
"pydantic",
"pydantic~=1.0",
"importlib_metadata>=5.2.0",
"langchain==0.0.277",
"typing_extensions>=4.5.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/jupyter-ai/jupyter_ai/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from jupyter_ai.chat_handlers import BaseChatHandler
from jupyter_server.base.handlers import APIHandler as BaseAPIHandler
from jupyter_server.base.handlers import JupyterHandler
from langchain.pydantic_v1 import ValidationError
from pydantic import ValidationError
from tornado import web, websocket
from tornado.web import HTTPError

Expand Down
2 changes: 1 addition & 1 deletion packages/jupyter-ai/jupyter_ai/models.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Any, Dict, List, Literal, Optional, Union

from jupyter_ai_magics.providers import AuthStrategy, Field
from langchain.pydantic_v1 import BaseModel
from pydantic import BaseModel

DEFAULT_CHUNK_SIZE = 2000
DEFAULT_CHUNK_OVERLAP = 100
Expand Down
2 changes: 1 addition & 1 deletion packages/jupyter-ai/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ classifiers = [
dependencies = [
"jupyter_server>=1.6,<3",
"jupyterlab~=4.0",
"pydantic",
"pydantic~=1.0",
"openai~=0.26",
"aiosqlite>=0.18",
"importlib_metadata>=5.2.0",
Expand Down

0 comments on commit 9bc1438

Please sign in to comment.