-
Notifications
You must be signed in to change notification settings - Fork 113
/
Copy pathSampleNavigationParameters.cs
33 lines (28 loc) · 1.26 KB
/
SampleNavigationParameters.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
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using AIDevGallery.Samples.SharedCode;
using AIDevGallery.Telemetry.Events;
using System.Threading;
using System.Threading.Tasks;
namespace AIDevGallery.Models;
internal class SampleNavigationParameters(
string sampleId,
string modelId,
string modelPath,
HardwareAccelerator hardwareAccelerator,
LlmPromptTemplate? promptTemplate,
TaskCompletionSource sampleLoadedCompletionSource,
CancellationToken loadingCanceledToken)
: BaseSampleNavigationParameters(sampleLoadedCompletionSource, loadingCanceledToken)
{
public string ModelPath { get; } = modelPath;
public HardwareAccelerator HardwareAccelerator { get; } = hardwareAccelerator;
public string SampleId => sampleId;
protected override string ChatClientModelPath => ModelPath;
protected override HardwareAccelerator ChatClientHardwareAccelerator => HardwareAccelerator;
protected override LlmPromptTemplate? ChatClientPromptTemplate => promptTemplate;
internal override void SendSampleInteractionEvent(string? customInfo = null)
{
SampleInteractionEvent.Log(sampleId, modelId, HardwareAccelerator, null, null, customInfo);
}
}