Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pgvector support #139

Open
retendo opened this issue Jul 13, 2023 · 2 comments
Open

pgvector support #139

retendo opened this issue Jul 13, 2023 · 2 comments

Comments

@retendo
Copy link
Contributor

retendo commented Jul 13, 2023

Is there anything planned already? Otherwise I could come up with something, as we need it anyway for our project.

I would probably have a look at https://github.com/pgvector/pgvector-dotnet or even add it as a dependency if that would be ok.

@Zaid-Ajaj
Copy link
Owner

There is nothing planned for this. It is not already possible to use this without taking a dependency on the library? Because looking at the docs:

var dataSourceBuilder = new NpgsqlDataSourceBuilder(connString);
dataSourceBuilder.UseVector();
await using var dataSource = dataSourceBuilder.Build();

var conn = dataSource.OpenConnection();

Since it gives you a NpgsqlConnection , you can use that from this library with

conn
|> Sql.existingConnection

Specialized input parameters can be implemented with Sql.parameter customParameter and reading rows should be possible because the Sql.execute and friends give you access to the underlying NgpsqlReader

@retendo
Copy link
Contributor Author

retendo commented Oct 9, 2023

@Zaid-Ajaj Yes, it's definitely possible. I was just curious if it is something you are interested in having "first-class support" for. If not, then your answer will probably be sufficient for anyone looking to use pgvector with Npgsql.FSharp. 👍

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

No branches or pull requests

2 participants