We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4841c92 + 0c76a10 commit 69e7216Copy full SHA for 69e7216
src/agentlab/llm/llm_utils.py
@@ -516,8 +516,8 @@ def get_tokenizer(model_name="gpt-4"):
516
logging.info(f"Could not find a tokenizer for model {model_name}. Trying HuggingFace.")
517
try:
518
return AutoTokenizer.from_pretrained(model_name)
519
- except OSError:
520
- logging.info(f"Could not find a tokenizer for model {model_name}. Defaulting to gpt-4.")
+ except Exception as e:
+ logging.info(f"Could not find a tokenizer for model {model_name}: {e} Defaulting to gpt-4.")
521
return tiktoken.encoding_for_model("gpt-4")
522
523
0 commit comments