dartantic_interface 3.0.0 copy "dartantic_interface: ^3.0.0" to clipboard
dartantic_interface: ^3.0.0 copied to clipboard

Interface definitions for dartantic_ai for use in building custom providers.

Welcome to dartantic_interface! #

This repo contains the implementation for the dartantic_interface package. It forms the base set of interfaces used to implement providers and chat and embeddings models for dartantic_ai.

By implementing a custom provider based on dartantic_interface, you do not need to depend on all of dartantic_ai. Likewise, your provider does not need to be multi-platform or support wasm, as is the requirement for providers built into dartantic_ai.

Core Types #

This package re-exports core message and part types from genai_primitives:

  • ChatMessage, ChatMessageRole - Conversation messages
  • Part, TextPart, DataPart, LinkPart, ThinkingPart - Message content
  • ToolPart, ToolPartKind - Tool calls and results
  • ToolDefinition - Tool schema definitions

Schema construction is provided by json_schema_builder. Use the S builder class:

import 'package:dartantic_interface/dartantic_interface.dart';

final schema = S.object(properties: {
  'name': S.string(description: 'User name'),
  'age': S.integer(minimum: 0),
});
1
likes
160
points
1.41k
downloads

Publisher

verified publishersellsbrothers.com

Weekly Downloads

Interface definitions for dartantic_ai for use in building custom providers.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

genai_primitives, json_schema_builder, logging, meta, mime, uuid

More

Packages that depend on dartantic_interface