File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -46,10 +46,10 @@ public actor PromptCache {
46
46
print ( " [getUncachedSuffix] comPrefixLength: \( comPrefixLength) " )
47
47
48
48
if comPrefixLength == self . tokens. size {
49
- let optPrompt = prompt [ comPrefixLength..< prompt. size]
49
+ let suffix = prompt [ comPrefixLength..< prompt. size]
50
50
print ( " Concating... " )
51
- self . tokens = concatenated ( [ self . tokens, optPrompt ] , axis: 0 )
52
- return optPrompt
51
+ self . tokens = concatenated ( [ self . tokens, suffix ] , axis: 0 )
52
+ return suffix
53
53
} else if ( comPrefixLength < self . tokens. size) {
54
54
if isTrimmable ( ) {
55
55
print ( " trimming: \( self . tokens. size - comPrefixLength) " )
@@ -59,9 +59,9 @@ public actor PromptCache {
59
59
print ( " Warning: request trimmed amount and actual trimmed amount are different " )
60
60
}
61
61
self . tokens = self . tokens [ 0 ..< comPrefixLength]
62
- let optPrompt = prompt [ comPrefixLength..< prompt. size]
63
- self . tokens = concatenated ( [ self . tokens, optPrompt ] , axis: 0 )
64
- return optPrompt
62
+ let suffix = prompt [ comPrefixLength..< prompt. size]
63
+ self . tokens = concatenated ( [ self . tokens, suffix ] , axis: 0 )
64
+ return suffix
65
65
} else {
66
66
// Caller must create a new cache
67
67
return nil
You can’t perform that action at this time.
0 commit comments