Expose p50k_edit encoding (#32)

This commit is contained in:
Fritz Obermeyer 2023-02-26 14:36:53 -05:00 committed by GitHub
parent fbaa86e0f0
commit f5fbc9c5e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -24,3 +24,5 @@ def test_encoding_for_model():
assert enc.name == "gpt2"
enc = tiktoken.encoding_for_model("text-davinci-003")
assert enc.name == "p50k_base"
enc = tiktoken.encoding_for_model("text-davinci-edit-001")
assert enc.name == "p50k_edit"

View File

@ -84,4 +84,5 @@ ENCODING_CONSTRUCTORS = {
"r50k_base": r50k_base,
"p50k_base": p50k_base,
"cl100k_base": cl100k_base,
"p50k_edit": p50k_edit,
}