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

A Dart client for interacting with the PaLM API, allowing developers to build generative AI applications.

example/palm_api_example.dart

import 'package:palm_api/palm_api.dart';

Future<void> main() async {
// Instantiate the client
  final palm = TextService(apiKey: 'YOUR_API_KEY');

// Generate a message
  final response = await palm.generateText(
    model: PalmModel.textBison001.name, // or 'text-bison-001'
    prompt: TextPrompt(text: 'Hello'),
  );

// Print the candidates
  response.candidates.forEach(print);
}
3
likes
160
pub points
33%
popularity

Publisher

verified publisherleoafarias.com

A Dart client for interacting with the PaLM API, allowing developers to build generative AI applications.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

http

More

Packages that depend on palm_api