Spaces:
Sleeping
Sleeping
File size: 324 Bytes
5d3b777 |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
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) |