MCPcopy Create free account
hub / github.com/aiprodcoder/MIXAPI / InitTokenEncoders

Function InitTokenEncoders

service/token_counter.go:30–34  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28var tokenEncoderMutex sync.RWMutex
29
30func InitTokenEncoders() {
31 common.SysLog("initializing token encoders")
32 defaultTokenEncoder = codec.NewCl100kBase()
33 common.SysLog("token encoders initialized")
34}
35
36func getTokenEncoder(model string) tokenizer.Codec {
37 // First, try to get the encoder from cache with read lock

Callers 1

InitResourcesFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected