mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-07 05:52:15 +00:00
openai[patch]: rm tiktoken model warning (#16964)
This commit is contained in:
@@ -496,9 +496,7 @@ class BaseOpenAI(BaseLLM):
|
||||
try:
|
||||
enc = tiktoken.encoding_for_model(model_name)
|
||||
except KeyError:
|
||||
logger.warning("Warning: model not found. Using cl100k_base encoding.")
|
||||
model = "cl100k_base"
|
||||
enc = tiktoken.get_encoding(model)
|
||||
enc = tiktoken.get_encoding("cl100k_base")
|
||||
|
||||
return enc.encode(
|
||||
text,
|
||||
|
Reference in New Issue
Block a user