36 references to ModelName
Microsoft.Extensions.VectorData.Abstractions (36)
ProviderServices\CollectionJsonModelBuilder.cs (2)
87storageName = namingPolicy.ConvertName(property.ModelName); 91storageName = property.ModelName;
ProviderServices\CollectionModel.cs (1)
159: throw new InvalidOperationException($"The property '{property.ModelName}' on '{_recordType.Name}' must have full text search indexing enabled.");
ProviderServices\CollectionModelBuilder.cs (11)
124var clrProperty = recordType.GetProperty(property.ModelName) 125?? throw new InvalidOperationException($"Property '{property.ModelName}' not found on CLR type '{recordType.FullName}'."); 131$"Property '{property.ModelName}' has a different CLR type in the record definition ('{property.Type.Name}') and on the .NET property ('{clrProperty.PropertyType}')."); 504throw new InvalidOperationException($"Property '{property.ModelName}' is being mapped to storage name '{property.StorageName}', but property '{otherproperty.ModelName}' is already mapped to the same storage name."); 530$"Property '{keyProperty.ModelName}' is configured for auto-generation, but key properties of type '{keyProperty.Type.Name}' do not support auto-generation."); 540$"Property '{dataProperty.ModelName}' has unsupported type '{type.Name}'. Data properties must be one of the supported types: {supportedTypes}."); 559var userRequestedEmbeddingType = definition?.Properties.OfType<VectorStoreVectorProperty>().SingleOrDefault(p => p.Name == vectorProperty.ModelName)?.EmbeddingType; 573throw new InvalidOperationException($"Property '{vectorProperty.ModelName}' has unsupported embedding type '{vectorProperty.EmbeddingType.Name}'. Vector properties must be one of the supported types: {supportedVectorTypes2}."); 578throw new InvalidOperationException($"Vector property '{propertyModel.ModelName}' must have a positive number of dimensions."); 609$"The collection's generic key type is '{KeyType.Name}', but the key property '{keyProperty.ModelName}' has type '{keyProperty.Type.Name}'. " +
ProviderServices\DataPropertyModel.cs (1)
35=> $"{ModelName} (Data, {Type.Name})";
ProviderServices\Filter\FilterTranslatorBase.cs (1)
225throw new InvalidCastException($"Property '{propertyModel.ModelName}' is being cast to type '{convert.Type.Name}', but its configured type is '{propertyModel.Type.Name}'.");
ProviderServices\KeyPropertyModel.cs (1)
34=> $"{ModelName} (Key, {Type.Name}{(IsAutoGenerated ? ", auto-generated" : string.Empty)})";
ProviderServices\PropertyModel.cs (4)
39get => field ?? ModelName; 127_ = dictionary.TryGetValue(ModelName, out var value); 131throw new InvalidCastException($"Property '{ModelName}' has a value of type '{value.GetType().Name}', but its configured type is '{propertyType.Name}'."); 137_setter = (record, value) => ((Dictionary<string, object?>)record)[ModelName] = value;
ProviderServices\VectorDataStrings.cs (7)
23=> $"Vector property '{vectorProperty.ModelName}' has embedding type '{TypeName(userRequestedEmbeddingType)}' configured, but that type isn't supported by your embedding generator."; 26=> $"Vector property '{vectorProperty.ModelName}' has embedding type '{TypeName(userRequestedEmbeddingType)}' configured, but that type isn't supported by your provider. Supported types are {supportedVectorTypes}."; 29=> $"An embedding generator was configured on property '{vectorProperty.ModelName}', but output embedding type '{vectorProperty.EmbeddingType.Name}' isn't supported by the provider."; 32=> $"Property '{vectorProperty.ModelName}' has embedding type '{TypeName(vectorProperty.Type)}', but an embedding generator is configured on the property. Remove the embedding generator or change the property's .NET type to a non-embedding input type to the generator (e.g. string)."; 35=> $"Property '{vectorProperty.ModelName}' has {nameof(VectorStoreVectorProperty.EmbeddingType)} configured to '{TypeName(embeddingType)}', but the property already has natively supported '{TypeName(vectorProperty.Type)}'. {nameof(VectorStoreVectorProperty.EmbeddingType)} only needs to be specified for properties that require embedding generation."; 44=> $"Embedding generator '{TypeName(embeddingGenerator.GetType())}' on vector property '{vectorProperty.ModelName}' cannot convert the input type '{TypeName(vectorProperty.Type)}' to a supported vector type (one of: {supportedOutputTypes})."; 56=> $"Vector property '{vectorProperty.ModelName}' has type '{TypeName(vectorProperty.Type)}' which isn't supported by your provider, and no embedding generator is configured. Configure a generator that supports converting '{TypeName(vectorProperty.Type)}' to vector type supported by your provider.";
ProviderServices\VectorPropertyModel.cs (6)
136? throw new InvalidOperationException($"No embedding generation is configured for property '{ModelName}'.") 146? throw new InvalidOperationException($"No embedding generation is configured for property '{ModelName}'.") 160: throw new InvalidOperationException($"Property '{ModelName}' was configured with an embedding generator accepting a string, but {v?.GetType().Name ?? "null"} was provided.")), 167: throw new InvalidOperationException($"Property '{ModelName}' was configured with an embedding generator accepting a {nameof(DataContent)}, but {v?.GetType().Name ?? "null"} was provided.")), 173$"The embedding generator configured on property '{ModelName}' cannot produce an embedding of type '{typeof(TEmbedding).Name}' for the given input type."), 203=> $"{ModelName} (Vector, {Type.Name})";
ProviderServices\VectorPropertyModel{TInput}.cs (2)
43: throw new InvalidOperationException($"Property '{ModelName}' was configured with an embedding generator accepting a {typeof(TInput).Name}, but {v?.GetType().Name ?? "null"} was provided.")), 47$"The embedding generator configured on property '{ModelName}' cannot produce an embedding of type '{typeof(TEmbedding).Name}' for the given input type."),