Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
  • Loading branch information
pablonyx committed Jan 7, 2025
1 parent ec5b8b2 commit ea01c28
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions backend/onyx/tools/built_in_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,9 @@ def get_built_in_tool_by_id(
"Built-in tools cache is None despite being refreshed. Should never happen."
)

# After refreshing, check if the tool is now in the cache
if in_code_tool_id in _built_in_tools_cache:
return _built_in_tools_cache[in_code_tool_id]
else:
if in_code_tool_id not in _built_in_tools_cache:
raise ValueError(
f"No built-in tool found in the cache with ID {in_code_tool_id}"
)

return _built_in_tools_cache[in_code_tool_id]

0 comments on commit ea01c28

Please sign in to comment.