diff --git a/libs/superagent/app/agents/llm.py b/libs/superagent/app/agents/llm.py index 4a8e1269b..c266734a5 100644 --- a/libs/superagent/app/agents/llm.py +++ b/libs/superagent/app/agents/llm.py @@ -161,6 +161,7 @@ def __init__( NOT_TOOLS_STREAMING_SUPPORTED_PROVIDERS = [ LLMProvider.GROQ, LLMProvider.BEDROCK, + LLMProvider.COHERE_CHAT, ] intermediate_steps = [] @@ -236,7 +237,10 @@ async def _completion(self, **kwargs) -> Any: await self.streaming_callback.on_llm_start() # TODO: Remove this when Groq and Bedrock supports streaming with tools - if self.llm_data.llm.provider in self.NOT_TOOLS_STREAMING_SUPPORTED_PROVIDERS: + if ( + self.llm_data.llm.provider in self.NOT_TOOLS_STREAMING_SUPPORTED_PROVIDERS + and len(self.tools) > 0 + ): logger.info( f"Disabling streaming for {self.llm_data.llm.provider}, as tools are used" ) diff --git a/libs/superagent/poetry.lock b/libs/superagent/poetry.lock index 9857cdffe..6f789a451 100644 --- a/libs/superagent/poetry.lock +++ b/libs/superagent/poetry.lock @@ -2311,13 +2311,13 @@ requests = ">=2,<3" [[package]] name = "litellm" -version = "1.35.21" +version = "1.35.33" description = "Library to easily interface with LLM API providers" optional = false python-versions = "!=2.7.*,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,!=3.7.*,>=3.8" files = [ - {file = "litellm-1.35.21-py3-none-any.whl", hash = "sha256:907230b7ff57c853e32d04274c2bb01f75e77d49220bd3d4d8fa02cfe6d3492a"}, - {file = "litellm-1.35.21.tar.gz", hash = "sha256:be0f9452fa357996e194c88eebc94f742be2fa623afd137a91b1e60ce5c3821f"}, + {file = "litellm-1.35.33-py3-none-any.whl", hash = "sha256:7dbbc282ea797febb4ace58bdd1fc42d0f20ea21a2ba576ebc2d933b337d8683"}, + {file = "litellm-1.35.33.tar.gz", hash = "sha256:0082f6a44ff7ce9d2c1bc5182292c3f58f69c8be99fccb824e750c009f78d112"}, ] [package.dependencies] @@ -6025,4 +6025,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = "^3.8.1, <3.12" -content-hash = "9049d2eda40cf7a7809de8eeac32efac0753e9006d50b8ef98aca4ef75f0e703" +content-hash = "b6a533b2c2d45f65aa2261eac2ff7865d621abba00e965371a626d3aab3575c3" diff --git a/libs/superagent/pyproject.toml b/libs/superagent/pyproject.toml index 7ea34bbb4..ee4a54f1b 100644 --- a/libs/superagent/pyproject.toml +++ b/libs/superagent/pyproject.toml @@ -50,7 +50,7 @@ openai = "^1.1.1" langchain-experimental = "^0.0.37" pydub = "^0.25.1" algoliasearch = "^3.0.0" -litellm = "1.35.21" +litellm = "1.35.33" weaviate-client = "^3.25.3" qdrant-client = "^1.6.9" vecs = "^0.4.2"