Ajout de HelloFresh

This commit is contained in:
2025-09-03 20:17:50 +02:00
parent bcef0a472b
commit d287112b7d
429 changed files with 82881 additions and 22074 deletions

View File

@@ -0,0 +1,31 @@
using Microsoft.AspNetCore.Mvc;
using IngredientsAI.Services;
namespace IngredientsAI.Controllers
{
[ApiController]
[Route("api/[controller]")]
public class OllamaController : ControllerBase
{
private readonly OllamaService _ollama;
public OllamaController(OllamaService ollama)
{
_ollama = ollama;
}
[HttpGet("models")]
public async Task<IActionResult> GetModels()
{
try
{
var models = await _ollama.GetModelsAsync();
return Ok(new { items = models });
}
catch (Exception ex)
{
return BadRequest(new { error = ex.Message });
}
}
}
}