namespace GermanApp.Domain.Interfaces;
///
/// Domain interface for Mistral AI text generation service.
/// This is part of the Domain layer.
///
public interface IMistralService
{
///
/// Generates text from a prompt using Mistral API.
///
/// The input prompt
/// The model to use (defaults to configured default)
/// Creativity level (0-1)
/// Maximum tokens to generate
/// Cancellation token
/// Generated text
Task GenerateTextAsync(
string prompt,
string? model = null,
float temperature = 0.7f,
int? maxTokens = null,
CancellationToken cancellationToken = default);
///
/// Generates text from chat messages using Mistral API.
///
/// List of chat messages (role, content)
/// The model to use
/// Creativity level (0-1)
/// Maximum tokens to generate
/// Cancellation token
/// Generated text response
Task GenerateChatAsync(
IReadOnlyList<(string role, string content)> messages,
string? model = null,
float temperature = 0.7f,
int? maxTokens = null,
CancellationToken cancellationToken = default);
///
/// Generates a story based on lesson context and vocabulary.
///
/// CEFR level (A1, A2, B1, B2, C1)
/// Story topic
/// List of vocabulary words to include
/// Approximate story length in words
/// Cancellation token
/// Generated story text
Task GenerateStoryAsync(
string level,
string topic,
IReadOnlyList vocabularyWords,
int length = 200,
CancellationToken cancellationToken = default);
///
/// Provides feedback on user writing.
///
/// The text written by the user
/// CEFR level for appropriate feedback
/// Original prompt/exercise
/// Cancellation token
/// Feedback with corrections and suggestions
Task GenerateWritingFeedbackAsync(
string userText,
string level,
string? prompt = null,
CancellationToken cancellationToken = default);
///
/// Tests the Mistral API connection.
///
/// Cancellation token
/// True if connection is successful
Task TestConnectionAsync(CancellationToken cancellationToken = default);
}