You've already forked adk-python
mirror of
https://github.com/encounter/adk-python.git
synced 2026-03-30 10:57:20 -07:00
fix: correct type annotation
Overridden `supported_models` should be a `classmethod` rather than a `staticmethod`. PiperOrigin-RevId: 790989895
This commit is contained in:
committed by
Copybara-Service
parent
283303032a
commit
97318bcd19
@@ -249,9 +249,9 @@ class Claude(BaseLlm):
|
||||
model: str = "claude-3-5-sonnet-v2@20241022"
|
||||
max_tokens: int = 8192
|
||||
|
||||
@staticmethod
|
||||
@classmethod
|
||||
@override
|
||||
def supported_models() -> list[str]:
|
||||
def supported_models(cls) -> list[str]:
|
||||
return [r"claude-3-.*", r"claude-.*-4.*"]
|
||||
|
||||
@override
|
||||
|
||||
@@ -75,9 +75,9 @@ class Gemini(BaseLlm):
|
||||
```
|
||||
"""
|
||||
|
||||
@staticmethod
|
||||
@classmethod
|
||||
@override
|
||||
def supported_models() -> list[str]:
|
||||
def supported_models(cls) -> list[str]:
|
||||
"""Provides the list of supported models.
|
||||
|
||||
Returns:
|
||||
|
||||
@@ -848,9 +848,9 @@ class LiteLlm(BaseLlm):
|
||||
response = await self.llm_client.acompletion(**completion_args)
|
||||
yield _model_response_to_generate_content_response(response)
|
||||
|
||||
@staticmethod
|
||||
@classmethod
|
||||
@override
|
||||
def supported_models() -> list[str]:
|
||||
def supported_models(cls) -> list[str]:
|
||||
"""Provides the list of supported models.
|
||||
|
||||
LiteLlm supports all models supported by litellm. We do not keep track of
|
||||
|
||||
@@ -282,8 +282,9 @@ class MockModel(BaseLlm):
|
||||
|
||||
return cls(responses=responses)
|
||||
|
||||
@staticmethod
|
||||
def supported_models() -> list[str]:
|
||||
@classmethod
|
||||
@override
|
||||
def supported_models(cls) -> list[str]:
|
||||
return ['mock']
|
||||
|
||||
def generate_content(
|
||||
|
||||
Reference in New Issue
Block a user