From 6bc63928e592035597d3372a30f21a126ceaf8c9 Mon Sep 17 00:00:00 2001 From: Thomas-AH-Heller <94134707+Thomas-AH-Heller@users.noreply.github.com> Date: Mon, 6 May 2024 20:55:21 +0200 Subject: [PATCH] Fix async issue when streaming with Mistral AI (#13292) --- .../llama_index/llms/mistralai/base.py | 2 +- .../llms/llama-index-llms-mistralai/pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/llama-index-integrations/llms/llama-index-llms-mistralai/llama_index/llms/mistralai/base.py b/llama-index-integrations/llms/llama-index-llms-mistralai/llama_index/llms/mistralai/base.py index 536363ff4..1943d1a3f 100644 --- a/llama-index-integrations/llms/llama-index-llms-mistralai/llama_index/llms/mistralai/base.py +++ b/llama-index-integrations/llms/llama-index-llms-mistralai/llama_index/llms/mistralai/base.py @@ -324,7 +324,7 @@ class MistralAI(FunctionCallingLLM): messages = to_mistral_chatmessage(messages) all_kwargs = self._get_all_kwargs(**kwargs) - response = await self._aclient.chat_stream(messages=messages, **all_kwargs) + response = self._aclient.chat_stream(messages=messages, **all_kwargs) async def gen() -> ChatResponseAsyncGen: content = "" diff --git a/llama-index-integrations/llms/llama-index-llms-mistralai/pyproject.toml b/llama-index-integrations/llms/llama-index-llms-mistralai/pyproject.toml index 70acb9160..517d836ce 100644 --- a/llama-index-integrations/llms/llama-index-llms-mistralai/pyproject.toml +++ b/llama-index-integrations/llms/llama-index-llms-mistralai/pyproject.toml @@ -27,7 +27,7 @@ exclude = ["**/BUILD"] license = "MIT" name = "llama-index-llms-mistralai" readme = "README.md" -version = "0.1.11" +version = "0.1.12" [tool.poetry.dependencies] python = ">=3.9,<4.0" -- GitLab