Skip to content

Commit 776a78d

Browse files
authored
Move imports to try-except block (#1329)
1 parent 1e049bd commit 776a78d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pydantic_ai_slim/pydantic_ai/models/anthropic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
from json import JSONDecodeError, loads as json_loads
1010
from typing import Any, Literal, Union, cast, overload
1111

12-
from anthropic.types import DocumentBlockParam
1312
from typing_extensions import assert_never
1413

1514
from .. import ModelHTTPError, UnexpectedModelBehavior, _utils, usage
@@ -40,6 +39,7 @@
4039
from anthropic.types import (
4140
Base64PDFSourceParam,
4241
ContentBlock,
42+
DocumentBlockParam,
4343
ImageBlockParam,
4444
Message as AnthropicMessage,
4545
MessageParam,

pydantic_ai_slim/pydantic_ai/models/cohere.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
from itertools import chain
66
from typing import Literal, Union, cast
77

8-
from cohere import TextAssistantMessageContentItem
98
from typing_extensions import assert_never
109

1110
from .. import ModelHTTPError, result
@@ -38,6 +37,7 @@
3837
ChatMessageV2,
3938
ChatResponse,
4039
SystemChatMessageV2,
40+
TextAssistantMessageContentItem,
4141
ToolCallV2,
4242
ToolCallV2Function,
4343
ToolChatMessageV2,

0 commit comments

Comments
 (0)