From cf1e7217488036a66ec69035de2af00ac0728804 Mon Sep 17 00:00:00 2001 From: Bogdan Buduroiu <bogdan@buduroiu.com> Date: Sat, 13 Jan 2024 15:45:20 +0800 Subject: [PATCH] Formatting --- semantic_router/llms/base.py | 2 +- semantic_router/utils/function_call.py | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/semantic_router/llms/base.py b/semantic_router/llms/base.py index 2eaae7ae..7c7a6816 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 16e8ffe5..4a317852 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: -- GitLab