C# OpenAI API, GPT Index own website instead of database or folder with data, programmatically?

311 views Asked by At

Consider the following code snippet:

CompletionRequest completionRequest = new CompletionRequest();
completionRequest.Prompt = query;
completionRequest.Model = OpenAI_API.Models.Model.DavinciText;
OpenAIAPI openAIAPI = new OpenAIAPI("API_KEY_HERE");
CompletionResult completionResult = await openAIAPI.Completions.CreateCompletionAsync(completionRequest);
string result = default;
foreach (var completion in completionResult.Completions)
{
     result += completion.Text;
}

Is there a way I can GPT index my own site instead of a database or a folder with data, for example, ...

completionRequest.GPTIndex = "https://mywebsite.com";

This will allow a model of my own custom knowledge-base based on the contents of the specified website.

Is this even the right way to be thinking?

0

There are 0 answers