-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDomain.cs
41 lines (32 loc) · 843 Bytes
/
Domain.cs
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
using Microsoft.ML.Data;
using Microsoft.Extensions.VectorData;
public class ModelInput
{
[ColumnName("input_ids")]
public long[] InputIds { get; set; }
[ColumnName("attention_mask")]
public long[] AttentionMask { get; set; }
[ColumnName("token_type_ids")]
public long[] TokenTypeIds { get; set; }
}
public class ModelOutput
{
[ColumnName("last_hidden_state")]
public float[] LastHiddenState { get; set; }
}
public class Movie
{
[VectorStoreRecordData]
public string Title {get;set;}
[VectorStoreRecordData]
public string Description {get;set;}
}
public class MovieEmbedding
{
[VectorStoreRecordKey]
public int Key {get;set;}
[VectorStoreRecordData]
public Movie Details {get;set;}
[VectorStoreRecordVector(384)]
public ReadOnlyMemory<float> Vector {get;set;}
}