Open hanchao2407 opened 10 months ago
any progress on this?
@hanchao2407 you can description more for this issue ?
No plans for this?
@BernardinD @hanchao2407
void chatComplete() async {
final request = UploadFile(file: FileInfo('file-path', 'file-name'),purpose: 'image');
final fileResponse = await openAI.file.uploadFile(request);
print(fileResponse );
final request = ChatCompleteText(messages: [
Map.of({"role": "system", "content": "You are a helpful assistant."}),
Map.of({"role": "user", "content": "Please analyze the uploaded image with file ID: ${fileResponse.id}"})
], maxToken: 200, model: Gpt4ChatModel());
final response = await openAI.onChatCompletion(request: request);
for (var element in response!.choices) {
print("data -> ${element.message?.content}");
}
}
comingsoon @hanchao2407