Skip to content

Commit 0e887f8

Browse files
committed
fix another instance of breaking api change
1 parent 991b3da commit 0e887f8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

plugins/codemodder-plugin-llm/src/main/java/io/codemodder/plugins/llm/SarifToLLMForBinaryVerificationAndFixingCodemod.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,8 @@ private BinaryThreatAnalysis analyzeThreat(
151151
// If the estimated token count, which doesn't include the function (~100 tokens) or the reply
152152
// (~200 tokens), is close to the max, then assume the code is safe (for now).
153153
int tokenCount =
154-
model.tokens(List.of(systemMessage.getContent(), userMessage.getContent().toString()));
154+
model.tokens(
155+
List.of(systemMessage.getStringContent(), userMessage.getContent().toString()));
155156
if (tokenCount > model.contextWindow() - 300) {
156157
return new BinaryThreatAnalysis(
157158
"Ignoring file: estimated prompt token count (" + tokenCount + ") is too high.",

0 commit comments

Comments
 (0)