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.
1 parent f041e64 commit 0c76a10Copy full SHA for 0c76a10
src/agentlab/llm/llm_utils.py
@@ -188,8 +188,8 @@ def get_tokenizer(model_name="gpt-4"):
188
logging.info(f"Could not find a tokenizer for model {model_name}. Trying HuggingFace.")
189
try:
190
return AutoTokenizer.from_pretrained(model_name)
191
- except OSError:
192
- 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.")
193
return tiktoken.encoding_for_model("gpt-4")
194
195
0 commit comments