dash_agent 0.4.0 copy "dash_agent: ^0.4.0" to clipboard
dash_agent: ^0.4.0 copied to clipboard

Framework package to create and publish dash agents for commanddash

example/main.dart

import 'package:dash_agent/configuration/command.dart';
import 'package:dash_agent/configuration/dash_agent.dart';
import 'package:dash_agent/configuration/metadata.dart';
import 'package:dash_agent/dash_agent.dart';
import 'package:dash_agent/data/datasource.dart';

import 'ask_command.dart';
import 'data_sources.dart';

void main() {
  processAgent(MyAgent());
}

class MyAgent extends AgentConfiguration {
  final docsSource = DocsDataSource();
  final blogsSource = BlogsDataSource();

  @override
  Metadata get metadata => Metadata(name: 'My Agent');

  @override
  List<DataSource> get registerDataSources => [docsSource, blogsSource];

  @override
  String get registerSystemPrompt =>
      'You are a Flutter expert who answers user queries related to the framework.';

  @override
  List<Command> get registerSupportedCommands =>
      [AskCommand(docsSource: docsSource)];
}
4
likes
150
pub points
0%
popularity

Publisher

verified publishercommanddash.io

Framework package to create and publish dash agents for commanddash

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

http, meta, path, xml

More

Packages that depend on dash_agent