From 6d1cc25a4665b345b9ddc5c1226aa00c0c31314f Mon Sep 17 00:00:00 2001 From: I Park Date: Mon, 25 Mar 2024 11:45:29 -0700 Subject: [PATCH] Add a warning that get_encoding is not thread safe --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 812cc22..176277a 100644 --- a/README.md +++ b/README.md @@ -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" ```