llama-stack-apps icon indicating copy to clipboard operation
llama-stack-apps copied to clipboard

Custom Tool Call Not Working For Inflation Example

Open dawenxi-007 opened this issue 6 months ago • 2 comments

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:

dawenxi-007 avatar Aug 26 '24 21:08 dawenxi-007