diff --git a/litellm/__pycache__/main.cpython-311.pyc b/litellm/__pycache__/main.cpython-311.pyc index cdb85c0d87..b103a749a9 100644 Binary files a/litellm/__pycache__/main.cpython-311.pyc and b/litellm/__pycache__/main.cpython-311.pyc differ diff --git a/litellm/__pycache__/utils.cpython-311.pyc b/litellm/__pycache__/utils.cpython-311.pyc index 06f749149e..6a5357ac2d 100644 Binary files a/litellm/__pycache__/utils.cpython-311.pyc and b/litellm/__pycache__/utils.cpython-311.pyc differ diff --git a/litellm/llms/bedrock.py b/litellm/llms/bedrock.py index 82ba2e55a0..c27350994d 100644 --- a/litellm/llms/bedrock.py +++ b/litellm/llms/bedrock.py @@ -1,4 +1,4 @@ -import json +import json, copy from enum import Enum import time from typing import Callable @@ -85,7 +85,6 @@ def completion( encoding, logging_obj, optional_params=None, - stream=False, litellm_params=None, logger_fn=None, ): @@ -99,10 +98,12 @@ def completion( model = model provider = model.split(".")[0] prompt = convert_messages_to_prompt(messages, provider) + inference_params = copy.deepcopy(optional_params) + stream = inference_params.pop("stream", False) if provider == "anthropic": data = json.dumps({ "prompt": prompt, - **optional_params + **inference_params }) elif provider == "ai21": data = json.dumps({ @@ -112,7 +113,7 @@ def completion( else: # amazon titan data = json.dumps({ "inputText": prompt, - "textGenerationConfig": optional_params, + "textGenerationConfig": inference_params, }) ## LOGGING logging_obj.pre_call( diff --git a/litellm/main.py b/litellm/main.py index f991889df5..340cef0226 100644 --- a/litellm/main.py +++ b/litellm/main.py @@ -1003,7 +1003,6 @@ def completion( logger_fn=logger_fn, encoding=encoding, logging_obj=logging, - stream=stream, ) diff --git a/pyproject.toml b/pyproject.toml index 3747784598..8acac6eba1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "litellm" -version = "0.1.812" +version = "0.1.813" description = "Library to easily interface with LLM API providers" authors = ["BerriAI"] license = "MIT License"