alexa
menu

ASP.NET Core - EJ2

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download

    Show / Hide Table of Contents

    Interface IChatInferenceService

    Defines an AI inference backend that processes chat requests and returns responses.

    Namespace: Syncfusion.EJ2.AI
    Assembly: Syncfusion.EJ2.dll
    Syntax
    public interface IChatInferenceService
    Examples
    // Custom implementation of IChatInferenceService
    public class CustomAIService : IChatInferenceService
    {
        public async Task<string> GenerateResponseAsync(ChatParameters options)
        {
            // Custom logic to generate a response based on the provided chat parameters
        }
    }

    Methods

    GenerateResponseAsync(ChatParameters)

    Asynchronously generates a chat response based on the provided parameters.

    Declaration
    Task<string> GenerateResponseAsync(ChatParameters options)
    Parameters
    Type Name Description
    ChatParameters options

    The parameters that define the chat request, such as messages, temperature, and token limits.

    Returns
    Type Description
    System.Threading.Tasks.Task<System.String>

    A task that represents the asynchronous operation, containing the AI-generated response as a string.

    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved