How to provide own data to search through to OpenAI API from .NET? (Like Langchain in Python)

Is there a way to use langchain or something similar to ask ChatGPT questions based on your own data, but from C#? I mean - using .NET (without Python) to drive chunks of your own data into a vector database (with embeddings) and feed it to the OpenAI API so that it can search through my data?


Python is just an example. The best way, in my opinion, is to look at the curl examples in the docs

and then ask ChatGPT to translate it into the target language/framework for you :cowboy_hat_face:

1 Like

Really cool idea. Just maybe you can specify what should I do after I built embeddings for my data chunks with chat GPT , for example with this method ? I mean when (as a next step) I gonna provide my query - how to push all embeddings to chat so that it search the closest ones?

You could use a vector DB, or just loop over your embeddings to find whatever’s closest (cosine similarity) to your input, and paste that into the context :slight_smile:

1 Like