I am getting an error when I want to use a fine-tuned da-vinci model. I can’t make request from python and use it. I read Open AI API References but there is nothing about anything for da-vinci API requests. Can you help me about fix this problem ? Thx.
from openai import OpenAI
import os
client = OpenAI(api_key =‘API_KEY’)
model = “ft:davinci-002:xxxxxxxxxxxx”
stream = client.completions.create(
model= model,
messages={
“prompt”: “”,
“completion”: “<the answer of the prompt. \n>”}
)
for chunk in stream:
if chunk.choices[0].prompt is not None:
print(chunk.choices[0].delta.content)