| 62 | } |
| 63 | |
| 64 | int TokenUtils::estimateFileTokens(const Context::ContentFile &file) |
| 65 | { |
| 66 | if (isImageFilePath(file.filename)) |
| 67 | return estimateImageAttachmentTokens(QString()); |
| 68 | |
| 69 | int total = 0; |
| 70 | |
| 71 | total += estimateTokens(file.filename); |
| 72 | total += estimateTokens(file.content); |
| 73 | total += 5; |
| 74 | |
| 75 | return total; |
| 76 | } |
| 77 | |
| 78 | int TokenUtils::estimateFilesTokens(const QList<Context::ContentFile> &files) |
| 79 | { |
nothing calls this directly
no outgoing calls
no test coverage detected