static async Task Main()

in demo-dotnet/DotNetIntegratedVectorizationDemo/Program.cs [25:61]


        static async Task Main(bool setupAndRunIndexer, string query = null, string filter = null, int k = 3, bool exhaustive = false, bool textOnly = false,  bool hybrid = false, bool semantic = false)
        {
            var configuration = new Configuration();
            new ConfigurationBuilder()
                .SetBasePath(Directory.GetCurrentDirectory())
                .AddEnvironmentVariables()
                .AddJsonFile("local.settings.json")
                .Build()
                .Bind(configuration);

            if (textOnly && hybrid)
            {
                throw new ArgumentException("Cannot specify textOnly with hybrid", nameof(textOnly));
            }

            if (exhaustive && textOnly)
            {
                throw new ArgumentException("Cannot specify exhaustive with textOnly", nameof(exhaustive));
            }

            configuration.Validate();
            var defaultCredential = new DefaultAzureCredential();
            var openAIClient = InitializeOpenAIClient(configuration, defaultCredential);
            var indexClient = InitializeSearchIndexClient(configuration, defaultCredential);
            var indexerClient = InitializeSearchIndexerClient(configuration, defaultCredential);
            var searchClient = indexClient.GetSearchClient(configuration.IndexName);

            if (setupAndRunIndexer)
            {
                await SetupAndRunIndexer(configuration, indexClient, indexerClient, openAIClient);
            }

            if (!string.IsNullOrEmpty(query))
            {
                await Search(searchClient, query, k, filter, exhaustive, textOnly, hybrid, semantic);
            }
        }