Skip to content

Commit d6ba334

Browse files
Merge branch 'main' into use-type-for-code-execution-function
2 parents d670db6 + 228dc93 commit d6ba334

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

dotnet/src/Connectors/VectorData.Abstractions/ConnectorSupport/VectorStoreRecordVectorPropertyModel.cs

+6-4
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public virtual bool TryGenerateEmbedding<TRecord, TEmbedding, TUnwrappedEmbeddin
126126
this.GetValueAsObject(record) is var value && value is string s
127127
? s
128128
: throw new InvalidOperationException($"Property '{this.ModelName}' was configured with an embedding generator accepting a string, but {value?.GetType().Name ?? "null"} was provided."),
129-
new() { Dimensions = this.Dimensions },
129+
options: null,
130130
cancellationToken);
131131
return true;
132132
}
@@ -137,7 +137,7 @@ public virtual bool TryGenerateEmbedding<TRecord, TEmbedding, TUnwrappedEmbeddin
137137
this.GetValueAsObject(record) is var value && value is DataContent c
138138
? c
139139
: throw new InvalidOperationException($"Property '{this.ModelName}' was configured with an embedding generator accepting a {nameof(DataContent)}, but {value?.GetType().Name ?? "null"} was provided."),
140-
new() { Dimensions = this.Dimensions },
140+
options: null,
141141
cancellationToken);
142142
return true;
143143
}
@@ -176,15 +176,17 @@ public virtual bool TryGenerateEmbeddings<TRecord, TEmbedding, TUnwrappedEmbeddi
176176
records.Select(r => this.GetValueAsObject(r) is var value && value is string s
177177
? s
178178
: throw new InvalidOperationException($"Property '{this.ModelName}' was configured with an embedding generator accepting a string, but {value?.GetType().Name ?? "null"} was provided.")),
179-
new() { Dimensions = this.Dimensions }, cancellationToken);
179+
options: null,
180+
cancellationToken);
180181
return true;
181182

182183
case IEmbeddingGenerator<DataContent, TEmbedding> generator when this.EmbeddingType == typeof(TUnwrappedEmbedding):
183184
task = generator.GenerateAsync(
184185
records.Select(r => this.GetValueAsObject(r) is var value && value is DataContent c
185186
? c
186187
: throw new InvalidOperationException($"Property '{this.ModelName}' was configured with an embedding generator accepting a {nameof(DataContent)}, but {value?.GetType().Name ?? "null"} was provided.")),
187-
new() { Dimensions = this.Dimensions }, cancellationToken);
188+
options: null,
189+
cancellationToken);
188190
return true;
189191

190192
case null:

dotnet/src/Connectors/VectorData.Abstractions/ConnectorSupport/VectorStoreRecordVectorPropertyModel{TInput}.cs

+3-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public override bool TryGenerateEmbedding<TRecord, TEmbedding, TUnwrappedEmbeddi
4343
this.GetValueAsObject(record) is var value && value is TInput s
4444
? s
4545
: throw new InvalidOperationException($"Property '{this.ModelName}' was configured with an embedding generator accepting a {nameof(TInput)}, but {value?.GetType().Name ?? "null"} was provided."),
46-
new() { Dimensions = this.Dimensions },
46+
options: null,
4747
cancellationToken);
4848
return true;
4949

@@ -66,7 +66,8 @@ public override bool TryGenerateEmbeddings<TRecord, TEmbedding, TUnwrappedEmbedd
6666
records.Select(r => this.GetValueAsObject(r) is var value && value is TInput s
6767
? s
6868
: throw new InvalidOperationException($"Property '{this.ModelName}' was configured with an embedding generator accepting a string, but {value?.GetType().Name ?? "null"} was provided.")),
69-
new() { Dimensions = this.Dimensions }, cancellationToken);
69+
options: null,
70+
cancellationToken);
7071
return true;
7172

7273
case null:

0 commit comments

Comments
 (0)