Skip to content

Commit

Permalink
RavenDB-23556: AiSettingsCompareDifferences.Identifier missing fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ArieSLV committed Jan 30, 2025
1 parent 31e07ff commit 42c311c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
24 changes: 13 additions & 11 deletions src/Raven.Client/Documents/Operations/ETL/AI/AbstractLlmSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,28 @@ public enum AiSettingsCompareDifferences
{
None = 0,

Identifier = 1 << 0,

// Changes that affect the mathematical structure of embeddings
EmbeddingDimensions = 1 << 0,
EmbeddingNormalization = 1 << 1,
PoolingStrategy = 1 << 2,
ModelArchitecture = 1 << 3, // Changes in model name/version that affect embedding structure
EmbeddingDimensions = 1 << 1,
EmbeddingNormalization = 1 << 2,
PoolingStrategy = 1 << 3,
ModelArchitecture = 1 << 4, // Changes in model name/version that affect embedding structure

// Changes in text preprocessing that affect input
TextPreprocessing = 1 << 4, // e.g. case sensitivity, unicode normalization
TokenizationSettings = 1 << 5, // e.g. special tokens (CLS, SEP, PAD, etc.)
SequenceLimits = 1 << 6, // e.g. maximum tokens
TextPreprocessing = 1 << 5, // e.g. case sensitivity, unicode normalization
TokenizationSettings = 1 << 6, // e.g. special tokens (CLS, SEP, PAD, etc.)
SequenceLimits = 1 << 7, // e.g. maximum tokens

// Changes in API configuration
EndpointConfiguration = 1 << 7, // Changes in endpoint URLs
AuthenticationSettings = 1 << 8, // Changes in API keys, org IDs etc
EndpointConfiguration = 1 << 8, // Changes in endpoint URLs
AuthenticationSettings = 1 << 9, // Changes in API keys, org IDs etc

// Changes that could affect embedding generation but cannot be verified by comparing settings
DeploymentConfiguration = 1 << 9,
DeploymentConfiguration = 1 << 10,

// Combinations for common scenarios
EmbeddingStructure = EmbeddingDimensions | EmbeddingNormalization | PoolingStrategy | ModelArchitecture,
EmbeddingStructure = Identifier | EmbeddingDimensions | EmbeddingNormalization | PoolingStrategy | ModelArchitecture,
InputProcessing = TextPreprocessing | TokenizationSettings | SequenceLimits,
ConnectionConfig = EndpointConfiguration | AuthenticationSettings,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public AiSettingsCompareDifferences Compare(AiConnectionString newConnectionStri
var result = AiSettingsCompareDifferences.None;

if (Identifier != newConnectionString.Identifier)
result |= AiSettingsCompareDifferences.ConnectionConfig;
result |= AiSettingsCompareDifferences.Identifier;

var oldProvider = GetActiveProvider();
var newProvider = newConnectionString.GetActiveProvider();
Expand Down

0 comments on commit 42c311c

Please sign in to comment.