llama-stack-apps
llama-stack-apps copied to clipboard
Custom Tool Call Not Working For Inflation Example
Running the inflation.py
example from the rep. I am expecting it calls the custom tool for get_ticker_data
function, which is defined at the folder custom_tools
by ticker_data.py
. However, based on the log, it didn't find the tool:
[stderr]
Traceback (most recent call last):
line 145, in <module>
ModuleNotFoundError: No module named 'get_ticker_data'
[/stderr]
StepType.shield_call> No Violation
StepType.inference> The error message indicates that the `get_ticker_data` module is not found. This is because the `get_ticker_data` function is not a built-in Python function, and it's not available in the current environment.
To fix this issue, you can use the `yfinance` library to get the ticker data for Meta. Here's an updated code snippet that uses `yfinance` to get the ticker data: