From 1cc5ce849a38b936b5866b07106d3b199f2fb917 Mon Sep 17 00:00:00 2001 From: Alistair Rogers Date: Wed, 3 Jan 2024 15:07:21 +0000 Subject: [PATCH] modify type hints in protected methods --- integrations/ollama/src/ollama_haystack/generator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/integrations/ollama/src/ollama_haystack/generator.py b/integrations/ollama/src/ollama_haystack/generator.py index ebb9ebb84..a7f3c5a97 100644 --- a/integrations/ollama/src/ollama_haystack/generator.py +++ b/integrations/ollama/src/ollama_haystack/generator.py @@ -50,13 +50,13 @@ def __init__( self.url = url self.generation_kwargs = generation_kwargs or {} - def _get_telemetry_data(self) -> Dict[str, Any]: + def _get_telemetry_data(self) -> Dict[str, str]: """ Data that is sent to Posthog for usage analytics. """ return {"model": self.model_name} - def _post_args(self, prompt: str, generation_kwargs=None) -> Dict[str, Any]: + def _post_args(self, prompt: str, generation_kwargs=None) -> Dict[str, Union[str, dict]]: """ Returns A dictionary of arguments for a POST request to an Ollama service :param prompt: the prompt to generate a response for