F module - generic Ollama-compatible LLM chat adapter (llm.chat).
Find a file
flemming-it d5b4d339ce
Some checks failed
CI / Linux x86_64 (Forgejo) (push) Failing after 2s
chore: contact email platform@ -> chain@flemming.ai
Signed-off-by: flemming-it <sf@flemming.it>
2026-06-16 10:16:30 +02:00
.forgejo/workflows docs: old product name F∆I Platform -> Ch∆In 2026-06-16 10:15:26 +02:00
src feat: initial llm-chat v0.1.0 (llm.chat@0.1.0) 2026-05-03 23:17:36 +02:00
.gitignore feat: initial llm-chat v0.1.0 (llm.chat@0.1.0) 2026-05-03 23:17:36 +02:00
Cargo.lock refactor: rename to chain:platform WIT + provider chain 2026-06-15 22:54:53 +02:00
Cargo.toml chore: SDK URL → git.flemming.ai/fai/module-sdk-rust 2026-05-26 13:16:53 +02:00
LICENSE feat: initial llm-chat v0.1.0 (llm.chat@0.1.0) 2026-05-03 23:17:36 +02:00
MODULE.de.md refactor: rename to chain:platform WIT + provider chain 2026-06-15 22:54:53 +02:00
MODULE.md refactor: rename to chain:platform WIT + provider chain 2026-06-15 22:54:53 +02:00
module.yaml refactor: rename to chain:platform WIT + provider chain 2026-06-15 22:54:53 +02:00
NOTICE feat: initial llm-chat v0.1.0 (llm.chat@0.1.0) 2026-05-03 23:17:36 +02:00
README.md chore: contact email platform@ -> chain@flemming.ai 2026-06-16 10:16:30 +02:00
rust-toolchain.toml feat: initial llm-chat v0.1.0 (llm.chat@0.1.0) 2026-05-03 23:17:36 +02:00

llm-chat

F∆I module providing the llm.chat capability — a generic Ollama-compatible LLM chat adapter.

Capability

Field Value
Capability llm.chat@0.1.0
Inputs prompt: text, endpoint: text, model: text, api_key: text (opt), system_prompt: text (opt)
Outputs response: text, model_endpoint: text, model_name: text, model_digest: text
Permissions net: localhost, net: 127.0.0.1, net: api.openai.com, net: api.anthropic.com
Status (in store index) alpha

Why a separate module from orchestrator-llm

orchestrator-llm wraps an LLM call inside a planning prompt that emits a structured F∆I Plan. llm.chat is the lower- level adapter: it sends a prompt and returns the assistant text verbatim. Flows that need a generic chat step (summarisation, translation, free-form Q&A) compose llm.chat directly; flows that need plan generation use orchestrator-llm.

Audit fields

model_endpoint, model_name, and model_digest are emitted on every successful invocation. Together they answer the audit question "which exact model produced this response?" The digest probe targets Ollama's /api/show and is best-effort — non- Ollama endpoints and transient probe failures yield an empty digest rather than blocking the response. Cf. Ch∆In docs/advanced/compliance-gaps.md Gap 1.

Build

cargo build --release --target wasm32-wasip2

Test

cargo test                       # 11 tests, all host-side
cargo build --release --target wasm32-wasip2

SDK source

The Cargo.toml git-deps fai-module-sdk from https://git.flemming.ws/fai/module-sdk.git. The Forgejo instance has REQUIRE_SIGNIN_VIEW=true, so anonymous clones fail; CI uses the MODULE_SDK_PAT actions secret + git config url.X.insteadOf Y to authenticate cargo's git fetch transparently. Local dev uses the same pattern via env vars.

License

Apache-2.0.

Author: Dr. Stefan Flemming, Flemming.AI chain@flemming.ai Repository: https://git.flemming.ws/fai-modules/llm-chat