Skip to content

Commit

Permalink
Fix string format error
Browse files Browse the repository at this point in the history
  • Loading branch information
noahshinn committed Jan 2, 2024
1 parent 42dded6 commit 3d11af1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llm/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func ApproxNumTokensInFunctionDefs(functionDefs []*FunctionDef) int {
for _, functionDef := range functionDefs {
b, err := json.Marshal(functionDef)
if err != nil {
b = []byte(fmt.Sprintf("%s", functionDef))
b = []byte(fmt.Sprintf("%v", functionDef))
}
numTokens += ApproxNumTokens(string(b))
}
Expand Down

0 comments on commit 3d11af1

Please sign in to comment.