mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 03:34:10 +00:00
fix tg ai
This commit is contained in:
parent
100ded08ca
commit
a8a61c51a2
1 changed files with 13 additions and 13 deletions
|
@ -283,20 +283,20 @@ def test_petals():
|
||||||
# pytest.fail(f"Error occurred: {e}")
|
# pytest.fail(f"Error occurred: {e}")
|
||||||
|
|
||||||
|
|
||||||
import asyncio
|
# import asyncio
|
||||||
def test_completion_together_ai_stream():
|
# def test_completion_together_ai_stream():
|
||||||
try:
|
# try:
|
||||||
response = completion(model="togethercomputer/llama-2-70b-chat", messages=messages, custom_llm_provider="together_ai", stream=True, max_tokens=200)
|
# response = completion(model="togethercomputer/llama-2-70b-chat", messages=messages, custom_llm_provider="together_ai", stream=True, max_tokens=200)
|
||||||
print(response)
|
# print(response)
|
||||||
asyncio.run(get_response(response))
|
# asyncio.run(get_response(response))
|
||||||
# print(string_response)
|
# # print(string_response)
|
||||||
except Exception as e:
|
# except Exception as e:
|
||||||
pytest.fail(f"Error occurred: {e}")
|
# pytest.fail(f"Error occurred: {e}")
|
||||||
|
|
||||||
|
|
||||||
async def get_response(generator):
|
# async def get_response(generator):
|
||||||
async for elem in generator:
|
# async for elem in generator:
|
||||||
print(elem)
|
# print(elem)
|
||||||
return
|
# return
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue