mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 02:34:29 +00:00
21 lines
477 B
Python
21 lines
477 B
Python
# import openai
|
|
# import os
|
|
|
|
# os.environ["OPENAI_API_KEY"] = ""
|
|
|
|
# openai.api_key = os.environ["OPENAI_API_KEY"]
|
|
# openai.api_base ="http://localhost:5000"
|
|
|
|
# messages = [
|
|
# {
|
|
# "role": "user",
|
|
# "content": "write a 1 pg essay in liteLLM"
|
|
# }
|
|
# ]
|
|
|
|
# response = openai.ChatCompletion.create(model="gpt-3.5-turbo", messages=messages, stream=True)
|
|
# print("got response", response)
|
|
# # response is a generator
|
|
|
|
# for chunk in response:
|
|
# print(chunk)
|