Interface IChatOrchestrator

All Known Implementing Classes:
ChatOrchestrator

public interface IChatOrchestrator
Interface for orchestrating AI-based chat interactions. Implementations of this interface are responsible for managing the process of generating AI responses based on user prompts and contextual information.
  • Method Summary

    Modifier and Type
    Method
    Description
    getAnswer(String userPrompt)
    Generates an AI response for the given user prompt by performing the following steps: Determining which AI client to use. Fetching the chat message history from the client. Retrieving the content of the active editor window as context. Creating system and user messages for the AI. Obtaining the response from the AI client via a chat completion request. Saving the updated chat history back to the AI client. Returning the response message as a string.
  • Method Details

    • getAnswer

      String getAnswer(String userPrompt)
      Generates an AI response for the given user prompt by performing the following steps:
      1. Determining which AI client to use.
      2. Fetching the chat message history from the client.
      3. Retrieving the content of the active editor window as context.
      4. Creating system and user messages for the AI.
      5. Obtaining the response from the AI client via a chat completion request.
      6. Saving the updated chat history back to the AI client.
      7. Returning the response message as a string.
      Parameters:
      userPrompt - the prompt or query provided by the user.
      Returns:
      the AI-generated response as a String.