From e0f530ef972b01c088bdcfeb404484b9d387144a Mon Sep 17 00:00:00 2001
From: Chaithra-07 <70741371+Chaithra-07@users.noreply.github.com>
Date: Mon, 18 Mar 2024 23:01:25 +0530
Subject: [PATCH 1/3] Changes for AI orchestration (#112)
* Changes for AI orchestration
* Added AI Orchestration classes along with LLM tasks
---
Conductor/Api/IIntegrationResourceApi.cs | 567 +++
Conductor/Api/IPromptResourceApi.cs | 200 +
Conductor/Api/IntegrationResourceApi.cs | 3504 +++++++++++++++++
Conductor/Api/PromptResourceApi.cs | 1257 ++++++
Conductor/Client/Ai/Configuration.cs | 59 +
Conductor/Client/Ai/Integrations.cs | 192 +
Conductor/Client/Ai/Orchestrator.cs | 237 ++
Conductor/Client/Constants.cs | 58 +-
Conductor/Client/Models/EventLog.cs | 220 ++
Conductor/Client/Models/Integration.cs | 319 ++
Conductor/Client/Models/IntegrationApi.cs | 253 ++
.../Client/Models/IntegrationApiUpdate.cs | 140 +
Conductor/Client/Models/IntegrationDef.cs | 271 ++
.../Client/Models/IntegrationDefFormField.cs | 396 ++
Conductor/Client/Models/IntegrationUpdate.cs | 206 +
Conductor/Client/Models/MessageTemplate.cs | 254 ++
Conductor/Client/Models/Option.cs | 122 +
.../Models/PromptTemplateTestRequest.cs | 205 +
Conductor/Client/Models/Tag.cs | 138 +
Conductor/Client/Models/WorkflowTask.cs | 37 +-
.../TaskType/LlmTasks/LlmChatComplete.cs | 165 +
.../LlmTasks/LlmGenerateEmbeddings.cs | 58 +
.../TaskType/LlmTasks/LlmIndexDocuments.cs | 142 +
.../TaskType/LlmTasks/LlmIndexText.cs | 98 +
.../TaskType/LlmTasks/LlmQueryEmbeddings.cs | 73 +
.../TaskType/LlmTasks/LlmSearchIndex.cs | 96 +
.../TaskType/LlmTasks/LlmTextComplete.cs | 143 +
.../TaskType/LlmTasks/Utils/EmbeddingModel.cs | 29 +
Conductor/conductor-csharp.csproj | 2 +-
Tests/Api/IntegrationResourceApiTests.cs | 472 +++
Tests/Api/PromptResourceApiTest.cs | 249 ++
Tests/Extensions/AssertExtensions.cs | 42 +
Tests/Extensions/IntegrationExtensions.cs | 61 +
Tests/Helper/JsonHelper.cs | 31 +
Tests/Helper/TestConstants.cs | 17 +
Tests/TestData/integration_data.json | 18 +
Tests/conductor-csharp.test.csproj | 5 +
37 files changed, 10333 insertions(+), 3 deletions(-)
create mode 100644 Conductor/Api/IIntegrationResourceApi.cs
create mode 100644 Conductor/Api/IPromptResourceApi.cs
create mode 100644 Conductor/Api/IntegrationResourceApi.cs
create mode 100644 Conductor/Api/PromptResourceApi.cs
create mode 100644 Conductor/Client/Ai/Configuration.cs
create mode 100644 Conductor/Client/Ai/Integrations.cs
create mode 100644 Conductor/Client/Ai/Orchestrator.cs
create mode 100644 Conductor/Client/Models/EventLog.cs
create mode 100644 Conductor/Client/Models/Integration.cs
create mode 100644 Conductor/Client/Models/IntegrationApi.cs
create mode 100644 Conductor/Client/Models/IntegrationApiUpdate.cs
create mode 100644 Conductor/Client/Models/IntegrationDef.cs
create mode 100644 Conductor/Client/Models/IntegrationDefFormField.cs
create mode 100644 Conductor/Client/Models/IntegrationUpdate.cs
create mode 100644 Conductor/Client/Models/MessageTemplate.cs
create mode 100644 Conductor/Client/Models/Option.cs
create mode 100644 Conductor/Client/Models/PromptTemplateTestRequest.cs
create mode 100644 Conductor/Client/Models/Tag.cs
create mode 100644 Conductor/Definition/TaskType/LlmTasks/LlmChatComplete.cs
create mode 100644 Conductor/Definition/TaskType/LlmTasks/LlmGenerateEmbeddings.cs
create mode 100644 Conductor/Definition/TaskType/LlmTasks/LlmIndexDocuments.cs
create mode 100644 Conductor/Definition/TaskType/LlmTasks/LlmIndexText.cs
create mode 100644 Conductor/Definition/TaskType/LlmTasks/LlmQueryEmbeddings.cs
create mode 100644 Conductor/Definition/TaskType/LlmTasks/LlmSearchIndex.cs
create mode 100644 Conductor/Definition/TaskType/LlmTasks/LlmTextComplete.cs
create mode 100644 Conductor/Definition/TaskType/LlmTasks/Utils/EmbeddingModel.cs
create mode 100644 Tests/Api/IntegrationResourceApiTests.cs
create mode 100644 Tests/Api/PromptResourceApiTest.cs
create mode 100644 Tests/Extensions/AssertExtensions.cs
create mode 100644 Tests/Extensions/IntegrationExtensions.cs
create mode 100644 Tests/Helper/JsonHelper.cs
create mode 100644 Tests/Helper/TestConstants.cs
create mode 100644 Tests/TestData/integration_data.json
diff --git a/Conductor/Api/IIntegrationResourceApi.cs b/Conductor/Api/IIntegrationResourceApi.cs
new file mode 100644
index 00000000..b87c0102
--- /dev/null
+++ b/Conductor/Api/IIntegrationResourceApi.cs
@@ -0,0 +1,567 @@
+using Conductor.Client;
+using Conductor.Client.Models;
+using System.Collections.Generic;
+using EventLog = Conductor.Client.Models.EventLog;
+using ThreadTask = System.Threading.Tasks;
+
+namespace conductor_csharp.Api
+{
+ ///
+ /// Represents a collection of functions to interact with the API endpoints
+ ///
+ public interface IIntegrationResourceApi : IApiAccessor
+ {
+ #region Synchronous Operations
+ ///
+ /// Associate a Prompt Template with an Integration
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ ///
+ ///
+ ///
+ ///
+ void AssociatePromptWithIntegration(string integrationProvider, string integrationName, string promptName);
+
+ ///
+ /// Delete an Integration
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ ///
+ ///
+ ///
+ void DeleteIntegrationApi(string name, string integrationName);
+
+ ///
+ /// Delete an Integration Provider
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ ///
+ ///
+ void DeleteIntegrationProvider(string name);
+
+ ///
+ /// Delete a tag for Integration
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ /// The list of tags to be deleted.
+ /// The name of the integration associated with the tag
+ /// The name of the model associated with the tag.
+ ///
+ void DeleteTagForIntegration(List body, string name, string integrationName);
+
+ ///
+ /// Delete a tag for Integration Provider
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ /// The list of tags to be deleted.
+ /// The name of the integration associated with the tag
+ ///
+ void DeleteTagForIntegrationProvider(List body, string name);
+
+ ///
+ /// Get Integration details
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ ///
+ ///
+ /// IntegrationApi
+ IntegrationApi GetIntegrationApi(string name, string integrationName);
+
+ ///
+ /// Get Integrations of an Integration Provider
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ ///
+ /// (optional, default to true)
+ /// List
+ List GetIntegrationApis(string name, bool? activeOnly = null);
+
+ ///
+ /// Get Integrations Available for an Integration Provider
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ ///
+ /// List
+ List GetIntegrationAvailableApis(string name);
+
+ ///
+ /// Get Integration provider
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ ///
+ /// Integration
+ Integration GetIntegrationProvider(string name);
+
+ ///
+ /// Get Integration provider definitions
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ /// List
+ List GetIntegrationProviderDefs();
+
+ ///
+ /// Get all Integrations Providers
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// (optional, default to true)
+ /// List
+ List GetIntegrationProviders(string category = null, bool? activeOnly = null);
+
+ ///
+ /// Get the list of prompt templates associated with an integration
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ ///
+ ///
+ /// List
+ List GetPromptsWithIntegration(string integrationProvider, string integrationName);
+
+ ///
+ /// Get Integrations Providers and Integrations combo
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// (optional, default to true)
+ /// List
+ List GetProvidersAndIntegrations(string type = null, bool? activeOnly = null);
+
+ ///
+ /// Get tags by Integration
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ ///
+ ///
+ /// List
+ List GetTagsForIntegration(string name, string integrationName);
+
+ ///
+ /// Get tags by Integration Provider
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ ///
+ /// List
+ List GetTagsForIntegrationProvider(string name);
+
+ ///
+ /// Get Token Usage by Integration
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ ///
+ ///
+ /// int?
+ int? GetTokenUsageForIntegration(string name, string integrationName);
+
+ ///
+ /// Get Token Usage by Integration Provider
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ ///
+ /// Dictionary
+ Dictionary GetTokenUsageForIntegrationProvider(string name);
+
+ ///
+ /// Put a tag to Integration
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ /// The list of tags to be updated.
+ /// The name of the integration to associate the tag with.
+ /// The name of the model to associate the tag with.
+ ///
+ void PutTagForIntegration(List body, string name, string integrationName);
+
+ ///
+ /// Put a tag to Integration Provider
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ /// The list of tags to be updated.
+ /// The name of the integration to associate the tag with.
+ ///
+ void PutTagForIntegrationProvider(List body, string name);
+
+ ///
+ /// Record Event Stats
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ ///
+ ///
+ ///
+ void RecordEventStats(List body, string type);
+
+ ///
+ /// Register Token usage
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ ///
+ ///
+ ///
+ ///
+ void RegisterTokenUsage(int? body, string name, string integrationName);
+
+ ///
+ /// Create or Update Integration
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ ///
+ ///
+ ///
+ ///
+ void SaveIntegrationApi(IntegrationApiUpdate body, string name, string integrationName);
+
+ ///
+ /// Create or Update Integration provider
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ ///
+ ///
+ ///
+ void SaveIntegrationProvider(IntegrationUpdate body, string name);
+
+ #endregion Synchronous Operations
+
+ #region Asynchronous Operations
+ ///
+ /// Associate a Prompt Template with an Integration
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ ///
+ ///
+ ///
+ /// Task of void
+ ThreadTask.Task AssociatePromptWithIntegrationAsync(string integrationProvider, string integrationName, string promptName);
+
+ ///
+ /// Delete an Integration
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ ///
+ ///
+ /// Task of void
+ ThreadTask.Task DeleteIntegrationApiAsync(string name, string integrationName);
+
+ ///
+ /// Delete an Integration Provider
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ ///
+ /// Task of void
+ ThreadTask.Task DeleteIntegrationProviderAsync(string name);
+
+ ///
+ /// Delete a tag for Integration
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ /// The list of tags to be deleted.
+ /// The name of the integration associated with the tag
+ /// The name of the model associated with the tag.
+ /// Task of void
+ ThreadTask.Task DeleteTagForIntegrationAsync(List body, string name, string integrationName);
+
+ ///
+ /// Delete a tag for Integration Provider
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ /// The list of tags to be deleted.
+ /// The name of the integration associated with the tag
+ /// Task of void
+ ThreadTask.Task DeleteTagForIntegrationProviderAsync(List body, string name);
+
+ ///
+ /// Get Integration details
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ ///
+ ///
+ /// Task of IntegrationApi
+ ThreadTask.Task GetIntegrationApiAsync(string name, string integrationName);
+
+ ///
+ /// Get Integrations of an Integration Provider
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ ///
+ /// (optional, default to true)
+ /// Task of List
+ ThreadTask.Task> GetIntegrationApisAsync(string name, bool? activeOnly = null);
+
+ ///
+ /// Get Integrations Available for an Integration Provider
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ ///
+ /// Task of List
+ ThreadTask.Task> GetIntegrationAvailableApisAsync(string name);
+
+ ///
+ /// Get Integration provider
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ ///
+ /// Task of Integration
+ ThreadTask.Task GetIntegrationProviderAsync(string name);
+
+ ///
+ /// Get Integration provider definitions
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ /// Task of List
+ ThreadTask.Task> GetIntegrationProviderDefsAsync();
+
+ ///
+ /// Get all Integrations Providers
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// (optional, default to true)
+ /// Task of List
+ ThreadTask.Task> GetIntegrationProvidersAsync(string category = null, bool? activeOnly = null);
+
+ ///
+ /// Get the list of prompt templates associated with an integration
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ ///
+ ///
+ /// Task of List
+ ThreadTask.Task> GetPromptsWithIntegrationAsync(string integrationProvider, string integrationName);
+
+ ///
+ /// Get Integrations Providers and Integrations combo
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// (optional, default to true)
+ /// Task of List
+ ThreadTask.Task> GetProvidersAndIntegrationsAsync(string type = null, bool? activeOnly = null);
+
+ ///
+ /// Get tags by Integration
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ ///
+ ///
+ /// Task of List
+ ThreadTask.Task> GetTagsForIntegrationAsync(string name, string integrationName);
+
+ ///
+ /// Get tags by Integration Provider
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ ///
+ /// Task of List
+ ThreadTask.Task> GetTagsForIntegrationProviderAsync(string name);
+
+ ///
+ /// Get Token Usage by Integration
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ ///
+ ///
+ /// Task of int?
+ ThreadTask.Task GetTokenUsageForIntegrationAsync(string name, string integrationName);
+
+ ///
+ /// Get Token Usage by Integration Provider
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ ///
+ /// Task of Dictionary
+ ThreadTask.Task> GetTokenUsageForIntegrationProviderAsync(string name);
+
+ ///
+ /// Put a tag to Integration
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ /// The list of tags to be updated.
+ /// The name of the integration to associate the tag with.
+ /// The name of the model to associate the tag with.
+ /// Task of void
+ ThreadTask.Task PutTagForIntegrationAsync(List body, string name, string integrationName);
+
+ ///
+ /// Put a tag to Integration Provider
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ /// The list of tags to be updated.
+ /// The name of the integration to associate the tag with.
+ /// Task of void
+ ThreadTask.Task PutTagForIntegrationProviderAsync(List body, string name);
+
+ ///
+ /// Record Event Stats
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ ///
+ ///
+ /// Task of void
+ ThreadTask.Task RecordEventStatsAsync(List body, string type);
+
+ ///
+ /// Register Token usage
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ ///
+ ///
+ ///
+ /// Task of void
+ ThreadTask.Task RegisterTokenUsageAsync(int? body, string name, string integrationName);
+
+ ///
+ /// Create or Update Integration
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ ///
+ ///
+ ///
+ /// Task of void
+ ThreadTask.Task SaveIntegrationApiAsync(IntegrationApiUpdate body, string name, string integrationName);
+
+ ///
+ /// Create or Update Integration provider
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ ///
+ ///
+ /// Task of void
+ ThreadTask.Task SaveIntegrationProviderAsync(IntegrationUpdate body, string name);
+ #endregion Asynchronous Operations
+ }
+}
diff --git a/Conductor/Api/IPromptResourceApi.cs b/Conductor/Api/IPromptResourceApi.cs
new file mode 100644
index 00000000..37a887c1
--- /dev/null
+++ b/Conductor/Api/IPromptResourceApi.cs
@@ -0,0 +1,200 @@
+using Conductor.Client;
+using Conductor.Client.Models;
+using System.Collections.Generic;
+
+namespace conductor_csharp.Api
+{
+ ///
+ /// Represents a collection of functions to interact with the API endpoints
+ ///
+ public interface IPromptResourceApi : IApiAccessor
+ {
+ #region Synchronous Operations
+ ///
+ /// Delete Template
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ ///
+ ///
+ void DeleteMessageTemplate(string name);
+
+ ///
+ /// Delete a tag for Prompt Template
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ /// The list of tags to be deleted.
+ /// The name of the Prompt the tag should be deleted from.
+ ///
+ void DeleteTagForPromptTemplate(List body, string name);
+
+ ///
+ /// Get Template
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ ///
+ /// MessageTemplate
+ MessageTemplate GetMessageTemplate(string name);
+
+ ///
+ /// Get Templates
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ /// List
+ List GetMessageTemplates();
+
+ ///
+ /// Get tags by Prompt Template
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ ///
+ /// List
+ List GetTagsForPromptTemplate(string name);
+
+ ///
+ /// Put a tag to Prompt Template
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ /// The list of tags to be updated.
+ /// The name of the Prompt the tag should be updated with.
+ ///
+ void PutTagForPromptTemplate(List body, string name);
+
+ ///
+ /// Create or Update Template
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ ///
+ ///
+ ///
+ /// (optional)
+ ///
+ void SaveMessageTemplate(string body, string description, string name, List models = null);
+
+ ///
+ /// Test Prompt Template
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ ///
+ /// string
+ string TestMessageTemplate(PromptTemplateTestRequest body);
+
+ #endregion Synchronous Operations
+ #region Asynchronous Operations
+ ///
+ /// Delete Template
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ ///
+ /// Task of void
+ System.Threading.Tasks.Task DeleteMessageTemplateAsync(string name);
+
+ ///
+ /// Delete a tag for Prompt Template
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ /// The list of tags to be deleted.
+ /// The name of the Prompt the tag should be deleted from.
+ /// Task of void
+ System.Threading.Tasks.Task DeleteTagForPromptTemplateAsync(List body, string name);
+
+ ///
+ /// Get Template
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ ///
+ /// Task of MessageTemplate
+ System.Threading.Tasks.Task GetMessageTemplateAsync(string name);
+
+ ///
+ /// Get Templates
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ /// Task of List
+ System.Threading.Tasks.Task> GetMessageTemplatesAsync();
+
+ ///
+ /// Get tags by Prompt Template
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ ///
+ /// Task of List
+ System.Threading.Tasks.Task> GetTagsForPromptTemplateAsync(string name);
+
+ ///
+ /// Put a tag to Prompt Template
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ /// The list of tags to be updated.
+ /// The name of the Prompt the tag should be updated with.
+ /// Task of void
+ System.Threading.Tasks.Task PutTagForPromptTemplateAsync(List body, string name);
+
+ ///
+ /// Create or Update Template
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ ///
+ ///
+ ///
+ /// (optional)
+ /// Task of void
+ System.Threading.Tasks.Task SaveMessageTemplateAsync(string body, string description, string name, List models = null);
+
+ ///
+ /// Test Prompt Template
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ ///
+ /// Task of string
+ System.Threading.Tasks.Task TestMessageTemplateAsync(PromptTemplateTestRequest body);
+ #endregion Asynchronous Operations
+ }
+}
diff --git a/Conductor/Api/IntegrationResourceApi.cs b/Conductor/Api/IntegrationResourceApi.cs
new file mode 100644
index 00000000..c946818f
--- /dev/null
+++ b/Conductor/Api/IntegrationResourceApi.cs
@@ -0,0 +1,3504 @@
+using Conductor.Client;
+using Conductor.Client.Models;
+using conductor_csharp.Api;
+using RestSharp;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace Conductor.Api
+{
+ ///
+ /// Represents a collection of functions to interact with the API endpoints
+ ///
+ public partial class IntegrationResourceApi : IIntegrationResourceApi
+ {
+ private ExceptionFactory _exceptionFactory = (name, response) => null;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ ///
+ public IntegrationResourceApi(string basePath)
+ {
+ this.Configuration = new Conductor.Client.Configuration { BasePath = basePath };
+
+ ExceptionFactory = Conductor.Client.Configuration.DefaultExceptionFactory;
+ }
+
+ ///
+ /// Initializes a new instance of the class
+ ///
+ ///
+ public IntegrationResourceApi()
+ {
+ this.Configuration = Conductor.Client.Configuration.Default;
+
+ ExceptionFactory = Conductor.Client.Configuration.DefaultExceptionFactory;
+ }
+
+ ///
+ /// Initializes a new instance of the class
+ /// using Configuration object
+ ///
+ /// An instance of Configuration
+ ///
+ public IntegrationResourceApi(Conductor.Client.Configuration configuration = null)
+ {
+ if (configuration == null) // use the default one in Configuration
+ this.Configuration = Conductor.Client.Configuration.Default;
+ else
+ this.Configuration = configuration;
+
+ ExceptionFactory = Conductor.Client.Configuration.DefaultExceptionFactory;
+ }
+
+ ///
+ /// Gets the base path of the API client.
+ ///
+ /// The base path
+ public string GetBasePath()
+ {
+ return this.Configuration.ApiClient.RestClient.Options.BaseUrl.ToString();
+ }
+
+
+ ///
+ /// Gets or sets the configuration object
+ ///
+ /// An instance of the Configuration
+ public Conductor.Client.Configuration Configuration { get; set; }
+
+ ///
+ /// Provides a factory method hook for the creation of exceptions.
+ ///
+ public Conductor.Client.ExceptionFactory ExceptionFactory
+ {
+ get
+ {
+ if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1)
+ {
+ throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported.");
+ }
+ return _exceptionFactory;
+ }
+ set { _exceptionFactory = value; }
+ }
+
+ ///
+ /// Associate a Prompt Template with an Integration
+ ///
+ /// Thrown when fails to make API call
+ ///
+ ///
+ ///
+ ///
+ public void AssociatePromptWithIntegration(string integrationProvider, string integrationName, string promptName)
+ {
+ AssociatePromptWithIntegrationWithHttpInfo(integrationProvider, integrationName, promptName);
+ }
+
+ ///
+ /// Associate a Prompt Template with an Integration
+ ///
+ /// Thrown when fails to make API call
+ ///
+ ///
+ ///
+ /// ApiResponse of Object(void)
+ public ApiResponse