Document the library migration and update examples
This commit is contained in:
@@ -1,34 +1,22 @@
|
||||
# OpenAI-Compatible LLM Integration
|
||||
|
||||
Audita uses the pinned [PromptKit](https://forge.maximumdirect.net/base-layer/promptkit/src/commit/171fb11f4e967a1da3af57843c6467954b14ba09)
|
||||
built-in OpenAI-compatible transport. PromptKit owns chat-completions wire framing,
|
||||
provider envelope parsing, transient retries, per-generation timeouts, and JSON
|
||||
Schema repair. A backend's configured base endpoint must support the selected
|
||||
profile's model and structured JSON-schema responses; local configuration
|
||||
inspection does not contact the provider.
|
||||
Audita uses [PromptKit v0.25.0](https://forge.maximumdirect.net/base-layer/promptkit/src/tag/v0.25.0/docs/integrations/openai-compatible-chat.md)
|
||||
for its OpenAI-compatible transport, provider conventions, credentials, retries,
|
||||
admission, and observed token and cost information. Inspection prepares requests
|
||||
without contacting a provider or requiring model credentials.
|
||||
|
||||
Audita selects role profiles independently for each pipeline entry and supplies
|
||||
its domain response schema and per-operation budget. PromptKit owns backend and
|
||||
credential selection, request preparation, transport, retries, repairs, and
|
||||
admission. Audita executes the same prepared handle and retains its own domain
|
||||
validation. Profiles may use native endpoint and credential settings; local
|
||||
inspection does not resolve a credential value or call the provider.
|
||||
Audita selects a profile for each proposal, validation, and correction-repair
|
||||
role. The selected prompt supplies the output contract and structural-repair
|
||||
budget, while Audita retains its operation timeout, transient retry selection,
|
||||
semantic correction-repair budget, and domain checks. Operator prompt contracts
|
||||
must produce the response shapes expected by Audita. See [configuration](../config.md)
|
||||
and the [migration guide](../migrations/v4.1.md).
|
||||
|
||||
`llm.transient_retries` counts additional attempts for eligible transient
|
||||
failures; explicit zero makes one attempt. `llm.repair_attempts` counts
|
||||
additional generations for schema-invalid model output. The operation timeout
|
||||
covers preparation, capacity waiting, retries, generation, and repair. Caller
|
||||
cancellation or an earlier deadline also applies. See [configuration](../config.md#settings)
|
||||
for defaults and the [PromptKit consumer contract](https://forge.maximumdirect.net/base-layer/promptkit/src/tag/v0.23.0/docs/consumers/pkg-promptkit.md)
|
||||
for protocol and retry details.
|
||||
|
||||
A model operation that exhausts structural repair, a live-parent local operation
|
||||
timeout, capacity rejection, transport failure, malformed provider response,
|
||||
or provider HTTP failure is recoverable for that operation. Proposal generation
|
||||
then contributes no candidates from that response; a failed validation batch
|
||||
marks its candidates unavailable while other batches and later modules can
|
||||
continue. Caller cancellation, broken assets or configuration, and unknown
|
||||
internal failures remain fatal and cancel peers. Audita decodes into domain
|
||||
types only after PromptKit validates the JSON. Ordinary reports use safe reason
|
||||
codes and counts rather than provider messages. Full request/response content
|
||||
is written only with `--debug`; see [operations](../operations.md#debug-evidence).
|
||||
Exhausted structural validation, an incompatible response JSON, a live-parent
|
||||
operation timeout, capacity rejection, transport failure, malformed provider
|
||||
response, or provider HTTP failure is recoverable for the affected operation.
|
||||
Proposal generation contributes no candidates from a failed response; a failed
|
||||
validation batch makes its candidates unavailable while independent work can
|
||||
continue. Caller cancellation, broken assets or configuration, and internal
|
||||
programming failures remain fatal. Ordinary reports use safe reason codes and
|
||||
counts. Full interaction content is optional [debug evidence](../operations.md#debug-evidence).
|
||||
|
||||
@@ -105,7 +105,9 @@ transcript excerpts or correction lists.
|
||||
|
||||
With `--debug`, `correction-ledger.json` contains proposed candidates and
|
||||
their application, rejection, or interruption details. `llm-execution.json`
|
||||
holds logical calls and PromptKit execution events. Interaction request/response
|
||||
holds `summary`, `calls`, and `events` with Audita attribution and nested native
|
||||
PromptKit evidence. Interaction request payloads include the prepared native
|
||||
contract and message hash when preparation succeeded. Interaction request/response
|
||||
artifacts and input snapshots are also debug-only. Records carry zero-based
|
||||
`stage_index` and optional `stage_id` where an entry is identified.
|
||||
These files are diagnostic evidence, not an alternate ordinary report schema.
|
||||
|
||||
@@ -15,8 +15,9 @@ directory. For stdout output, reports use the effective `reporting.stdout_dir`
|
||||
override. A config-file or overlay value for `reporting.stdout_dir` alone does
|
||||
not redirect file-output reports. `--work-dir` selects a debug root, while
|
||||
`--debug` enables capture; the path flag alone does not.
|
||||
Supplying a configuration path also makes file selection predictable; only
|
||||
explicitly referenced credential variables are read from the environment.
|
||||
Supplying a configuration path also makes file selection predictable. Configured
|
||||
secrets bootstrap can populate the child environment before the shared load;
|
||||
see [configuration](../config.md#loading-and-composition).
|
||||
|
||||
Choose a trusted configuration bundle. An explicit main path still allows
|
||||
its configured imports and automatic overlay, glossary, and prompt companions.
|
||||
@@ -41,7 +42,8 @@ Interpret the exit result according to the
|
||||
Consume transcript/report data through the
|
||||
[output-file contract](output-files.md), and treat stderr as human-readable detail.
|
||||
Audita loads configuration and parses the input transcript before report
|
||||
initialization. Early destination failures can also leave no reports. After
|
||||
initialization. Bootstrap failure also occurs before transcript and output
|
||||
preparation and may leave no reports. Early destination failures can also leave no reports. After
|
||||
initialization, failed reports can describe partial processing or output
|
||||
failures and use the same report directory as successful runs.
|
||||
Exit `0` can include recoverable model errors and applied
|
||||
|
||||
Reference in New Issue
Block a user