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 TypeMethodDescriptionGenerates 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
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.
- Parameters:
userPrompt
- the prompt or query provided by the user.- Returns:
- the AI-generated response as a
String
.
-