improved typing

This commit is contained in:
Yannick Stephan
2025-02-15 22:37:12 +01:00
parent 8d0d8b8279
commit eaf1d553d2
9 changed files with 52 additions and 35 deletions

View File

@@ -1,4 +1,6 @@
from typing import List, Dict, Callable, Any
from __future__ import annotations
from typing import Callable, Any
from pydantic import BaseModel, Field
@@ -23,7 +25,7 @@ class Model(BaseModel):
...,
description="A function that generates the response from the llm. The response must be a string",
)
kwargs: Dict[str, Any] = Field(
kwargs: dict[str, Any] = Field(
...,
description="The arguments to pass to the callable function. Eg. the api key, model name, etc",
)
@@ -57,7 +59,7 @@ class MultiModel:
```
"""
def __init__(self, models: List[Model]):
def __init__(self, models: list[Model]):
self._models = models
self._current_model = 0