diff --git a/semantic_router/llms/base.py b/semantic_router/llms/base.py index 2eaae7ae5f0fcd07b28d5e22fe9566c73614e445..7c7a6816ad57c5097110bade914062105ff69dd4 100644 --- a/semantic_router/llms/base.py +++ b/semantic_router/llms/base.py @@ -1,5 +1,5 @@ import json -from typing import Any, Optional, List +from typing import Any, List, Optional from pydantic import BaseModel diff --git a/semantic_router/utils/function_call.py b/semantic_router/utils/function_call.py index 16e8ffe50bf9defb94dae99c910c89606e2d176d..4a317852945f3287843bb84af770b91f364aac98 100644 --- a/semantic_router/utils/function_call.py +++ b/semantic_router/utils/function_call.py @@ -17,7 +17,9 @@ def get_schema(item: Union[BaseModel, Callable]) -> Dict[str, Any]: if default_value: default_repr = repr(default_value) - signature_part = f"{field_name}: {field_model.__name__} = {default_repr}" + signature_part = ( + f"{field_name}: {field_model.__name__} = {default_repr}" + ) else: signature_part = f"{field_name}: {field_model.__name__}" @@ -39,7 +41,9 @@ def get_schema(item: Union[BaseModel, Callable]) -> Dict[str, Any]: # TODO: Add route layer object to the input, solve circular import issue -async def route_and_execute(query: str, llm: BaseLLM, functions: List[Callable], layer) -> Any: +async def route_and_execute( + query: str, llm: BaseLLM, functions: List[Callable], layer +) -> Any: route_choice: RouteChoice = layer(query) for function in functions: