Skip to content

Commit

Permalink
snipp
Browse files Browse the repository at this point in the history
  • Loading branch information
danemadsen committed Feb 10, 2025
1 parent e9c895c commit 3202ca6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/llama_native.dart
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class LlamaNative implements Llama {
throw Exception('Failed to apply template');
}

final prompt = formatted.cast<Utf8>().toDartString().substring(_contextLength);
final prompt = formatted.cast<Utf8>().toDartString().substring(_contextLength, newContextLength);

final vocab = Llama.lib.llama_model_get_vocab(_model);
final isFirst = Llama.lib.llama_get_kv_cache_used_cells(_context) == 0;
Expand Down

0 comments on commit 3202ca6

Please sign in to comment.