diff --git a/litellm/tests/test_ollama_local.py b/litellm/tests/test_ollama_local.py index 160a8feaf34..1f11972e3ea 100644 --- a/litellm/tests/test_ollama_local.py +++ b/litellm/tests/test_ollama_local.py @@ -49,3 +49,43 @@ # pytest.fail(f"Error occurred: {e}") # # test_completion_ollama_stream() + + +# def prepare_messages_for_chat(text: str) -> list: +# messages = [ +# {"role": "user", "content": text}, +# ] +# return messages + + +# async def ask_question(): +# params = { +# "messages": prepare_messages_for_chat("What is litellm? tell me 10 things about it who is sihaan.write an essay"), +# "api_base": "http://localhost:11434", +# # "custom_llm_provider": "ollama", +# "model": "ollama/llama2", +# # "model": "gpt-3.5-turbo", +# # "api_key": os.environ["OPENAI_API_KEY"], +# "stream": True, +# } +# # response = litellm.completion(**params, max_tokens=10) +# # print(response) +# # for c in response: +# # print(c) +# response = await litellm.acompletion(**params) +# print(response) +# return response + + +# async def main(): +# response = await ask_question() +# print(response) + +# async for chunk in response: +# print(chunk) + + +# if __name__ == "__main__": +# import asyncio + +# asyncio.run(main())