From 6f408948d3ccf8fc6134d5a5f8b6427e69276163 Mon Sep 17 00:00:00 2001 From: sabaimran Date: Thu, 28 Nov 2024 20:15:10 -0800 Subject: [PATCH] Fix typing of generated_fiels parameters --- src/khoj/processor/conversation/anthropic/anthropic_chat.py | 4 ++-- src/khoj/processor/conversation/google/gemini_chat.py | 4 ++-- src/khoj/processor/conversation/offline/chat_model.py | 4 ++-- src/khoj/processor/conversation/openai/gpt.py | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/khoj/processor/conversation/anthropic/anthropic_chat.py b/src/khoj/processor/conversation/anthropic/anthropic_chat.py index a4dc22ed..b71c7684 100644 --- a/src/khoj/processor/conversation/anthropic/anthropic_chat.py +++ b/src/khoj/processor/conversation/anthropic/anthropic_chat.py @@ -24,7 +24,7 @@ from khoj.utils.helpers import ( is_none_or_empty, truncate_code_context, ) -from khoj.utils.rawconfig import LocationData +from khoj.utils.rawconfig import FileAttachment, LocationData from khoj.utils.yaml import yaml_dump logger = logging.getLogger(__name__) @@ -159,7 +159,7 @@ def converse_anthropic( vision_available: bool = False, query_files: str = None, generated_images: Optional[list[str]] = None, - generated_files: List[str] = None, + generated_files: List[FileAttachment] = None, generated_excalidraw_diagram: Optional[str] = None, additional_context: Optional[str] = None, tracer: dict = {}, diff --git a/src/khoj/processor/conversation/google/gemini_chat.py b/src/khoj/processor/conversation/google/gemini_chat.py index 221f44d2..4f211d23 100644 --- a/src/khoj/processor/conversation/google/gemini_chat.py +++ b/src/khoj/processor/conversation/google/gemini_chat.py @@ -24,7 +24,7 @@ from khoj.utils.helpers import ( is_none_or_empty, truncate_code_context, ) -from khoj.utils.rawconfig import LocationData +from khoj.utils.rawconfig import FileAttachment, LocationData from khoj.utils.yaml import yaml_dump logger = logging.getLogger(__name__) @@ -169,7 +169,7 @@ def converse_gemini( vision_available: bool = False, query_files: str = None, generated_images: Optional[list[str]] = None, - generated_files: List[str] = None, + generated_files: List[FileAttachment] = None, generated_excalidraw_diagram: Optional[str] = None, additional_context: List[str] = None, tracer={}, diff --git a/src/khoj/processor/conversation/offline/chat_model.py b/src/khoj/processor/conversation/offline/chat_model.py index f1746289..bbe54b2c 100644 --- a/src/khoj/processor/conversation/offline/chat_model.py +++ b/src/khoj/processor/conversation/offline/chat_model.py @@ -26,7 +26,7 @@ from khoj.utils.helpers import ( is_promptrace_enabled, truncate_code_context, ) -from khoj.utils.rawconfig import LocationData +from khoj.utils.rawconfig import FileAttachment, LocationData from khoj.utils.yaml import yaml_dump logger = logging.getLogger(__name__) @@ -162,7 +162,7 @@ def converse_offline( user_name: str = None, agent: Agent = None, query_files: str = None, - generated_files: List[str] = None, + generated_files: List[FileAttachment] = None, additional_context: List[str] = None, tracer: dict = {}, ) -> Union[ThreadedGenerator, Iterator[str]]: diff --git a/src/khoj/processor/conversation/openai/gpt.py b/src/khoj/processor/conversation/openai/gpt.py index ef3c3952..fcb9229a 100644 --- a/src/khoj/processor/conversation/openai/gpt.py +++ b/src/khoj/processor/conversation/openai/gpt.py @@ -22,7 +22,7 @@ from khoj.utils.helpers import ( is_none_or_empty, truncate_code_context, ) -from khoj.utils.rawconfig import LocationData +from khoj.utils.rawconfig import FileAttachment, LocationData from khoj.utils.yaml import yaml_dump logger = logging.getLogger(__name__) @@ -158,7 +158,7 @@ def converse( vision_available: bool = False, query_files: str = None, generated_images: Optional[list[str]] = None, - generated_files: List[str] = None, + generated_files: List[FileAttachment] = None, generated_excalidraw_diagram: Optional[str] = None, additional_context: List[str] = None, tracer: dict = {},