A Flutter/Dart client package for using OpenAI APIs easily, for AI image generations, AI completions & more


it’s time to simplify and accelerate your AI projects! :bulb: I’m proud to announce the release of the Dart language client library for OpenAI APIs. With this library, you can access all OpenAI APIs with ease and efficiency inside a Flutter/Dart app, saving you time and effort in building custom integrations.
With a simple and intuitive API design, this library makes it easy to integrate OpenAI into your projects and start creating intelligent solutions right away. Plus, with regular updates and active support, you can be sure that your integration will always stay up-to-date and running smoothly.
So why wait? Give it a try today and see the difference it can make in your AI development process. And don’t forget to share your feedback and suggestions – I’m always looking for ways to improve and make this library even better.

Check it from here:

1 Like

I have a question: when I use dart_openai to create a chatbot application, the problem occurs that every time I send a new message, the previous message is forgotten, and in fact, it looks like a new chat is opened. How can I solve this?

1 Like

Hi, this is the usual tand normal thing that happens when you use the completions methods that links to the completions API offered by OpenAI.

dart_openai wraps those APIs so you can use them in a full Dart experience.

However, I guess you should try the chat completion that offers you the option to send a full chat conversation and get its response:

OpenAIChatCompletionModel chatCompletion = await OpenAI.instance.chat.create(
    model: "gpt-3.5-turbo",
    messages: [
        content: "hello, what is Flutter and Dart ?",
        role: OpenAIChatMessageRole.user,

So you can have now a chat experience that remembers previous messages, but please check this first so you’re aware of limitations.


BTW: Love this package.Thanks.