mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-09-14 16:03:37 +00:00
13 lines
383 B
C#
13 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}";
|
||
|
|
}
|
||
|
|
}
|