ai_clients 0.2.0 copy "ai_clients: ^0.2.0" to clipboard
ai_clients: ^0.2.0 copied to clipboard

A Dart package providing a unified interface for interacting with various AI models through different clients.

example/example.dart

import 'package:ai_clients/ai_clients.dart';

void main() async {
  const prompt = 'Hello, how are you?';

  // BasetenClient example
  var basetenClient = AiClients.baseten();
  var basetenResponse = await basetenClient.query(prompt: prompt);
  print('BasetenClient response: $basetenResponse');

  // OpenAiClient example
  var openAiClient = AiClients.openAi();
  var openAiResponse = await openAiClient.query(prompt: prompt);
  print('OpenAiClient response: $openAiResponse');

  // TogetherClient example
  var togetherClient = AiClients.together();
  var togetherResponse = await togetherClient.query(prompt: prompt);
  print('TogetherClient response: $togetherResponse');
}
0
likes
0
points
21
downloads

Publisher

unverified uploader

Weekly Downloads

A Dart package providing a unified interface for interacting with various AI models through different clients.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

dio

More

Packages that depend on ai_clients