47 lines
1.3 KiB
Python
47 lines
1.3 KiB
Python
# Constantes ##########################################################################
|
|
|
|
PROMPT = "Dame la venta total del centro de velez malaga de marzo de 2023 desglosado por factura"
|
|
|
|
|
|
# Librerias de Agno ################################################################
|
|
|
|
from agno.agent import Agent
|
|
from agno.models.openai import OpenAIChat
|
|
|
|
# Prefect imports ##################################################################
|
|
|
|
from prefect import task, flow
|
|
from prefect.logging import get_run_logger
|
|
from prefect.filesystems import LocalFileSystem
|
|
|
|
local_file_system_block = LocalFileSystem.load("localfile")
|
|
|
|
# Cargar variables de entorno ######################################################
|
|
|
|
import os
|
|
from dotenv import load_dotenv
|
|
|
|
load_dotenv()
|
|
|
|
openai_api_key = os.getenv("OPENAI_API_KEY")
|
|
|
|
|
|
# Imports adicionales #########################################################
|
|
|
|
import traceback
|
|
from uuid import uuid4
|
|
|
|
# Importaciones de Archivos #########################################################
|
|
|
|
from jinja2 import Template
|
|
import yaml
|
|
import json
|
|
|
|
|
|
# Utils ###################################################################################
|
|
|
|
from utils.conseguir_datos_bq import consultar_bigquery_paginado
|
|
from utils.transformar_datos import convertir_decimales
|
|
|
|
|