diff --git a/litellm/main.py b/litellm/main.py index 2176689a17..04715ddb0e 100644 --- a/litellm/main.py +++ b/litellm/main.py @@ -1994,12 +1994,12 @@ def text_completion( responses = [None for x in prompt] # init responses for i, individual_prompt in enumerate(prompt): decoded_prompt = tokenizer.decode(individual_prompt) # type: ignore + all_params = {**kwargs, **optional_params} # combine optional params and kwargs response = text_completion( - model = model, - prompt=decoded_prompt, + model = model, # type: ignore + prompt = decoded_prompt, # type: ignore *args, - - **optional_params + **all_params, ) responses[i] = response["choices"][0] diff --git a/litellm/tests/test_text_completion.py b/litellm/tests/test_text_completion.py index c0ba750a3a..75fd3b732a 100644 --- a/litellm/tests/test_text_completion.py +++ b/litellm/tests/test_text_completion.py @@ -31,10 +31,10 @@ def test_completion_openai_prompt(): #print(response.choices[0].text) except Exception as e: pytest.fail(f"Error occurred: {e}") -test_completion_openai_prompt() +# test_completion_openai_prompt() -def test_completion_openai_prompt(): +def test_completion_chatgpt_prompt(): try: print("\n gpt3.5 test\n") response = text_completion( @@ -47,7 +47,7 @@ def test_completion_openai_prompt(): #print(response.choices[0].text) except Exception as e: pytest.fail(f"Error occurred: {e}") -test_completion_openai_prompt() +# test_completion_chatgpt_prompt() def test_text_completion_basic(): @@ -64,11 +64,11 @@ def test_text_completion_basic(): response_str = response["choices"][0]["text"] except Exception as e: pytest.fail(f"Error occurred: {e}") -test_text_completion_basic() +# test_text_completion_basic() # def test_completion_hf_prompt_array(): # try: -# litellm.set_verbose=True +# litellm.set_verbose=False # print("\n testing hf mistral\n") # response = text_completion( # model="huggingface/mistralai/Mistral-7B-v0.1",