Skip to content
Snippets Groups Projects
Unverified Commit 81cc4a19 authored by Ishan's avatar Ishan Committed by GitHub
Browse files

[BUG] llama-index-tools-finance (#11772)

* fix bug

* fix bug
parent 55229321
No related branches found
No related tags found
No related merge requests found
from typing import List, Optional, Any, Dict
import pandas as pd
from datetime import datetime, timedelta
from llama_index.tools.finance import comparisons, earnings, news
from llama_index.core.tools.tool_spec.base import BaseToolSpec
......@@ -142,7 +142,7 @@ class FinanceAgentToolSpec(BaseToolSpec):
def get_latest_news_for_stock(self, stock_id: str) -> List[str]:
"""Given a stock_id representing the name of a company or the stock ticker symbol, Returns a list of news published related to top business articles in US in last 7 days from now."""
articles = news.get_latest_news_for_stock(stock_id=stock_id)
articles = news.get_latest_news_for_stock(self._api_key, stock_id=stock_id)
return [a["title"] for a in articles]
def get_current_stock_price_info(
......
......@@ -11,7 +11,7 @@ combine information to answer.
### Installation
```bash
pip install llama-index llama-index-tools-finchat
pip install llama-index llama-index-packs-finchat
```
## CLI Usage
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment