This repository has been archived on 2023-11-16. You can view files and clone it, but cannot push or open issues or pull requests.
GOA/LLMApi/Controllers/LLMController.cs
2023-09-23 11:21:46 +02:00

24 lines
535 B
C#

using LLMApi.Services;
using Microsoft.AspNetCore.Mvc;
namespace LLMApi.Controllers;
[ApiController]
[Route("[controller]")]
public class LLMController : ControllerBase
{
private readonly ILlmApiService _apiService;
public LLMController(ILlmApiService apiService)
{
_apiService = apiService;
}
[HttpGet(nameof(AnswerToPrompt))]
public async Task<IActionResult> AnswerToPrompt(string prompt = "")
{
var temp = await _apiService.GetAnswerToPrompt(prompt);
return Ok(temp);
}
}