More fixes for missing packages

This commit is contained in:
Mark Backman
2024-12-12 13:25:13 -05:00
parent b5d5a0e923
commit 276fd86ecb
10 changed files with 208 additions and 12 deletions

View File

@@ -11,7 +11,7 @@ import json
import re
from asyncio import CancelledError
from dataclasses import dataclass
from typing import Any, Dict, List, Optional
from typing import Any, Dict, List, Optional, Union
from loguru import logger
from PIL import Image
@@ -75,8 +75,7 @@ class AnthropicContextAggregatorPair:
class AnthropicLLMService(LLMService):
"""
This class implements inference with Anthropic's AI models.
"""This class implements inference with Anthropic's AI models.
Can provide a custom client via the `client` kwarg, allowing you to
use `AsyncAnthropicBedrock` and `AsyncAnthropicVertex` clients
@@ -328,7 +327,7 @@ class AnthropicLLMContext(OpenAILLMContext):
tools: list[dict] | None = None,
tool_choice: dict | None = None,
*,
system: str | NotGiven = NOT_GIVEN,
system: Union[str, NotGiven] = NOT_GIVEN,
):
super().__init__(messages=messages, tools=tools, tool_choice=tool_choice)