gemini_langchain 0.0.1+1 copy "gemini_langchain: ^0.0.1+1" to clipboard
gemini_langchain: ^0.0.1+1 copied to clipboard

A Dart/Flutter package that seamlessly connects LangChain’s prompt templating with Gemini AI’s streaming API

example/example.dart

import 'package:gemini_langchain/gemini_langchain.dart';

final chain = LangChain(
  template: '''
You are a helpful assistant.

Here is data:
{data}

Question:
{question}
''',
);

void askAI() async {
  final variables = {
    'data': 'List of products...',
    'question': 'What product is best for me?'
  };

  await for (final chunk in chain.run(variables)) {
    print('AI response so far: $chunk');
    // Update your UI progressively here
  }
}
7
likes
0
points
29
downloads

Publisher

unverified uploader

Weekly Downloads

A Dart/Flutter package that seamlessly connects LangChain’s prompt templating with Gemini AI’s streaming API

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, flutter_gemini, http, langchain

More

Packages that depend on gemini_langchain