API Reference eai v#1.0.5

Copy Markdown

Modules

HTTP API for Eai — OpenAI-compatible Chat Completions endpoint.

Behaviour for LLM provider adapters.

Anthropic Messages API wire format adapter.

AWS Bedrock Converse API wire format adapter with SigV4 signing.

OpenAI-compatible wire format adapter (also used for DeepSeek and similar providers).

Nebulex cache adapter for EAI

Character Card V2 loader and registry.

Main conversation GenServer managing multi-session chat history and async LLM tasks.

Carries all LLM hyper-parameters through the interactive / function-mode call chain. Every field defaults to nil (absent → fall back to model config → omit from HTTP body).

Git 仓库管理辅助函数

Behaviour + macro for user-level hook modules.

Central dispatch bus for all tool calls in eai.

Lists and inspects hook files from config/hooks/.

Runs pre/post hook pipelines and manages the :eai_hooks persistent_term registry.

Hot-reloads hook modules from config/hooks/*.exs.

Direct LLM API orchestration using Converse-based internal message IR.

Internal message representation (IR) based on AWS Bedrock Converse API format.

模型注册表查询接口。

Maps logical names to registered process names, supporting multi-instance deployments.

Public API for PTY session management.

OTP Registry for PTY sessions.

Per-session GenServer owning a single PTY process.

DynamicSupervisor that owns all Eai.PTY.Session processes.

Prompt registry. Loads from config/prompts/*.exs at runtime.

GenServer for background persistence of conversation history to compressed logs.

基于单次哨兵匹配的无状态流式收集器。 截取第 1 次 START 和第 1 次 END 之间的纯净执行结果。 (PTY 命令行用 base64 包装哨兵,回显中不再出现明文哨兵,无需奇偶校验。) 同时提供超时提醒窗口(深度计数器)和中断标记(Cache)机制。

Step 4 — whole-runtime snapshot and restore.

统一 telemetry 事件处理器。

Tool behaviour — each tool in config/tools/ implements schema/0 + execute/4.

通用清洗、转换等无业务耦合的工具函数。