67 lines
2.1 KiB
C#
67 lines
2.1 KiB
C#
using ManagerService.Data;
|
|
using System.Collections.Generic;
|
|
|
|
namespace ManagerService.DTOs
|
|
{
|
|
public class AiChatRequest
|
|
{
|
|
public string Message { get; set; }
|
|
public string InstanceId { get; set; }
|
|
public AppType AppType { get; set; }
|
|
public string ConfigurationId { get; set; } // null = scope instance, fourni = scope configuration
|
|
public string Language { get; set; }
|
|
public List<AiChatMessage> History { get; set; } = new();
|
|
/// <summary>
|
|
/// true = interaction vocale (lunettes, assistant vocal).
|
|
/// Le backend adapte le prompt : pas de markdown, pas de navigation,
|
|
/// dates en toutes lettres, réponses courtes audio-friendly.
|
|
/// </summary>
|
|
public bool IsVoice { get; set; } = false;
|
|
}
|
|
|
|
public class AiChatMessage
|
|
{
|
|
public string Role { get; set; } // "user" | "assistant"
|
|
public string Content { get; set; }
|
|
}
|
|
|
|
public class AiCardDTO
|
|
{
|
|
public string Title { get; set; }
|
|
public string Subtitle { get; set; }
|
|
public string? Icon { get; set; }
|
|
}
|
|
|
|
public class NavigationActionDTO
|
|
{
|
|
public string SectionId { get; set; }
|
|
public string SectionTitle { get; set; }
|
|
public string SectionType { get; set; }
|
|
public string? ImageUrl { get; set; }
|
|
}
|
|
|
|
public class AiChatResponse
|
|
{
|
|
public string Reply { get; set; }
|
|
public List<AiCardDTO>? Cards { get; set; }
|
|
public NavigationActionDTO? Navigation { get; set; }
|
|
/// <summary>
|
|
/// false = le LLM ne s'attend pas à une réponse du visiteur (info pure, hors-sujet, politesse, beacon).
|
|
/// Le front peut désactiver l'écoute automatique après le TTS.
|
|
/// </summary>
|
|
public bool ExpectsReply { get; set; } = true;
|
|
}
|
|
|
|
public class AiTranslateRequest
|
|
{
|
|
public string Text { get; set; }
|
|
public string SourceLang { get; set; }
|
|
public List<string> TargetLangs { get; set; } = new();
|
|
}
|
|
|
|
public class AiTranslateResponse
|
|
{
|
|
public Dictionary<string, string> Translations { get; set; } = new();
|
|
}
|
|
}
|