Skip to content

Commit

Permalink
Add a warning that get_encoding is not thread safe
Browse files Browse the repository at this point in the history
  • Loading branch information
IAPark authored Mar 25, 2024
1 parent 2e9ef03 commit 6d1cc25
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Encode and decode text
```ruby
require 'tiktoken_ruby'

# note: retrieving an encoding is not currently thread safe until https://github.com/IAPark/tiktoken_ruby/pull/30 is merged
enc = Tiktoken.get_encoding("cl100k_base")
enc.decode(enc.encode("hello world")) #=> "hello world"
```
Expand Down

0 comments on commit 6d1cc25

Please sign in to comment.