Document prepared message content hashes
This commit is contained in:
@@ -559,12 +559,17 @@ if err != nil {
|
||||
defer preparedExecution.Discard()
|
||||
|
||||
details := preparedExecution.Details()
|
||||
messageContentHash := details.MessageContentHash
|
||||
_ = messageContentHash // An opaque value available before model execution.
|
||||
// Inspect or persist an application-selected safe subset of details.
|
||||
|
||||
result, err := engine.RunPrepared(ctx, preparedExecution)
|
||||
```
|
||||
|
||||
Preparation does not call the model or reserve backend capacity.
|
||||
`MessageContentHash` compares the ordered message roles and text, whereas
|
||||
`RenderedPromptHash` also includes the session and cache-control hints. See
|
||||
the [`PreparedRun` GoDoc](../../types.go) for their contracts and compatibility.
|
||||
`RunPrepared` executes from the retained snapshot rather than reloading
|
||||
consumer sources. The handle is opaque in-process state, while `Details`
|
||||
contains rendered content and remains subject to the application's data
|
||||
|
||||
Reference in New Issue
Block a user