feat: initial text-summarize v0.1.0 (text.summarize@0.1.0)
All checks were successful
CI / Linux x86_64 (Forgejo) (push) Successful in 1m32s
All checks were successful
CI / Linux x86_64 (Forgejo) (push) Successful in 1m32s
Ollama-backed summarisation module — fourth real F∆I capability,
following text.extract / llm.chat / text.translate. Completes
the text-processing trio for compose-grade workflows
(extract -> translate -> summarise, or any subset).
Capability:
Inputs:
text : text (source text)
style : text (e.g. "one paragraph", "three bullets";
defaults to "one paragraph")
language : text (output language hint; empty = source)
endpoint : text (Ollama /api/chat URL)
model : text
api_key : text (optional)
Outputs:
summary : text
style : text (echo for audit)
language : text (echo for audit)
model_endpoint : text
model_name : text
model_digest : text (Ollama /api/show probe; empty for
non-Ollama or transient failures)
Permissions: net to localhost / 127.0.0.1 / api.openai.com /
api.anthropic.com.
System prompt is conservative: faithful, neutral, preserves
named entities, no editorialising, no metadata. Reuses the LLM
client + digest-probe pattern from llm-chat / text-translate;
the duplication is acceptable at four modules and will be
factored into a shared crate when a fifth lands.
15 host-side tests cover prompt-building (style + language +
empty-language), Ollama-shaped response parsing, URL transform,
digest extraction, end-to-end success / probe-failure / non-
Ollama paths.
Wasm artifact: 118 KB. Built with v1.0 fai:platform imports.
Bootstrapped via 'fai new module text.summarize'.
Signed-off-by: flemming-it <sf@flemming.it>
This commit is contained in:
commit
3422fe526d
11 changed files with 1445 additions and 0 deletions
48
module.yaml
Normal file
48
module.yaml
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
schema_version: 1
|
||||
name: text-summarize
|
||||
version: 0.1.0
|
||||
|
||||
# Capability provided by this module.
|
||||
provides:
|
||||
- capability: text.summarize
|
||||
version: 0.1.0
|
||||
|
||||
# Inputs the invoke function accepts.
|
||||
inputs:
|
||||
# Source text to summarise.
|
||||
text: text
|
||||
# Style / shape of the summary, e.g. "one paragraph",
|
||||
# "three bullet points", "a tweet". Defaults to
|
||||
# "one paragraph" when omitted.
|
||||
style: text
|
||||
# Optional output language hint, e.g. "German", "ja-JP".
|
||||
# Empty = same language as the source.
|
||||
language: text
|
||||
# Ollama-shaped /api/chat endpoint.
|
||||
endpoint: text
|
||||
# Model identifier (e.g. "qwen2.5:14b").
|
||||
model: text
|
||||
# Optional bearer token for cloud-hosted endpoints.
|
||||
api_key: text
|
||||
|
||||
# Outputs produced.
|
||||
outputs:
|
||||
# The summary text.
|
||||
summary: text
|
||||
# Echo of the style input for downstream audit.
|
||||
style: text
|
||||
# Echo of the language input.
|
||||
language: text
|
||||
# Endpoint the summary was generated against.
|
||||
model_endpoint: text
|
||||
# Model identifier as supplied to the LLM API.
|
||||
model_name: text
|
||||
# SHA-256 digest of the served Ollama model (when reachable).
|
||||
model_digest: text
|
||||
|
||||
# Permissions required.
|
||||
permissions:
|
||||
- "net: localhost"
|
||||
- "net: 127.0.0.1"
|
||||
- "net: api.openai.com"
|
||||
- "net: api.anthropic.com"
|
||||
Loading…
Add table
Add a link
Reference in a new issue