Repository navigation
Expand file tree
/
Copy pathChatRequest.cs
More file actions
53 lines (50 loc) · 1.77 KB
/
Copy pathChatRequest.cs
File metadata and controls
53 lines (50 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
namespace WebApp.Api.Models;
public record ChatRequest
{
public required string Message { get; init; }
public string? ConversationId { get; init; }
/// <summary>
/// Base64-encoded image data URIs (e.g., data:image/png;base64,iVBORw0KG...)
/// Images are sent inline with the message, no file upload needed.
/// </summary>
public List<string>? ImageDataUris { get; init; }
/// <summary>
/// File attachments with metadata (filename, MIME type, base64 data).
/// Supports documents like PDF, DOCX, TXT, etc.
/// </summary>
public List<FileAttachment>? FileDataUris { get; init; }
/// <summary>
/// MCP tool approval response (for resuming after approval request).
/// </summary>
public McpApprovalResponse? McpApproval { get; init; }
/// <summary>
/// Response ID to continue from (for MCP approval flow).
/// </summary>
public string? PreviousResponseId { get; init; }
}
/// <summary>
/// Represents a user's approval/rejection decision for an MCP tool call.
/// </summary>
public record McpApprovalResponse
{
public required string ApprovalRequestId { get; init; }
public required bool Approved { get; init; }
}
/// <summary>
/// Represents a file attachment with metadata for document upload.
/// </summary>
public record FileAttachment
{
/// <summary>
/// Base64 data URI (e.g., data:application/pdf;base64,...)
/// </summary>
public required string DataUri { get; init; }
/// <summary>
/// Original filename with extension
/// </summary>
public required string FileName { get; init; }
/// <summary>
/// MIME type (e.g., application/pdf, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
/// </summary>
public required string MimeType { get; init; }
}