diff --git a/litellm/tests/test_completion.py b/litellm/tests/test_completion.py index 6bd7cf1b5e8..c9bcc3a5ba2 100644 --- a/litellm/tests/test_completion.py +++ b/litellm/tests/test_completion.py @@ -4170,45 +4170,6 @@ def test_completion_deepseek(): pytest.fail(f"Error occurred: {e}") -# Palm tests -def test_completion_palm(): - litellm.set_verbose = True - model_name = "palm/chat-bison" - messages = [{"role": "user", "content": "Hey, how's it going?"}] - try: - response = completion(model=model_name, messages=messages) - # Add any assertions here to check the response - print(response) - except litellm.APIError as e: - pass - except Exception as e: - pytest.fail(f"Error occurred: {e}") - - -# test_completion_palm() - - -# test palm with streaming -def test_completion_palm_stream(): - # litellm.set_verbose = True - model_name = "palm/chat-bison" - try: - response = completion( - model=model_name, - messages=messages, - stop=["stop"], - stream=True, - max_tokens=20, - ) - # Add any assertions here to check the response - for chunk in response: - print(chunk) - except litellm.APIError as e: - pass - except Exception as e: - pytest.fail(f"Error occurred: {e}") - - @pytest.mark.skip(reason="Account deleted by IBM.") def test_completion_watsonx(): litellm.set_verbose = True diff --git a/litellm/tests/test_langchain_ChatLiteLLM.py b/litellm/tests/test_langchain_ChatLiteLLM.py index 27bc209f1b7..9b306886c62 100644 --- a/litellm/tests/test_langchain_ChatLiteLLM.py +++ b/litellm/tests/test_langchain_ChatLiteLLM.py @@ -55,22 +55,6 @@ # # test_claude() -# def test_palm(): -# try: -# chat = ChatLiteLLM(model="palm/chat-bison", max_tokens=10) -# messages = [ -# HumanMessage( -# content="what model are you" -# ) -# ] -# resp = chat(messages) - -# print(resp) -# except Exception as e: -# pytest.fail(f"Error occurred: {e}") - -# # test_palm() - # # def test_openai_with_params(): # # try: diff --git a/litellm/tests/test_provider_specific_config.py b/litellm/tests/test_provider_specific_config.py index a7765f658cb..8a3fa624829 100644 --- a/litellm/tests/test_provider_specific_config.py +++ b/litellm/tests/test_provider_specific_config.py @@ -269,49 +269,6 @@ def togetherai_test_completion(): # Palm -def palm_test_completion(): - litellm.PalmConfig(max_output_tokens=10, temperature=0.9) - # litellm.set_verbose=True - try: - # OVERRIDE WITH DYNAMIC MAX TOKENS - response_1 = litellm.completion( - model="palm/chat-bison", - messages=[ - { - "content": "Hello, how are you? Be as verbose as possible", - "role": "user", - } - ], - max_tokens=100, - ) - response_1_text = response_1.choices[0].message.content - print(f"response_1_text: {response_1_text}") - - # USE CONFIG TOKENS - response_2 = litellm.completion( - model="palm/chat-bison", - messages=[ - { - "content": "Hello, how are you? Be as verbose as possible", - "role": "user", - } - ], - ) - response_2_text = response_2.choices[0].message.content - print(f"response_2_text: {response_2_text}") - - assert len(response_2_text) < len(response_1_text) - - response_3 = litellm.completion( - model="palm/chat-bison", - messages=[{"content": "Hello, how are you?", "role": "user"}], - n=2, - ) - assert len(response_3.choices) > 1 - except Exception as e: - pytest.fail(f"Error occurred: {e}") - - # palm_test_completion() # NLP Cloud diff --git a/litellm/tests/test_streaming.py b/litellm/tests/test_streaming.py index 2ba6d717e7f..5faa6b5609b 100644 --- a/litellm/tests/test_streaming.py +++ b/litellm/tests/test_streaming.py @@ -709,43 +709,6 @@ async def test_acompletion_claude_2_stream(): pytest.fail(f"Error occurred: {e}") -def test_completion_palm_stream(): - try: - litellm.set_verbose = False - print("Streaming palm response") - messages = [ - {"role": "system", "content": "You are a helpful assistant."}, - { - "role": "user", - "content": "how does a court case get to the Supreme Court?", - }, - ] - print("testing palm streaming") - response = completion(model="palm/chat-bison", messages=messages, stream=True) - - complete_response = "" - # Add any assertions here to check the response - for idx, chunk in enumerate(response): - print(chunk) - # print(chunk.choices[0].delta) - chunk, finished = streaming_format_tests(idx, chunk) - if finished: - break - complete_response += chunk - if complete_response.strip() == "": - raise Exception("Empty response received") - print(f"completion_response: {complete_response}") - except litellm.Timeout as e: - pass - except litellm.APIError as e: - pass - except Exception as e: - pytest.fail(f"Error occurred: {e}") - - -# test_completion_palm_stream() - - @pytest.mark.parametrize( "sync_mode", [True, False],