Fix typing of generated_fiels parameters

This commit is contained in:
sabaimran 2024-11-28 20:15:10 -08:00
parent d91935c880
commit 6f408948d3
4 changed files with 8 additions and 8 deletions

View file

@ -24,7 +24,7 @@ from khoj.utils.helpers import (
is_none_or_empty, is_none_or_empty,
truncate_code_context, truncate_code_context,
) )
from khoj.utils.rawconfig import LocationData from khoj.utils.rawconfig import FileAttachment, LocationData
from khoj.utils.yaml import yaml_dump from khoj.utils.yaml import yaml_dump
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
@ -159,7 +159,7 @@ def converse_anthropic(
vision_available: bool = False, vision_available: bool = False,
query_files: str = None, query_files: str = None,
generated_images: Optional[list[str]] = None, generated_images: Optional[list[str]] = None,
generated_files: List[str] = None, generated_files: List[FileAttachment] = None,
generated_excalidraw_diagram: Optional[str] = None, generated_excalidraw_diagram: Optional[str] = None,
additional_context: Optional[str] = None, additional_context: Optional[str] = None,
tracer: dict = {}, tracer: dict = {},

View file

@ -24,7 +24,7 @@ from khoj.utils.helpers import (
is_none_or_empty, is_none_or_empty,
truncate_code_context, truncate_code_context,
) )
from khoj.utils.rawconfig import LocationData from khoj.utils.rawconfig import FileAttachment, LocationData
from khoj.utils.yaml import yaml_dump from khoj.utils.yaml import yaml_dump
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
@ -169,7 +169,7 @@ def converse_gemini(
vision_available: bool = False, vision_available: bool = False,
query_files: str = None, query_files: str = None,
generated_images: Optional[list[str]] = None, generated_images: Optional[list[str]] = None,
generated_files: List[str] = None, generated_files: List[FileAttachment] = None,
generated_excalidraw_diagram: Optional[str] = None, generated_excalidraw_diagram: Optional[str] = None,
additional_context: List[str] = None, additional_context: List[str] = None,
tracer={}, tracer={},

View file

@ -26,7 +26,7 @@ from khoj.utils.helpers import (
is_promptrace_enabled, is_promptrace_enabled,
truncate_code_context, truncate_code_context,
) )
from khoj.utils.rawconfig import LocationData from khoj.utils.rawconfig import FileAttachment, LocationData
from khoj.utils.yaml import yaml_dump from khoj.utils.yaml import yaml_dump
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
@ -162,7 +162,7 @@ def converse_offline(
user_name: str = None, user_name: str = None,
agent: Agent = None, agent: Agent = None,
query_files: str = None, query_files: str = None,
generated_files: List[str] = None, generated_files: List[FileAttachment] = None,
additional_context: List[str] = None, additional_context: List[str] = None,
tracer: dict = {}, tracer: dict = {},
) -> Union[ThreadedGenerator, Iterator[str]]: ) -> Union[ThreadedGenerator, Iterator[str]]:

View file

@ -22,7 +22,7 @@ from khoj.utils.helpers import (
is_none_or_empty, is_none_or_empty,
truncate_code_context, truncate_code_context,
) )
from khoj.utils.rawconfig import LocationData from khoj.utils.rawconfig import FileAttachment, LocationData
from khoj.utils.yaml import yaml_dump from khoj.utils.yaml import yaml_dump
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
@ -158,7 +158,7 @@ def converse(
vision_available: bool = False, vision_available: bool = False,
query_files: str = None, query_files: str = None,
generated_images: Optional[list[str]] = None, generated_images: Optional[list[str]] = None,
generated_files: List[str] = None, generated_files: List[FileAttachment] = None,
generated_excalidraw_diagram: Optional[str] = None, generated_excalidraw_diagram: Optional[str] = None,
additional_context: List[str] = None, additional_context: List[str] = None,
tracer: dict = {}, tracer: dict = {},