tavily_dart 0.2.2 copy "tavily_dart: ^0.2.2" to clipboard
tavily_dart: ^0.2.2 copied to clipboard

Dart Client for the Tavily API (a search engine optimized for LLMs and RAG).

example/tavily_dart_example.dart

// ignore_for_file: avoid_print
import 'dart:io';

import 'package:tavily_dart/tavily_dart.dart';

void main() async {
  final apiKey = Platform.environment['TAVILY_API_KEY']!;
  final client = TavilyClient();

  // Basic search
  final res1 = await client.search(
    request: SearchRequest(
      apiKey: apiKey,
      query: 'Should I invest in Apple right now?',
    ),
  );
  print(res1);

  // Advanced search
  final res2 = await client.search(
    request: SearchRequest(
      apiKey: apiKey,
      query: 'Should I invest in Apple right now?',
      searchDepth: SearchRequestSearchDepth.advanced,
    ),
  );
  print(res2);
}
5
likes
160
points
787
downloads

Documentation

Documentation
API reference

Publisher

verified publisherlangchaindart.dev

Weekly Downloads

Dart Client for the Tavily API (a search engine optimized for LLMs and RAG).

Homepage
Repository (GitHub)
View/report issues

Topics

#ai #llms #search #rag

Funding

Consider supporting this project:

github.com

License

MIT (license)

Dependencies

freezed_annotation, http, json_annotation, meta

More

Packages that depend on tavily_dart