* Prompt messi in una cartella apposta * Aggiorna importazioni demo per riflettere la nuova struttura delle cartelle API * Aggiunto configurazione dell'applicazione * Spostato ChatManager in app.interface * Update README.md * Aggiornato config per app & api * Rinominato il modulo NewsAPI * fix main infinite loop * API base --> core * pattern singleton per AppConfig. * Estratto i tools nella loro cartella --> api/tools * fix main KeyboardInterrupt * update tests * Docker & libs * fix copilot suggestions
18 lines
467 B
Python
18 lines
467 B
Python
#### FOR ALL FILES OUTSIDE src/ FOLDER ####
|
|
import sys
|
|
import os
|
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '../src')))
|
|
###########################################
|
|
|
|
from dotenv import load_dotenv
|
|
from app.api.news import NewsApiWrapper
|
|
|
|
def main():
|
|
api = NewsApiWrapper()
|
|
articles = api.get_latest_news(query="bitcoin", limit=5)
|
|
assert len(articles) > 0
|
|
print("ok")
|
|
|
|
if __name__ == "__main__":
|
|
load_dotenv()
|
|
main() |