dataSources property

List<DataSource>? dataSources
final

List of data sources that the agent can access to provide more relevant information.

Data sources can be used to provide the agent with access to documentation, code examples, or other relevant information that can help it understand the context of the conversation and provide better responses.

Example:

final chatMode = ChatMode(
  systemPrompt: '...', // System prompt
  dataSources: [
    DocsDataSource(), // Provide the Flutter documentation
    CodeExamplesDataSource(), // Provide code examples
  ],
);

Implementation

final List<DataSource>? dataSources;