var req = new CreateCompletionRequest{
Model = "text-davinci-003",
Prompt = "Say this is a test.",
MaxTokens = 7,
Temperature = 0
};
openai.CreateCompletionAsync(req,
(responses) => {
var result = string.Join("", responses.Select(response => response.Choices[0].Delta.Content));
Debug.Log(result);
},
() => {
Debug.Log("completed");
},
new CancellationTokenSource());
}
Should be
var req = new CreateCompletionRequest{
Model = "text-davinci-003",
Prompt = "Say this is a test.",
MaxTokens = 7,
Temperature = 0
};
openai.CreateCompletionAsync(req,
(responses) => {
var result = string.Join("", responses.Select(response => response.Choices[0].Text));
Debug.Log(result);
},
() => {
Debug.Log("completed");
},
new CancellationTokenSource());
}
Should be