chatgpt_package 0.0.3 copy "chatgpt_package: ^0.0.3" to clipboard
chatgpt_package: ^0.0.3 copied to clipboard

A Flutter package to integrate OpenAI's GPT-3.5 turbo model for conversational AI directly into your Flutter applications.

Please not that you need to get working api key from OpenAi to enable ChatGpt

Sample Usage: #

import 'package:flutter/material.dart';
import 'package:chatgpt_package/chatgpt_module.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    // Replace with your OpenAI API key
    String openaiApiKey = 'YOUR_OPENAI_API_KEY';

    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text('ChatGPT Demo'),
        ),
        body: Center(
          child: Padding(
            padding: const EdgeInsets.all(16.0),
            child: ChatgptModule(token: openaiApiKey),
          ),
        ),
      ),
    );
  }
}
2
likes
140
points
39
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package to integrate OpenAI's GPT-3.5 turbo model for conversational AI directly into your Flutter applications.

Homepage

Documentation

API reference

License

MIT (license)

Dependencies

flutter, http

More

Packages that depend on chatgpt_package