A pure Dart package, no SDKs, one interface (LlmClient) over Anthropic's Messages API, OpenAI's chat completions, in each known host's dialect and the local servers' (D45), and OpenAI's Responses API, stateless (D46). A model's turn keeps what its provider wants back with the tools' results: Anthropic's thinking blocks, the Responses API's reasoning items and message phase, Gemini's thought signatures. Failures come by kind, the provider's words cut and without keys. Tested on replies written from the providers' documentation, replayed in pieces of 1, 7 and 4,096 bytes; tool/record_llm.dart records real ones with a key of one's own, which the tests then run on too (D36). FakeLlmClient for the code that uses it. BSD-3-Clause, as halkyon_oidc. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
11 lines
522 B
Dart
11 lines
522 B
Dart
/// Language models' APIs in pure Dart, streamed, over plain HTTP (ADR 0021,
|
|
/// point 5): Anthropic's Messages API and OpenAI's chat completions, and
|
|
/// every service compatible with it, behind one interface of what both
|
|
/// share: a system prompt and messages, text as it is written, images, and
|
|
/// tool calls. Nothing here keeps or logs what is asked or answered.
|
|
library;
|
|
|
|
export 'src/client.dart' show HttpLlmClient, LlmClient;
|
|
export 'src/conversation.dart';
|
|
export 'src/endpoint.dart';
|
|
export 'src/failure.dart';
|