halkyon/packages/halkyon_llm/lib/halkyon_llm.dart
Tizian 「ティツィアーン」 038aca5439
feat(llm): halkyon_llm, language models' APIs streamed over plain HTTP (ADR 0021, step 2)
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>
2026-10-26 07:17:06 +01:00

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';