File tree Expand file tree Collapse file tree 3 files changed +14
-14
lines changed Expand file tree Collapse file tree 3 files changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -180,8 +180,8 @@ def _(chunk: ChatCompletionChunk) -> ChatMessage:
180
180
# ------------------------------------------------------------------
181
181
182
182
try :
183
- from anthropic .types import (
184
- Message as AnthropicMessage , # pyright: ignore[reportMissingImports]
183
+ from anthropic .types import ( # pyright: ignore[reportMissingImports]
184
+ Message as AnthropicMessage ,
185
185
)
186
186
187
187
@get_message_content .register
Original file line number Diff line number Diff line change 4
4
from ._chat_types import ChatMessageDict
5
5
6
6
if TYPE_CHECKING :
7
- from anthropic .types import (
8
- MessageParam as AnthropicMessage , # pyright: ignore[reportMissingImports]
7
+ from anthropic .types import ( # pyright: ignore[reportMissingImports]
8
+ MessageParam as AnthropicMessage ,
9
9
)
10
10
from langchain_core .messages import AIMessage , HumanMessage , SystemMessage
11
11
from ollama import Message as OllamaMessage
@@ -69,8 +69,8 @@ def as_provider_message(
69
69
70
70
71
71
def as_anthropic_message (message : ChatMessageDict ) -> "AnthropicMessage" :
72
- from anthropic .types import (
73
- MessageParam as AnthropicMessage , # pyright: ignore[reportMissingImports]
72
+ from anthropic .types import ( # pyright: ignore[reportMissingImports]
73
+ MessageParam as AnthropicMessage ,
74
74
)
75
75
76
76
if message ["role" ] == "system" :
Original file line number Diff line number Diff line change @@ -258,14 +258,14 @@ def test_anthropic_normalization():
258
258
TextBlock ,
259
259
Usage ,
260
260
)
261
- from anthropic .types .message import (
262
- Message , # pyright: ignore[reportMissingImports]
261
+ from anthropic .types .message import ( # pyright: ignore[reportMissingImports]
262
+ Message ,
263
263
)
264
- from anthropic .types .raw_content_block_delta_event import (
265
- RawContentBlockDeltaEvent , # pyright: ignore[reportMissingImports]
264
+ from anthropic .types .raw_content_block_delta_event import ( # pyright: ignore[reportMissingImports]
265
+ RawContentBlockDeltaEvent ,
266
266
)
267
- from anthropic .types .text_delta import (
268
- TextDelta , # pyright: ignore[reportMissingImports]
267
+ from anthropic .types .text_delta import ( # pyright: ignore[reportMissingImports]
268
+ TextDelta ,
269
269
)
270
270
271
271
# Make sure return type of Anthropic().messages.create() hasn't changed
@@ -419,8 +419,8 @@ def test_as_anthropic_message():
419
419
AsyncMessages ,
420
420
Messages ,
421
421
)
422
- from anthropic .types import (
423
- MessageParam , # pyright: ignore[reportMissingImports]
422
+ from anthropic .types import ( # pyright: ignore[reportMissingImports]
423
+ MessageParam ,
424
424
)
425
425
from shinychat ._chat_provider_types import as_anthropic_message
426
426
You can’t perform that action at this time.
0 commit comments