pkoukk / tiktoken-go

go version of tiktoken
MIT License
649 stars 71 forks source link

EncodingForModel: no encoding for model gpt-3.5-turbo-0301 #12

Closed ethanchancc18 closed 1 year ago

ethanchancc18 commented 1 year ago
tkm, err := tiktoken.EncodingForModel(Model)
    if err != nil {
        fmt.Println(fmt.Errorf("EncodingForModel: %v", err))
        return
    }

我在执行这个model gpt-3.5-turbo-0301 报错找不到encoding ,我看了源码MODEL_TO_ENCODING没有这个模型

pkoukk commented 1 year ago

衍生模型的支持之前没发tag支持,在终端执行 go get -d github.com/pkoukk/tiktoken-go或者go get -d github.com/pkoukk/tiktoken-go@v0.1.1 相关支持代码在MODEL_PREFIX_TO_ENCODING定义中