|
import funciones |
|
from fastapi import FastAPI |
|
|
|
app = FastAPI() |
|
|
|
|
|
@app.post( |
|
"/macronutrientes/", |
|
tags=["Nutrici贸n"], |
|
summary="1.- Obtener Distribuci贸n de Macronutrientes") |
|
async def macronutrientes(prompt: str): |
|
return funciones.getMacronutrientes(prompt) |
|
|
|
|
|
@app.post( |
|
"/comidas/", |
|
tags=["Nutrici贸n"], |
|
summary="2.- Obtener Distribuci贸n de Comidas Durante el D铆a") |
|
async def comidas(prompt: str): |
|
return funciones.getComidas(prompt) |
|
|
|
|
|
@app.post( |
|
"/lista_alimentos/", |
|
tags=["Nutrici贸n"], |
|
summary="Nutrici贸n: 3.- Obtener Alimentos para una Comida") |
|
async def lista_alimentos(prompt: str): |
|
return funciones.getAlimentos(prompt) |
|
|
|
|
|
@app.post( |
|
"/receta/", |
|
tags=["Nutrici贸n"], |
|
summary="Nutrici贸n: 4.- Generar Receta para una Comida") |
|
async def receta(prompt: str): |
|
return funciones.getReceta(prompt) |
|
|
|
|
|
@app.post( |
|
"/sustituir_alimento/", |
|
tags=["Nutrici贸n"], |
|
summary="Nutrici贸n: 5.- Sustituir alimento ") |
|
async def sustituir_alimento(prompt: str): |
|
return funciones.getSustitucion(prompt) |