mirror of
https://github.com/tiennm99/litellm.git
synced 2026-07-10 19:04:29 +00:00
(test) add palm streaming
This commit is contained in:
@@ -1330,6 +1330,25 @@ def test_completion_palm():
|
||||
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 Exception as e:
|
||||
pytest.fail(f"Error occurred: {e}")
|
||||
# test_completion_palm_stream()
|
||||
|
||||
# test_completion_deep_infra()
|
||||
# test_completion_ai21()
|
||||
# test config file with completion #
|
||||
|
||||
Reference in New Issue
Block a user