You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

ChatController.cs 707 B

2 years ago
2 years ago
2 years ago
12345678910111213141516171819202122232425262728
  1. using LLama.WebAPI.Models;
  2. using LLama.WebAPI.Services;
  3. using Microsoft.AspNetCore.Mvc;
  4. using System;
  5. namespace LLama.WebAPI.Controllers
  6. {
  7. [ApiController]
  8. [Route("[controller]")]
  9. public class ChatController : ControllerBase
  10. {
  11. private readonly StatefulChatService _service;
  12. private readonly ILogger<ChatController> _logger;
  13. public ChatController(ILogger<ChatController> logger,
  14. StatefulChatService service)
  15. {
  16. _logger = logger;
  17. _service = service;
  18. }
  19. [HttpPost("Send")]
  20. public string SendMessage([FromBody] SendMessageInput input)
  21. {
  22. return _service.Send(input);
  23. }
  24. }
  25. }