Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion framework/codemodder-base/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ dependencies {
api(libs.javaparser.symbolsolver.model)
api(libs.javadiff)
api(libs.jtokkit)
api("com.azure:azure-ai-openai:1.0.0-beta.10")
api("com.azure:azure-ai-openai:1.0.0-beta.16")
api("io.github.classgraph:classgraph:4.8.160")

implementation(libs.tuples)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,8 @@ private boolean estimatedToExceedContextWindow(final CodemodInvocationContext co
int tokenCount =
model.tokens(
List.of(
getSystemMessage().getContent(), estimatedUserMessage.getContent().toString()));
getSystemMessage().getStringContent(),
estimatedUserMessage.getContent().toString()));
// estimated token count doesn't include the function (~100 tokens) or the reply
// (~200 tokens) so add those estimates before checking against window size
tokenCount += 300;
Expand Down
Loading