Skip to content

Commit

Permalink
Move everything to pydantic v1 to avoid warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
roman-romanov-o committed Jan 16, 2025
1 parent f9a46f5 commit d8b1ee7
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion aidial_adapter_vertexai/chat/bison/prompt.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from typing import List, Optional, Set, Tuple

from aidial_sdk.chat_completion import Message, Role
from pydantic import BaseModel
from pydantic.v1 import BaseModel
from vertexai.preview.language_models import ChatMessage, ChatSession

from aidial_adapter_vertexai.chat.errors import ValidationError
Expand Down
2 changes: 1 addition & 1 deletion aidial_adapter_vertexai/dial_api/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
MessageContentTextPart,
Request,
)
from pydantic import BaseModel
from pydantic.v1 import BaseModel

from aidial_adapter_vertexai.chat.errors import ValidationError

Expand Down
2 changes: 1 addition & 1 deletion aidial_adapter_vertexai/dial_api/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from urllib.parse import unquote, urljoin

import aiohttp
from pydantic import BaseModel
from pydantic.v1 import BaseModel
from typing_extensions import TypedDict

from aidial_adapter_vertexai.utils.log_config import app_logger as log
Expand Down
2 changes: 1 addition & 1 deletion aidial_adapter_vertexai/embedding/multi_modal.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from aidial_sdk.chat_completion.request import Attachment
from aidial_sdk.embeddings import Response as EmbeddingsResponse
from aidial_sdk.embeddings.request import EmbeddingsRequest
from pydantic import BaseModel
from pydantic.v1 import BaseModel
from vertexai.vision_models import (
Image,
MultiModalEmbeddingModel,
Expand Down
2 changes: 1 addition & 1 deletion aidial_adapter_vertexai/embedding/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from aidial_sdk.embeddings import Response as EmbeddingsResponse
from aidial_sdk.embeddings.request import EmbeddingsRequest
from pydantic import BaseModel
from pydantic.v1 import BaseModel
from vertexai.language_models import TextEmbeddingInput

from aidial_adapter_vertexai.chat.errors import ValidationError
Expand Down
2 changes: 1 addition & 1 deletion aidial_adapter_vertexai/utils/json.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from typing import Any

import proto
from pydantic import BaseModel
from pydantic.v1 import BaseModel

from aidial_adapter_vertexai.utils.protobuf import message_to_dict

Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/test_chat_completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
)
from openai.types.chat.chat_completion_message import FunctionCall
from openai.types.chat.completion_create_params import Function
from pydantic import BaseModel
from pydantic.v1 import BaseModel

from aidial_adapter_vertexai.chat.static_tools import StaticToolsConfig
from aidial_adapter_vertexai.deployments import ChatCompletionDeployment
Expand Down
2 changes: 1 addition & 1 deletion tests/utils/openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
)
from openai.types.chat.completion_create_params import Function
from openai.types.shared_params.function_definition import FunctionDefinition
from pydantic import BaseModel
from pydantic.v1 import BaseModel

from aidial_adapter_vertexai.chat.static_tools import StaticToolsConfig
from aidial_adapter_vertexai.utils.resource import Resource
Expand Down

0 comments on commit d8b1ee7

Please sign in to comment.