test02 / test.py
manishgupta006's picture
all files added
5d3b777
raw
history blame contribute delete
No virus
324 Bytes
import openai
openai.api_key = 'fake-api'
openai.base_url = "http://localhost:3040/v1/"
completion = openai.chat.completions.create(
model="gpt-3.5-turbo",
messages=[
{"role": "user", "content": "How do I list all files in a directory using Python?"},
],
)
print(completion.choices[0].message.content)