openai
                                
                                
                                
                                    openai copied to clipboard
                            
                            
                            
                        Dart/Flutter SDK for ChatGPT and all OpenAI APIs (GPT, Dall-e..)
Following code: ```dart String encodedImage = await loadImage(imageFile); final message = OpenAIChatCompletionChoiceMessageModel( content: [ OpenAIChatCompletionChoiceMessageContentItemModel.imageUrl( 'data:image/jpeg;base64,$encodedImage', ), ], role: OpenAIChatMessageRole.user, ); final chatCompletion = await OpenAI.instance.chat.create( model: 'gpt-4-turbo', seed: 0,...
## Test Code ```dart test('chat stream', () async { OpenAI.baseUrl = "https://api.openai.com"; OpenAI.apiKey = "sk-**********"; var createStream = OpenAI.instance.chat.createStream(model: "gpt-3.5-turbo", messages: [ OpenAIChatCompletionChoiceMessageModel( role: OpenAIChatMessageRole.user, content: [ OpenAIChatCompletionChoiceMessageContentItemModel.text("Hi!") ]) ]);...
OpenAI just released some [new features](https://openai.com/blog/new-models-and-developer-products-announced-at-devday) to their API, namely: - [Assistants](https://platform.openai.com/docs/api-reference/assistants) - [Threads](https://platform.openai.com/docs/api-reference/threads) - [Vision input for Chat Completions](https://platform.openai.com/docs/guides/vision) - [Text to speech](https://platform.openai.com/docs/api-reference/audio/createSpeech) - [DALL-E 3 model for image...
Thank you for the great package! Could you consider adding a feature to upload files directly from Uint8List, specifying the filename?! This would significantly enhance file integration in Flutter web...
Hello @anasfik, Firstly, I want to express my appreciation for your work on the 'openai' project. It's been incredibly useful and well implemented. I am writing to suggest a feature...
OpenAI.instance.audio.createSpeech insists on saving the result to a file. It doesn't seem necessary (and is problematic for me). (Perhaps it could return the result if the file and directory were...
I have a suggestion, can Azure OpenAI's API also be supported? If there is no time for development, I can also take care of it.
Hi, I'd like to use OpenAI's TTS with chunks so we can start playing the speech before the full audio file has been created. Any information if this will be...
Could you replace `import 'dart:io';` with a cross-platform compatible `File` type to allow Web compatibility for file upload? Thank you Could for example use [https://pub.dev/packages/file_picker](https://pub.dev/packages/file_picker)
I got this exception when I run code on web. It works well when I run on Android. ` _aiMessages.add(OpenAIChatCompletionChoiceMessageModel( content: [ OpenAIChatCompletionChoiceMessageContentItemModel.text(prompt), OpenAIChatCompletionChoiceMessageContentItemModel.fromMap( {'type': 'image_url', 'image_url': imageUri}) ], role:...