mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-12 23:01:41 +00:00
(test) add text completion steaming test
This commit is contained in:
parent
2a751c277f
commit
4dd7e2519f
1 changed files with 11 additions and 1 deletions
|
|
@ -122,4 +122,14 @@ def test_completion_hf_prompt_array():
|
|||
# response_str = response["choices"][0]["text"]
|
||||
except Exception as e:
|
||||
pytest.fail(f"Error occurred: {e}")
|
||||
test_completion_hf_prompt_array()
|
||||
# test_completion_hf_prompt_array()
|
||||
|
||||
def test_text_completion_stream():
|
||||
response = text_completion(
|
||||
model="huggingface/mistralai/Mistral-7B-v0.1",
|
||||
prompt="good morning",
|
||||
stream=True
|
||||
)
|
||||
for chunk in response:
|
||||
print(chunk)
|
||||
test_text_completion_stream()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue