tavily_dart 0.1.0+1 copy "tavily_dart: ^0.1.0+1" to clipboard
tavily_dart: ^0.1.0+1 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);
}
3
likes
160
points
84
downloads

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
Contributing

Topics

#ai #llms #search #rag

Documentation

Documentation
API reference

License

MIT (license)

Dependencies

fetch_client, freezed_annotation, http, json_annotation, meta

More

Packages that depend on tavily_dart