diff --git a/agixt/providers/google.py b/agixt/providers/google.py index a42593b4ee9..34a5544c498 100644 --- a/agixt/providers/google.py +++ b/agixt/providers/google.py @@ -46,6 +46,7 @@ def services(): return ["llm", "tts", "vision"] async def inference(self, prompt, tokens: int = 0, images: list = []): + new_max_tokens = int(self.MAX_TOKENS) - tokens if not self.GOOGLE_API_KEY or self.GOOGLE_API_KEY == "None": return "Please set your Google API key in the Agent Management page." try: @@ -57,7 +58,6 @@ async def inference(self, prompt, tokens: int = 0, images: list = []): model_name=self.AI_MODEL if not images else "gemini-pro-vision", generation_config=generation_config, ) - new_max_tokens = int(self.MAX_TOKENS) - tokens new_prompt = [] if images: for image in images: diff --git a/agixt/version b/agixt/version index 05f629f1b7f..69fd868749b 100644 --- a/agixt/version +++ b/agixt/version @@ -1 +1 @@ -v1.6.0 \ No newline at end of file +v1.6.1 \ No newline at end of file