Skip to content

Conversation

@mpartipilo
Copy link
Collaborator

@mpartipilo mpartipilo commented Jun 8, 2025

Update REST DTOs to use object types instead of dynamic, fix a bug in the collection client, and introduce new vectorizer and named vector configurations for improved functionality.

resolves #23

Copy link

@orca-security-eu orca-security-eu bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca

@mpartipilo mpartipilo marked this pull request as ready for review June 8, 2025 22:57

public static readonly Vectorizer None = new("none", new { });
// TODO Maybe have a global config value for default named vector
public static NamedVectorConfig None(string name = "default") => New(name);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not add a default for now

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also needs the VectorIndexConfig field

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not add a default for now

I thought this was the intention all along -- having the client name the only vector a "default" one.

else
{
// TODO Throw Exception for unexpected scenario?
vc.Vectorizer = new NoneConfig();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: @dirkkul once mentioned that we want users to select a vectorizer explicitly, perhaps we should throw something here then?
Or make this requirement more apparent

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say we just don't send anything if the user doesn't supply a named vector. But I am open to making it a required argument

@bevzzz
Copy link

bevzzz commented Jun 10, 2025

I notice there's a lot of generic serialization code (type switches and alike) -- is that done to avoid relying on a 3rd-party lib?

Base automatically changed from feat/list_types to mvp June 10, 2025 13:38
@mpartipilo mpartipilo force-pushed the feat/vectorizer_configs branch from 00cec65 to e434eeb Compare June 10, 2025 15:47
@mpartipilo
Copy link
Collaborator Author

I notice there's a lot of generic serialization code (type switches and alike) -- is that done to avoid relying on a 3rd-party lib?

Yes and no. Depends on where you're looking.

If you look into the REST code, that could be auto-generated, and have a lot of serialization handling.

The .NET framework has many serialization options, but I think that before I introduce a 3rd party library I need to fully/better understand all of the intricacies of what Weaviate expects. There's also a LOT of 3rd party libs that do a lot of magic, which I'd rather look into once I know 100% what I need to avoid surprises along the way. My preference in this case is to use a 3rd party lib to eventually get rid of my own code.

…ectorization configurations

- Introduced VectorConfigList for managing multiple VectorConfig instances.
- Implemented Vector class with a Builder pattern for creating vector configurations.
- Added various vectorizer configurations including Img2VecNeural, Multi2Vec, Text2Vec, and more.
- Defined properties for each vectorizer configuration to support multimedia and text vectorization.
- Included implicit conversion operators for seamless integration between VectorConfig and VectorConfigList.
- Fix capitalization of properties built from Linq Expressions
@mpartipilo mpartipilo force-pushed the feat/vectorizer_configs branch from e4f83db to 0327136 Compare June 11, 2025 10:55
moveAway: new Move(0.5f, concepts: concepts),
fields: ["value"],
metadata: new MetadataQuery(Vectors: new HashSet<string>(["default"]))
// metadata: new MetadataQuery("default")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove commented out code?

new VectorConfig { Vectorizer = Vectorizer.None, VectorIndexType = "hnsw" }
},
},
vectorConfig: Vector.Name(Vector.DefaultVectorName),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does this produce?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as Vector.Name(Vector.DefaultVectorName).With(new VectorizerConfig.None()).With(new VectorIndexConfig.HNSW())

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oki, I need to think a bit about this. Hope I'll have time to play around with it but let's go with this for now :)

@dirkkul dirkkul merged commit 0204fdb into mvp Jun 11, 2025
2 checks passed
@dirkkul dirkkul deleted the feat/vectorizer_configs branch June 11, 2025 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants