-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
24 additions
and
13 deletions.
There are no files selected for viewing
37 changes: 24 additions & 13 deletions
37
openbb_platform/providers/ultima/openbb_ultima/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,26 @@ | ||
"""Ultima provider module.""" | ||
import warnings | ||
from typing import Union | ||
|
||
from openbb_core.provider.abstract.provider import Provider | ||
from openbb_ultima.models.company_news import UltimaCompanyNewsFetcher | ||
from openbb_ultima.models.sector_news import UltimaSectorNewsFetcher | ||
|
||
ultima_provider = Provider( | ||
name="ultima", | ||
website="https://www.ultimainsights.ai/openbb", | ||
description="""Ultima harnesses the power of LLMs to deliver news before it hits the frontpage of Bloomberg.""", | ||
credentials=["api_key"], | ||
fetcher_dict={ | ||
"CompanyNews": UltimaCompanyNewsFetcher, | ||
"SectorNews": UltimaSectorNewsFetcher, | ||
}, | ||
) | ||
|
||
ultima_provider: Union[Provider, None] = None | ||
|
||
try: | ||
from openbb_ultima.models.company_news import UltimaCompanyNewsFetcher | ||
from openbb_ultima.models.sector_news import UltimaSectorNewsFetcher | ||
|
||
ultima_provider = Provider( | ||
name="ultima", | ||
website="https://www.ultimainsights.ai/openbb", | ||
description="""Ultima harnesses the power of LLMs to deliver news before it hits the frontpage of Bloomberg.""", | ||
credentials=["api_key"], | ||
fetcher_dict={ | ||
"CompanyNews": UltimaCompanyNewsFetcher, | ||
"SectorNews": UltimaSectorNewsFetcher, | ||
}, | ||
) | ||
except ImportError: | ||
warnings.warn( | ||
"openbb-ultima is not installed. Please install openbb-ultima to use the Ultima provider." | ||
) |