mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-24 18:24:20 +00:00
(test) add palm streaming
This commit is contained in:
parent
9f180831fe
commit
af674701af
1 changed files with 19 additions and 0 deletions
|
@ -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 #
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue