mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-04 16:09:40 +00:00
12 lines
383 B
C#
12 lines
383 B
C#
namespace AIStudio.Tools.Services;
|
|||
|
|
|
||
|
|
internal static class DataSourceEmbeddingNames
|
||
|
|
{
|
||
|
|
public static string GetCollectionName(string dataSourceId)
|
||
|
|
{
|
||
|
|
if (!Guid.TryParse(dataSourceId, out var parsedDataSourceId))
|
||
|
|
throw new ArgumentException("Data source ID must be a valid GUID.", nameof(dataSourceId));
|
||
|
|
|
||
|
|
return $"rag_{parsedDataSourceId:N}";
|
||
|
|
}
|
||
|
|
}
|