mirror of
https://github.com/ollama/ollama.git
synced 2025-04-11 21:29:32 +02:00
Warn user on truncation - ollama logs
This commit is contained in:
parent
1d529d8b7b
commit
c9a46140e6
@ -82,6 +82,10 @@ func chatPrompt(ctx context.Context, m *Model, tokenize tokenizeFunc, opts *api.
|
||||
}
|
||||
|
||||
currMsgIdx := n
|
||||
// Warn user if messages are truncated from the input
|
||||
if numTruncatedMessages := len(msgs[0:currMsgIdx]); numTruncatedMessages > 0 {
|
||||
slog.Warn("truncated first messages from input", "num_truncated", numTruncatedMessages)
|
||||
}
|
||||
|
||||
for cnt, msg := range msgs[currMsgIdx:] {
|
||||
prefix := ""
|
||||
|
Loading…
x
Reference in New Issue
Block a user