mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-18 10:58:00 +00:00
Resolve the remaining unused-symbol warnings
This commit is contained in:
3 files changed
+16
-1
No files matched your search
@@ -679,7 +679,7 @@ public sealed partial class DataSourceEmbeddingService
|
|||||||
if (matches.Count == 0)
|
if (matches.Count == 0)
|
||||||
return [text];
|
return [text];
|
||||||
|
|
||||||
return matches.Cast<Match>().Select(match => match.Value).ToList();
|
return matches.Select(match => match.Value).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static List<(int Start, int End, string Text)> ReadLines(string text)
|
private static List<(int Start, int End, string Text)> ReadLines(string text)
|
||||||
|
|||||||
@@ -23,6 +23,13 @@ public sealed class DataSourceLocalRetrievalService(
|
|||||||
BM25,
|
BM25,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// A hit keeps the complete shape both retrieval channels deliver, even where nothing reads a
|
||||||
|
// value yet. Merging is deterministic on purpose for now, so Channel, Score and Rank have no
|
||||||
|
// consumer until reranking arrives. Naming them still beats handing an unlabelled tuple of
|
||||||
|
// strings and numbers through the service.
|
||||||
|
//
|
||||||
|
// ReSharper disable NotAccessedPositionalProperty.Local
|
||||||
private sealed record LocalRetrievalHit(
|
private sealed record LocalRetrievalHit(
|
||||||
RetrievalChannel Channel,
|
RetrievalChannel Channel,
|
||||||
string ChunkId,
|
string ChunkId,
|
||||||
@@ -41,6 +48,7 @@ public sealed class DataSourceLocalRetrievalService(
|
|||||||
int Rank,
|
int Rank,
|
||||||
string ConfidenceLevel,
|
string ConfidenceLevel,
|
||||||
int ConfidenceLevelRank);
|
int ConfidenceLevelRank);
|
||||||
|
// ReSharper restore NotAccessedPositionalProperty.Local
|
||||||
|
|
||||||
public Task<IReadOnlyList<IRetrievalContext>> RetrieveDataAsync(DataSourceLocalFile dataSource, IContent lastUserPrompt, ChatThread thread, CancellationToken token = default) =>
|
public Task<IReadOnlyList<IRetrievalContext>> RetrieveDataAsync(DataSourceLocalFile dataSource, IContent lastUserPrompt, ChatThread thread, CancellationToken token = default) =>
|
||||||
this.RetrieveDataAsync(dataSource, lastUserPrompt, token);
|
this.RetrieveDataAsync(dataSource, lastUserPrompt, token);
|
||||||
|
|||||||
@@ -9,6 +9,13 @@ namespace AIStudio.Tools.Services;
|
|||||||
|
|
||||||
public sealed class DataSourceService
|
public sealed class DataSourceService
|
||||||
{
|
{
|
||||||
|
//
|
||||||
|
// Trust is recorded for every participating provider, while only the chat provider's trust
|
||||||
|
// decides about external data sources below. The agent which validates retrieval contexts
|
||||||
|
// checks its own provider before it runs, so nothing slips through today. Keeping the value
|
||||||
|
// named here is what makes that asymmetry visible.
|
||||||
|
//
|
||||||
|
// ReSharper disable once NotAccessedPositionalProperty.Local
|
||||||
private readonly record struct ParticipatingProvider(string Role, bool IsTrusted, ConfidenceLevel ConfidenceLevel);
|
private readonly record struct ParticipatingProvider(string Role, bool IsTrusted, ConfidenceLevel ConfidenceLevel);
|
||||||
|
|
||||||
private readonly RustService rustService;
|
private readonly RustService rustService;
|
||||||
|
|||||||
Reference in new issue
Block a user