gpt_3_dart 0.0.1 copy "gpt_3_dart: ^0.0.1" to clipboard
gpt_3_dart: ^0.0.1 copied to clipboard

Unofficial Dart package for OpenAI's GPT-3 API.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'complete.dart';
import 'search.dart';
import 'package:gpt_3_dart/gpt_3_dart.dart';

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

class MyApp extends StatelessWidget {
  final OpenAI openAI =
      new OpenAI(apiKey: "YOUR_KEY_HERE");
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: DefaultTabController(
        length: 2,
        child: Scaffold(
          appBar: AppBar(
            bottom: TabBar(
              tabs: [
                Tab(text: "Completion"),
                Tab(text: "Search"),
              ],
            ),
            title: Text('GPT-3 API Demo'),
          ),
          body: TabBarView(
            children: [
              CompletionForm(openAI),
              SearchForm(openAI),
            ],
          ),
        ),
      ),
    );
  }
}
19
likes
30
pub points
0%
popularity

Publisher

unverified uploader

Unofficial Dart package for OpenAI's GPT-3 API.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter, http, meta

More

Packages that depend on gpt_3_dart