Skip to content

Commit

Permalink
added two new embedding model's encoding (#247)
Browse files Browse the repository at this point in the history
Library doesn't support two new embedding model's encoding mapper
- `text-embedding-3-small`
- `text-embedding-3-large`

Added Encoding mapper for 2 new embedding models. The source of mapping
is taken from https://github.com/openai/openai-cookbook/blob/main/examples/How_to_count_tokens_with_tiktoken.ipynb
  • Loading branch information
Praneet460 authored Feb 9, 2024
1 parent 6cc3a46 commit 55c8d83
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tiktoken/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
"babbage-002": "cl100k_base",
# embeddings
"text-embedding-ada-002": "cl100k_base",
"text-embedding-3-small": "cl100k_base",
"text-embedding-3-large": "cl100k_base",
# DEPRECATED MODELS
# text (DEPRECATED)
"text-davinci-003": "p50k_base",
Expand Down

0 comments on commit 55c8d83

Please sign in to comment.