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.
|
- using LLama.Web.Common;
- using LLama.Web.Models;
- using LLama.Web.Services;
- using Microsoft.AspNetCore.Mvc;
- using Microsoft.AspNetCore.Mvc.RazorPages;
- using Microsoft.Extensions.Options;
-
- namespace LLama.Web.Pages
- {
- public class InteractiveModel : PageModel
- {
- private readonly ILogger<InteractiveModel> _logger;
- private readonly ConnectionSessionService _modelSessionService;
-
- public InteractiveModel(ILogger<InteractiveModel> logger, IOptions<LLamaOptions> options, ConnectionSessionService modelSessionService)
- {
- _logger = logger;
- Options = options.Value;
- _modelSessionService = modelSessionService;
- }
-
- public LLamaOptions Options { get; set; }
-
- public void OnGet()
- {
- }
-
- public async Task<IActionResult> OnPostCancel(CancelModel model)
- {
- await _modelSessionService.CancelAsync(model.ConnectionId);
- return new JsonResult(default);
- }
- }
- }
|