(tokenEncoder tokenizer.Codec, text string)
| 65 | } |
| 66 | |
| 67 | func getTokenNum(tokenEncoder tokenizer.Codec, text string) int { |
| 68 | if text == "" { |
| 69 | return 0 |
| 70 | } |
| 71 | tkm, _ := tokenEncoder.Count(text) |
| 72 | return tkm |
| 73 | } |
| 74 | |
| 75 | func getImageToken(info *relaycommon.RelayInfo, imageUrl *dto.MessageImageUrl, model string, stream bool) (int, error) { |
| 76 | if imageUrl == nil { |
no outgoing calls
no test coverage detected