@breign/client 1.0.3 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +51 -0
- package/dist/apis/AgentApi.d.ts +329 -0
- package/dist/apis/AgentApi.js +787 -0
- package/dist/apis/AppApi.d.ts +348 -0
- package/dist/apis/AppApi.js +837 -0
- package/dist/apis/AuthApi.d.ts +45 -0
- package/dist/apis/AuthApi.js +122 -0
- package/dist/apis/ChunksApi.d.ts +95 -0
- package/dist/apis/ChunksApi.js +235 -0
- package/dist/apis/ConfigurationApi.d.ts +74 -0
- package/dist/apis/ConfigurationApi.js +197 -0
- package/dist/apis/ContentsApi.d.ts +44 -0
- package/dist/apis/ContentsApi.js +115 -0
- package/dist/apis/ConversationsApi.d.ts +87 -0
- package/dist/apis/ConversationsApi.js +214 -0
- package/dist/apis/EngineApi.d.ts +111 -0
- package/dist/apis/EngineApi.js +274 -0
- package/dist/apis/FilesApi.d.ts +67 -0
- package/dist/apis/FilesApi.js +171 -0
- package/dist/apis/GeneralApi.d.ts +28 -0
- package/dist/apis/GeneralApi.js +83 -0
- package/dist/apis/GuardiansApi.d.ts +122 -0
- package/dist/apis/GuardiansApi.js +304 -0
- package/dist/apis/KnowledgeApi.d.ts +171 -0
- package/dist/apis/KnowledgeApi.js +436 -0
- package/dist/apis/ManifestsApi.d.ts +81 -0
- package/dist/apis/ManifestsApi.js +205 -0
- package/dist/apis/MetricsApi.d.ts +46 -0
- package/dist/apis/MetricsApi.js +121 -0
- package/dist/apis/OrganizationsApi.d.ts +31 -0
- package/dist/apis/OrganizationsApi.js +86 -0
- package/dist/apis/PromptsApi.d.ts +101 -0
- package/dist/apis/PromptsApi.js +254 -0
- package/dist/apis/RemotesApi.d.ts +31 -0
- package/dist/apis/RemotesApi.js +88 -0
- package/dist/apis/ToolsApi.d.ts +47 -0
- package/dist/apis/ToolsApi.js +128 -0
- package/dist/apis/index.d.ts +18 -1
- package/dist/apis/index.js +18 -1
- package/dist/models/AgentDuplicateRequestUio.d.ts +56 -0
- package/dist/models/AgentDuplicateRequestUio.js +58 -0
- package/dist/models/{BrainFlowCreateUio.d.ts → AgentFlowCreateUio.d.ts} +12 -12
- package/dist/models/{BrainFlowCreateUio.js → AgentFlowCreateUio.js} +13 -13
- package/dist/models/{BrainFlowUio.d.ts → AgentFlowUio.d.ts} +15 -15
- package/dist/models/{BrainFlowUio.js → AgentFlowUio.js} +16 -16
- package/dist/models/AgentKnowledgeBaseUio.d.ts +57 -0
- package/dist/models/AgentKnowledgeBaseUio.js +67 -0
- package/dist/models/AgentMetricsEventUio.d.ts +65 -0
- package/dist/models/{BrainMetricsEventUio.js → AgentMetricsEventUio.js} +20 -20
- package/dist/models/{BrainMetricsOverviewUio.d.ts → AgentMetricsOverviewUio.d.ts} +14 -14
- package/dist/models/{BrainMetricsOverviewUio.js → AgentMetricsOverviewUio.js} +13 -13
- package/dist/models/AgentMetricsUnitsTypeUio.d.ts +27 -0
- package/dist/models/AgentMetricsUnitsTypeUio.js +53 -0
- package/dist/models/AgentMetricsValueUio.d.ts +57 -0
- package/dist/models/{BrainMetricsValueUio.js → AgentMetricsValueUio.js} +16 -16
- package/dist/models/AgentModuleTypeUio.d.ts +25 -0
- package/dist/models/AgentModuleTypeUio.js +51 -0
- package/dist/models/AgentModuleUio.d.ts +51 -0
- package/dist/models/{BrainModuleUio.js → AgentModuleUio.js} +16 -16
- package/dist/models/{BrainPatchUio.d.ts → AgentPatchUio.d.ts} +49 -42
- package/dist/models/{BrainPatchUio.js → AgentPatchUio.js} +30 -41
- package/dist/models/AgentRequestProfilePictureUio.d.ts +50 -0
- package/dist/models/{BrainRequestImageBrainUio.js → AgentRequestProfilePictureUio.js} +13 -13
- package/dist/models/{BrainRequestUio.d.ts → AgentRequestUio.d.ts} +25 -25
- package/dist/models/{BrainRequestUio.js → AgentRequestUio.js} +16 -16
- package/dist/models/AgentSubscriptionTextInteractionsUio.d.ts +39 -0
- package/dist/models/{BrainSubscriptionTextInteractionsUio.js → AgentSubscriptionTextInteractionsUio.js} +13 -13
- package/dist/models/AgentSubscriptionUio.d.ts +57 -0
- package/dist/models/AgentSubscriptionUio.js +63 -0
- package/dist/models/AgentToolUio.d.ts +78 -0
- package/dist/models/AgentToolUio.js +72 -0
- package/dist/models/AgentTypeUio.d.ts +27 -0
- package/dist/models/AgentTypeUio.js +53 -0
- package/dist/models/{BrainUio.d.ts → AgentUio.d.ts} +60 -39
- package/dist/models/{BrainUio.js → AgentUio.js} +30 -23
- package/dist/models/AgentUsageMetricsIdUio.d.ts +44 -0
- package/dist/models/{BrainUsageMetricsIdUio.js → AgentUsageMetricsIdUio.js} +13 -13
- package/dist/models/AgentUsageMetricsUio.d.ts +46 -0
- package/dist/models/{BrainUsageMetricsUio.js → AgentUsageMetricsUio.js} +16 -16
- package/dist/models/AgentsAgentIdKnowledgeFileImportsPost200ResponseUio.d.ts +56 -0
- package/dist/models/AgentsAgentIdKnowledgeFileImportsPost200ResponseUio.js +56 -0
- package/dist/models/ApiKeyUio.d.ts +44 -0
- package/dist/models/ApiKeyUio.js +58 -0
- package/dist/models/AppChatCreateRequestUio.d.ts +44 -0
- package/dist/models/AppChatCreateRequestUio.js +56 -0
- package/dist/models/AppChatCreateResponseUio.d.ts +38 -0
- package/dist/models/AppChatCreateResponseUio.js +52 -0
- package/dist/models/AppChatSayRequestUio.d.ts +38 -0
- package/dist/models/AppChatSayRequestUio.js +52 -0
- package/dist/models/AppChatSayResponseUio.d.ts +32 -0
- package/dist/models/AppChatSayResponseUio.js +50 -0
- package/dist/models/AppChatSubmitMessageRequestUio.d.ts +32 -0
- package/dist/models/AppChatSubmitMessageRequestUio.js +50 -0
- package/dist/models/AppConfigurationUio.d.ts +33 -0
- package/dist/models/AppConfigurationUio.js +52 -0
- package/dist/models/AppConfigurationUpdateRequestUio.d.ts +33 -0
- package/dist/models/AppConfigurationUpdateRequestUio.js +50 -0
- package/dist/models/AppCreateRequestUio.d.ts +87 -0
- package/dist/models/AppCreateRequestUio.js +73 -0
- package/dist/models/AppFlowCreateRequestUio.d.ts +44 -0
- package/dist/models/AppFlowCreateRequestUio.js +54 -0
- package/dist/models/AppInstanceCreateRequestUio.d.ts +32 -0
- package/dist/models/AppInstanceCreateRequestUio.js +50 -0
- package/dist/models/AppLightUio.d.ts +80 -0
- package/dist/models/AppLightUio.js +80 -0
- package/dist/models/AppProbeRequestUio.d.ts +33 -0
- package/dist/models/AppProbeRequestUio.js +52 -0
- package/dist/models/AppProbeResponseUio.d.ts +39 -0
- package/dist/models/AppProbeResponseUio.js +56 -0
- package/dist/models/AppStatusRequestUio.d.ts +33 -0
- package/dist/models/AppStatusRequestUio.js +51 -0
- package/dist/models/AppStatusResponseUio.d.ts +45 -0
- package/dist/models/AppStatusResponseUio.js +57 -0
- package/dist/models/AppStatusUio.d.ts +25 -0
- package/dist/models/AppStatusUio.js +51 -0
- package/dist/models/AppSubmitMessageRequestUio.d.ts +34 -0
- package/dist/models/AppSubmitMessageRequestUio.js +50 -0
- package/dist/models/AppTextToSpeechRequestUio.d.ts +38 -0
- package/dist/models/AppTextToSpeechRequestUio.js +54 -0
- package/dist/models/AppTextToSpeechResponseUio.d.ts +33 -0
- package/dist/models/AppTextToSpeechResponseUio.js +51 -0
- package/dist/models/AppUio.d.ts +139 -0
- package/dist/models/AppUio.js +109 -0
- package/dist/models/AppUpdateRequestUio.d.ts +81 -0
- package/dist/models/AppUpdateRequestUio.js +65 -0
- package/dist/models/AttachmentCreateRequestUio.d.ts +57 -0
- package/dist/models/AttachmentCreateRequestUio.js +67 -0
- package/dist/models/AttachmentTypeUio.d.ts +24 -0
- package/dist/models/AttachmentTypeUio.js +50 -0
- package/dist/models/AudioFile1Uio.d.ts +45 -0
- package/dist/models/AudioFile1Uio.js +59 -0
- package/dist/models/AudioFileOrBufferUio.d.ts +22 -0
- package/dist/models/AudioFileOrBufferUio.js +50 -0
- package/dist/models/AudioFileTypeUio.d.ts +24 -0
- package/dist/models/AudioFileTypeUio.js +50 -0
- package/dist/models/AudioFileUio.d.ts +45 -0
- package/dist/models/AudioFileUio.js +59 -0
- package/dist/models/AuthCodeConfirmRequestUio.d.ts +45 -0
- package/dist/models/AuthCodeConfirmRequestUio.js +59 -0
- package/dist/models/AuthCodeConfirmResponseUio.d.ts +39 -0
- package/dist/models/AuthCodeConfirmResponseUio.js +55 -0
- package/dist/models/AuthCodeRequestUio.d.ts +40 -0
- package/dist/models/AuthCodeRequestUio.js +56 -0
- package/dist/models/AuthCodeResponseUio.d.ts +38 -0
- package/dist/models/AuthCodeResponseUio.js +54 -0
- package/dist/models/AuthTypeUio.d.ts +24 -0
- package/dist/models/AuthTypeUio.js +50 -0
- package/dist/models/BodyWithIdUio.d.ts +32 -0
- package/dist/models/BodyWithIdUio.js +50 -0
- package/dist/models/BodyWithMessageUio.d.ts +32 -0
- package/dist/models/BodyWithMessageUio.js +50 -0
- package/dist/models/ChatContextUio.d.ts +39 -0
- package/dist/models/ChatContextUio.js +53 -0
- package/dist/models/ChatMessageRoleUio.d.ts +26 -0
- package/dist/models/ChatMessageRoleUio.js +52 -0
- package/dist/models/ChatMessageUio.d.ts +121 -0
- package/dist/models/ChatMessageUio.js +89 -0
- package/dist/models/ChatUio.d.ts +100 -0
- package/dist/models/ChatUio.js +86 -0
- package/dist/models/ChunkContentCreateUio.d.ts +77 -0
- package/dist/models/ChunkContentCreateUio.js +77 -0
- package/dist/models/ChunkContentUio.d.ts +69 -0
- package/dist/models/ChunkContentUio.js +71 -0
- package/dist/models/ChunkCreateRequestContentInnerUio.d.ts +50 -0
- package/dist/models/ChunkCreateRequestContentInnerUio.js +62 -0
- package/dist/models/ChunkCreateRequestUio.d.ts +45 -0
- package/dist/models/ChunkCreateRequestUio.js +53 -0
- package/dist/models/ChunkCreateResponseUio.d.ts +57 -0
- package/dist/models/ChunkCreateResponseUio.js +67 -0
- package/dist/models/ChunkUio.d.ts +57 -0
- package/dist/models/ChunkUio.js +67 -0
- package/dist/models/ConfigurationDefaultFillerPhrasesUio.d.ts +44 -0
- package/dist/models/ConfigurationDefaultFillerPhrasesUio.js +58 -0
- package/dist/models/ContextUio.d.ts +33 -0
- package/dist/models/ContextUio.js +51 -0
- package/dist/models/ConversationUio.d.ts +39 -0
- package/dist/models/ConversationUio.js +55 -0
- package/dist/models/DefaultClientPricesUio.d.ts +39 -0
- package/dist/models/DefaultClientPricesUio.js +55 -0
- package/dist/models/DefaultEngineRequestUio.d.ts +50 -0
- package/dist/models/DefaultEngineRequestUio.js +62 -0
- package/dist/models/DocumentAddRequestUio.d.ts +38 -0
- package/dist/models/DocumentAddRequestUio.js +52 -0
- package/dist/models/DuplicateAgent201ResponseUio.d.ts +32 -0
- package/dist/models/DuplicateAgent201ResponseUio.js +50 -0
- package/dist/models/FileAttachmentProcessedOneOf1Uio.d.ts +45 -0
- package/dist/models/FileAttachmentProcessedOneOf1Uio.js +61 -0
- package/dist/models/FileAttachmentProcessedOneOfUio.d.ts +45 -0
- package/dist/models/FileAttachmentProcessedOneOfUio.js +57 -0
- package/dist/models/FileAttachmentProcessedUio.d.ts +23 -0
- package/dist/models/FileAttachmentProcessedUio.js +57 -0
- package/dist/models/FileAttachmentStatusUio.d.ts +27 -0
- package/dist/models/FileAttachmentStatusUio.js +53 -0
- package/dist/models/FileAttachmentUio.d.ts +89 -0
- package/dist/models/FileAttachmentUio.js +85 -0
- package/dist/models/FileCreationRequestUio.d.ts +6 -0
- package/dist/models/FileCreationRequestUio.js +2 -0
- package/dist/models/FileCreationResponseUio.d.ts +83 -0
- package/dist/models/FileCreationResponseUio.js +83 -0
- package/dist/models/FileStatusUio.d.ts +1 -0
- package/dist/models/FileStatusUio.js +2 -1
- package/dist/models/FileStatusUpdateRequestUio.d.ts +33 -0
- package/dist/models/FileStatusUpdateRequestUio.js +51 -0
- package/dist/models/FileUio.d.ts +2 -8
- package/dist/models/FileUio.js +2 -6
- package/dist/models/FileWithDownloadUrlUio.d.ts +75 -0
- package/dist/models/FileWithDownloadUrlUio.js +79 -0
- package/dist/models/FlowUio.d.ts +45 -0
- package/dist/models/FlowUio.js +53 -0
- package/dist/models/GuardianCreateRequestUio.d.ts +66 -0
- package/dist/models/GuardianCreateRequestUio.js +64 -0
- package/dist/models/GuardianEngineTypeUio.d.ts +26 -0
- package/dist/models/GuardianEngineTypeUio.js +52 -0
- package/dist/models/GuardianEngineUio.d.ts +41 -0
- package/dist/models/GuardianEngineUio.js +55 -0
- package/dist/models/GuardianExcludedAgentsRequestUio.d.ts +32 -0
- package/dist/models/GuardianExcludedAgentsRequestUio.js +50 -0
- package/dist/models/GuardianPositionUio.d.ts +25 -0
- package/dist/models/GuardianPositionUio.js +51 -0
- package/dist/models/GuardianPutRequestUio.d.ts +66 -0
- package/dist/models/GuardianPutRequestUio.js +60 -0
- package/dist/models/GuardianRoleUio.d.ts +28 -0
- package/dist/models/GuardianRoleUio.js +54 -0
- package/dist/models/GuardianUio.d.ts +115 -0
- package/dist/models/GuardianUio.js +85 -0
- package/dist/models/HealthCheckResponseComponentsApiUio.d.ts +33 -0
- package/dist/models/HealthCheckResponseComponentsApiUio.js +49 -0
- package/dist/models/HealthCheckResponseComponentsUio.d.ts +39 -0
- package/dist/models/HealthCheckResponseComponentsUio.js +51 -0
- package/dist/models/HealthCheckResponseUio.d.ts +51 -0
- package/dist/models/HealthCheckResponseUio.js +55 -0
- package/dist/models/HealthStatusUio.d.ts +26 -0
- package/dist/models/HealthStatusUio.js +52 -0
- package/dist/models/InputUio.d.ts +38 -0
- package/dist/models/InputUio.js +54 -0
- package/dist/models/InstanceUio.d.ts +57 -0
- package/dist/models/InstanceUio.js +67 -0
- package/dist/models/KnowledgeBasePrivacyUio.d.ts +25 -0
- package/dist/models/KnowledgeBasePrivacyUio.js +51 -0
- package/dist/models/LipsyncUio.d.ts +45 -0
- package/dist/models/LipsyncUio.js +56 -0
- package/dist/models/ManifestCreateRequestUio.d.ts +51 -0
- package/dist/models/ManifestCreateRequestUio.js +60 -0
- package/dist/models/ManifestUio.d.ts +57 -0
- package/dist/models/ManifestUio.js +66 -0
- package/dist/models/MessageUio.d.ts +32 -0
- package/dist/models/MessageUio.js +50 -0
- package/dist/models/MetricForAgentAgentUio.d.ts +38 -0
- package/dist/models/MetricForAgentAgentUio.js +54 -0
- package/dist/models/MetricForAgentIdentifierUio.d.ts +32 -0
- package/dist/models/MetricForAgentIdentifierUio.js +50 -0
- package/dist/models/MetricForAgentMetricUio.d.ts +57 -0
- package/dist/models/MetricForAgentMetricUio.js +67 -0
- package/dist/models/MetricForAgentMetricWithCostUio.d.ts +64 -0
- package/dist/models/MetricForAgentMetricWithCostUio.js +70 -0
- package/dist/models/MetricForAgentUio.d.ts +55 -0
- package/dist/models/MetricForAgentUio.js +63 -0
- package/dist/models/MetricIdentifierUio.d.ts +57 -0
- package/dist/models/MetricIdentifierUio.js +67 -0
- package/dist/models/MetricUio.d.ts +45 -0
- package/dist/models/MetricUio.js +59 -0
- package/dist/models/ModelUio.d.ts +38 -0
- package/dist/models/ModelUio.js +54 -0
- package/dist/models/OrganizationUio.d.ts +47 -0
- package/dist/models/OrganizationUio.js +60 -0
- package/dist/models/PinRequestUio.d.ts +39 -0
- package/dist/models/PinRequestUio.js +55 -0
- package/dist/models/PriceConfigurationModelConfigUio.d.ts +44 -0
- package/dist/models/PriceConfigurationModelConfigUio.js +58 -0
- package/dist/models/PriceConfigurationModelUio.d.ts +37 -0
- package/dist/models/PriceConfigurationModelUio.js +50 -0
- package/dist/models/PriceConfigurationUio.d.ts +35 -0
- package/dist/models/PriceConfigurationUio.js +52 -0
- package/dist/models/PriceUio.d.ts +38 -0
- package/dist/models/PriceUio.js +54 -0
- package/dist/models/PromptCreateRequestUio.d.ts +44 -0
- package/dist/models/PromptCreateRequestUio.js +56 -0
- package/dist/models/PromptCreateResponseUio.d.ts +58 -0
- package/dist/models/PromptCreateResponseUio.js +66 -0
- package/dist/models/PromptFlowCreateRequestUio.d.ts +38 -0
- package/dist/models/PromptFlowCreateRequestUio.js +52 -0
- package/dist/models/PromptFlowCreateResponseUio.d.ts +51 -0
- package/dist/models/PromptFlowCreateResponseUio.js +61 -0
- package/dist/models/ProviderCreateRequestUio.d.ts +62 -0
- package/dist/models/ProviderCreateRequestUio.js +68 -0
- package/dist/models/ProviderSimpleUio.d.ts +50 -0
- package/dist/models/ProviderSimpleUio.js +62 -0
- package/dist/models/ProviderUio.d.ts +74 -0
- package/dist/models/ProviderUio.js +76 -0
- package/dist/models/ProviderValiationRequestUio.d.ts +38 -0
- package/dist/models/ProviderValiationRequestUio.js +54 -0
- package/dist/models/S3UploadBodyUio.d.ts +40 -0
- package/dist/models/S3UploadBodyUio.js +54 -0
- package/dist/models/STTResponseUio.d.ts +32 -0
- package/dist/models/STTResponseUio.js +50 -0
- package/dist/models/SimpleAgentUio.d.ts +38 -0
- package/dist/models/SimpleAgentUio.js +54 -0
- package/dist/models/SubscriptionMetricUio.d.ts +4 -4
- package/dist/models/SubscriptionMetricUio.js +4 -4
- package/dist/models/SuggestionUio.d.ts +38 -0
- package/dist/models/SuggestionUio.js +54 -0
- package/dist/models/TTSRequestUio.d.ts +45 -0
- package/dist/models/TTSRequestUio.js +59 -0
- package/dist/models/TTSResponseUio.d.ts +45 -0
- package/dist/models/TTSResponseUio.js +57 -0
- package/dist/models/TextToSpeechProviderUio.d.ts +24 -0
- package/dist/models/TextToSpeechProviderUio.js +50 -0
- package/dist/models/ToolActionUio.d.ts +33 -0
- package/dist/models/ToolActionUio.js +52 -0
- package/dist/models/ToolResultUio.d.ts +51 -0
- package/dist/models/ToolResultUio.js +57 -0
- package/dist/models/ToolResultsToolUio.d.ts +38 -0
- package/dist/models/ToolResultsToolUio.js +52 -0
- package/dist/models/ToolResultsUio.d.ts +40 -0
- package/dist/models/ToolResultsUio.js +52 -0
- package/dist/models/UserUio.d.ts +32 -0
- package/dist/models/UserUio.js +50 -0
- package/dist/models/index.d.ts +135 -16
- package/dist/models/index.js +135 -16
- package/dist/openapi.json +6664 -680
- package/package.json +6 -3
- package/dist/apis/BrainApi.d.ts +0 -290
- package/dist/apis/BrainApi.js +0 -637
- package/dist/models/BrainMetricsEventUio.d.ts +0 -65
- package/dist/models/BrainMetricsUnitsTypeUio.d.ts +0 -27
- package/dist/models/BrainMetricsUnitsTypeUio.js +0 -53
- package/dist/models/BrainMetricsValueUio.d.ts +0 -57
- package/dist/models/BrainModuleTypeUio.d.ts +0 -25
- package/dist/models/BrainModuleTypeUio.js +0 -51
- package/dist/models/BrainModuleUio.d.ts +0 -51
- package/dist/models/BrainRequestImageBrainUio.d.ts +0 -50
- package/dist/models/BrainSubscriptionTextInteractionsUio.d.ts +0 -39
- package/dist/models/BrainSubscriptionUio.d.ts +0 -57
- package/dist/models/BrainSubscriptionUio.js +0 -63
- package/dist/models/BrainUsageMetricsIdUio.d.ts +0 -44
- package/dist/models/BrainUsageMetricsUio.d.ts +0 -46
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* brain-client
|
|
3
|
+
* Api ands models for brain-app and brain-app
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.0.0-SNAPSHOT
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import * as runtime from '../runtime';
|
|
13
|
+
import type { AgentModuleUio, AgentsAgentIdKnowledgeFileImportsPost200ResponseUio, BodyWithMessageUio, DocumentAddRequestUio, FileCreationRequestUio, FileCreationResponseUio, FileStatusUpdateRequestUio, FileWithDownloadUrlUio } from '../models/index';
|
|
14
|
+
export interface AddFileToKnowledgeBaseRequest {
|
|
15
|
+
organizationId: string;
|
|
16
|
+
fileCreationRequestUio: FileCreationRequestUio;
|
|
17
|
+
}
|
|
18
|
+
export interface AgentsAgentIdKnowledgeDocumentsPostRequest {
|
|
19
|
+
agentId: string;
|
|
20
|
+
documentAddRequestUio: DocumentAddRequestUio;
|
|
21
|
+
noSplit?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export interface AgentsAgentIdKnowledgeFileImportsPostRequest {
|
|
24
|
+
agentId: string;
|
|
25
|
+
file: Blob;
|
|
26
|
+
}
|
|
27
|
+
export interface AgentsAgentIdKnowledgeFilesFileIdDeleteRequest {
|
|
28
|
+
agentId: string;
|
|
29
|
+
fileId: string;
|
|
30
|
+
}
|
|
31
|
+
export interface AgentsAgentIdKnowledgeFilesFileIdGetRequest {
|
|
32
|
+
agentId: string;
|
|
33
|
+
fileId: string;
|
|
34
|
+
}
|
|
35
|
+
export interface AgentsAgentIdKnowledgeFilesFileIdStatusPostRequest {
|
|
36
|
+
agentId: string;
|
|
37
|
+
fileId: string;
|
|
38
|
+
fileStatusUpdateRequestUio: FileStatusUpdateRequestUio;
|
|
39
|
+
}
|
|
40
|
+
export interface AgentsAgentIdKnowledgeFilesPostRequest {
|
|
41
|
+
agentId: string;
|
|
42
|
+
fileCreationRequestUio: FileCreationRequestUio;
|
|
43
|
+
}
|
|
44
|
+
export interface AgentsAgentIdKnowledgeProjectImportsPostRequest {
|
|
45
|
+
agentId: string;
|
|
46
|
+
}
|
|
47
|
+
export interface AgentsAgentIdKnowledgeResetsPostRequest {
|
|
48
|
+
agentId: string;
|
|
49
|
+
}
|
|
50
|
+
export interface CreateModuleForOrganizationRequest {
|
|
51
|
+
organizationId: string;
|
|
52
|
+
agentModuleUio: AgentModuleUio;
|
|
53
|
+
}
|
|
54
|
+
export interface ResetKnowledgeBaseRequest {
|
|
55
|
+
organizationId: string;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
*
|
|
59
|
+
*/
|
|
60
|
+
export declare class KnowledgeApi extends runtime.BaseAPI {
|
|
61
|
+
/**
|
|
62
|
+
* Add a file to the knowledge base
|
|
63
|
+
* Add a file to the knowledge base
|
|
64
|
+
*/
|
|
65
|
+
addFileToKnowledgeBaseRaw(requestParameters: AddFileToKnowledgeBaseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FileCreationResponseUio>>;
|
|
66
|
+
/**
|
|
67
|
+
* Add a file to the knowledge base
|
|
68
|
+
* Add a file to the knowledge base
|
|
69
|
+
*/
|
|
70
|
+
addFileToKnowledgeBase(organizationId: string, fileCreationRequestUio: FileCreationRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FileCreationResponseUio>;
|
|
71
|
+
/**
|
|
72
|
+
* Adds a text document to the agent\'s knowledge base, splitting it into chunks if necessary
|
|
73
|
+
* Add a document to agent\'s knowledge base
|
|
74
|
+
*/
|
|
75
|
+
agentsAgentIdKnowledgeDocumentsPostRaw(requestParameters: AgentsAgentIdKnowledgeDocumentsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
76
|
+
/**
|
|
77
|
+
* Adds a text document to the agent\'s knowledge base, splitting it into chunks if necessary
|
|
78
|
+
* Add a document to agent\'s knowledge base
|
|
79
|
+
*/
|
|
80
|
+
agentsAgentIdKnowledgeDocumentsPost(agentId: string, documentAddRequestUio: DocumentAddRequestUio, noSplit?: boolean, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
81
|
+
/**
|
|
82
|
+
* Processes documents like PDFs, CSVs, and text files, and adds them to the brain\'s knowledge base
|
|
83
|
+
* Upload and import a file into the brain\'s knowledge base
|
|
84
|
+
*/
|
|
85
|
+
agentsAgentIdKnowledgeFileImportsPostRaw(requestParameters: AgentsAgentIdKnowledgeFileImportsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AgentsAgentIdKnowledgeFileImportsPost200ResponseUio>>;
|
|
86
|
+
/**
|
|
87
|
+
* Processes documents like PDFs, CSVs, and text files, and adds them to the brain\'s knowledge base
|
|
88
|
+
* Upload and import a file into the brain\'s knowledge base
|
|
89
|
+
*/
|
|
90
|
+
agentsAgentIdKnowledgeFileImportsPost(agentId: string, file: Blob, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AgentsAgentIdKnowledgeFileImportsPost200ResponseUio>;
|
|
91
|
+
/**
|
|
92
|
+
* Removes a file and its associated chunks from the agent\'s knowledge base
|
|
93
|
+
* Delete a knowledge file from an agent
|
|
94
|
+
*/
|
|
95
|
+
agentsAgentIdKnowledgeFilesFileIdDeleteRaw(requestParameters: AgentsAgentIdKnowledgeFilesFileIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
96
|
+
/**
|
|
97
|
+
* Removes a file and its associated chunks from the agent\'s knowledge base
|
|
98
|
+
* Delete a knowledge file from an agent
|
|
99
|
+
*/
|
|
100
|
+
agentsAgentIdKnowledgeFilesFileIdDelete(agentId: string, fileId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
101
|
+
/**
|
|
102
|
+
* Retrieves metadata for a file that has been imported into the agent\'s knowledge base
|
|
103
|
+
* Get a specific knowledge file from an agent
|
|
104
|
+
*/
|
|
105
|
+
agentsAgentIdKnowledgeFilesFileIdGetRaw(requestParameters: AgentsAgentIdKnowledgeFilesFileIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FileWithDownloadUrlUio>>;
|
|
106
|
+
/**
|
|
107
|
+
* Retrieves metadata for a file that has been imported into the agent\'s knowledge base
|
|
108
|
+
* Get a specific knowledge file from an agent
|
|
109
|
+
*/
|
|
110
|
+
agentsAgentIdKnowledgeFilesFileIdGet(agentId: string, fileId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FileWithDownloadUrlUio>;
|
|
111
|
+
/**
|
|
112
|
+
* Updates the status of a knowledge file and triggers the indexing process if the file is uploaded
|
|
113
|
+
* Update file status and trigger indexing
|
|
114
|
+
*/
|
|
115
|
+
agentsAgentIdKnowledgeFilesFileIdStatusPostRaw(requestParameters: AgentsAgentIdKnowledgeFilesFileIdStatusPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<any>>;
|
|
116
|
+
/**
|
|
117
|
+
* Updates the status of a knowledge file and triggers the indexing process if the file is uploaded
|
|
118
|
+
* Update file status and trigger indexing
|
|
119
|
+
*/
|
|
120
|
+
agentsAgentIdKnowledgeFilesFileIdStatusPost(agentId: string, fileId: string, fileStatusUpdateRequestUio: FileStatusUpdateRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<any>;
|
|
121
|
+
/**
|
|
122
|
+
* Registers a file for upload to the brain\'s knowledge base and returns an upload URL
|
|
123
|
+
* Prepare file upload for knowledge base
|
|
124
|
+
*/
|
|
125
|
+
agentsAgentIdKnowledgeFilesPostRaw(requestParameters: AgentsAgentIdKnowledgeFilesPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FileCreationResponseUio>>;
|
|
126
|
+
/**
|
|
127
|
+
* Registers a file for upload to the brain\'s knowledge base and returns an upload URL
|
|
128
|
+
* Prepare file upload for knowledge base
|
|
129
|
+
*/
|
|
130
|
+
agentsAgentIdKnowledgeFilesPost(agentId: string, fileCreationRequestUio: FileCreationRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FileCreationResponseUio>;
|
|
131
|
+
/**
|
|
132
|
+
* Imports project data from a local JSON file into the agent\'s knowledge base
|
|
133
|
+
* Import projects into agent knowledge
|
|
134
|
+
*/
|
|
135
|
+
agentsAgentIdKnowledgeProjectImportsPostRaw(requestParameters: AgentsAgentIdKnowledgeProjectImportsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
136
|
+
/**
|
|
137
|
+
* Imports project data from a local JSON file into the agent\'s knowledge base
|
|
138
|
+
* Import projects into agent knowledge
|
|
139
|
+
*/
|
|
140
|
+
agentsAgentIdKnowledgeProjectImportsPost(agentId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
141
|
+
/**
|
|
142
|
+
* Deletes all knowledge embeddings and files associated with an agent
|
|
143
|
+
* Reset all knowledge for an agent
|
|
144
|
+
*/
|
|
145
|
+
agentsAgentIdKnowledgeResetsPostRaw(requestParameters: AgentsAgentIdKnowledgeResetsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
146
|
+
/**
|
|
147
|
+
* Deletes all knowledge embeddings and files associated with an agent
|
|
148
|
+
* Reset all knowledge for an agent
|
|
149
|
+
*/
|
|
150
|
+
agentsAgentIdKnowledgeResetsPost(agentId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
151
|
+
/**
|
|
152
|
+
* Create a new module for an organization
|
|
153
|
+
* Create a new module for an organization
|
|
154
|
+
*/
|
|
155
|
+
createModuleForOrganizationRaw(requestParameters: CreateModuleForOrganizationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AgentModuleUio>>;
|
|
156
|
+
/**
|
|
157
|
+
* Create a new module for an organization
|
|
158
|
+
* Create a new module for an organization
|
|
159
|
+
*/
|
|
160
|
+
createModuleForOrganization(organizationId: string, agentModuleUio: AgentModuleUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AgentModuleUio>;
|
|
161
|
+
/**
|
|
162
|
+
* Reset knowledge base
|
|
163
|
+
* Reset knowledge base
|
|
164
|
+
*/
|
|
165
|
+
resetKnowledgeBaseRaw(requestParameters: ResetKnowledgeBaseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BodyWithMessageUio>>;
|
|
166
|
+
/**
|
|
167
|
+
* Reset knowledge base
|
|
168
|
+
* Reset knowledge base
|
|
169
|
+
*/
|
|
170
|
+
resetKnowledgeBase(organizationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BodyWithMessageUio>;
|
|
171
|
+
}
|
|
@@ -0,0 +1,436 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* brain-client
|
|
6
|
+
* Api ands models for brain-app and brain-app
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.0.0-SNAPSHOT
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
18
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
19
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
20
|
+
}
|
|
21
|
+
Object.defineProperty(o, k2, desc);
|
|
22
|
+
}) : (function(o, m, k, k2) {
|
|
23
|
+
if (k2 === undefined) k2 = k;
|
|
24
|
+
o[k2] = m[k];
|
|
25
|
+
}));
|
|
26
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
27
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
28
|
+
}) : function(o, v) {
|
|
29
|
+
o["default"] = v;
|
|
30
|
+
});
|
|
31
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
32
|
+
var ownKeys = function(o) {
|
|
33
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
34
|
+
var ar = [];
|
|
35
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
36
|
+
return ar;
|
|
37
|
+
};
|
|
38
|
+
return ownKeys(o);
|
|
39
|
+
};
|
|
40
|
+
return function (mod) {
|
|
41
|
+
if (mod && mod.__esModule) return mod;
|
|
42
|
+
var result = {};
|
|
43
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
44
|
+
__setModuleDefault(result, mod);
|
|
45
|
+
return result;
|
|
46
|
+
};
|
|
47
|
+
})();
|
|
48
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49
|
+
exports.KnowledgeApi = void 0;
|
|
50
|
+
const runtime = __importStar(require("../runtime"));
|
|
51
|
+
const index_1 = require("../models/index");
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
*/
|
|
55
|
+
class KnowledgeApi extends runtime.BaseAPI {
|
|
56
|
+
/**
|
|
57
|
+
* Add a file to the knowledge base
|
|
58
|
+
* Add a file to the knowledge base
|
|
59
|
+
*/
|
|
60
|
+
async addFileToKnowledgeBaseRaw(requestParameters, initOverrides) {
|
|
61
|
+
if (requestParameters['organizationId'] == null) {
|
|
62
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling addFileToKnowledgeBase().');
|
|
63
|
+
}
|
|
64
|
+
if (requestParameters['fileCreationRequestUio'] == null) {
|
|
65
|
+
throw new runtime.RequiredError('fileCreationRequestUio', 'Required parameter "fileCreationRequestUio" was null or undefined when calling addFileToKnowledgeBase().');
|
|
66
|
+
}
|
|
67
|
+
const queryParameters = {};
|
|
68
|
+
const headerParameters = {};
|
|
69
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
70
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
71
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
72
|
+
}
|
|
73
|
+
const response = await this.request({
|
|
74
|
+
path: `/organizations/{organizationId}/knowledge/files`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))),
|
|
75
|
+
method: 'POST',
|
|
76
|
+
headers: headerParameters,
|
|
77
|
+
query: queryParameters,
|
|
78
|
+
body: (0, index_1.FileCreationRequestUioToJSON)(requestParameters['fileCreationRequestUio']),
|
|
79
|
+
}, initOverrides);
|
|
80
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.FileCreationResponseUioFromJSON)(jsonValue));
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Add a file to the knowledge base
|
|
84
|
+
* Add a file to the knowledge base
|
|
85
|
+
*/
|
|
86
|
+
async addFileToKnowledgeBase(organizationId, fileCreationRequestUio, initOverrides) {
|
|
87
|
+
const response = await this.addFileToKnowledgeBaseRaw({ organizationId: organizationId, fileCreationRequestUio: fileCreationRequestUio }, initOverrides);
|
|
88
|
+
return await response.value();
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Adds a text document to the agent\'s knowledge base, splitting it into chunks if necessary
|
|
92
|
+
* Add a document to agent\'s knowledge base
|
|
93
|
+
*/
|
|
94
|
+
async agentsAgentIdKnowledgeDocumentsPostRaw(requestParameters, initOverrides) {
|
|
95
|
+
if (requestParameters['agentId'] == null) {
|
|
96
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling agentsAgentIdKnowledgeDocumentsPost().');
|
|
97
|
+
}
|
|
98
|
+
if (requestParameters['documentAddRequestUio'] == null) {
|
|
99
|
+
throw new runtime.RequiredError('documentAddRequestUio', 'Required parameter "documentAddRequestUio" was null or undefined when calling agentsAgentIdKnowledgeDocumentsPost().');
|
|
100
|
+
}
|
|
101
|
+
const queryParameters = {};
|
|
102
|
+
if (requestParameters['noSplit'] != null) {
|
|
103
|
+
queryParameters['noSplit'] = requestParameters['noSplit'];
|
|
104
|
+
}
|
|
105
|
+
const headerParameters = {};
|
|
106
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
107
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
108
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
109
|
+
}
|
|
110
|
+
const response = await this.request({
|
|
111
|
+
path: `/agents/{agentId}/knowledge/documents`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))),
|
|
112
|
+
method: 'POST',
|
|
113
|
+
headers: headerParameters,
|
|
114
|
+
query: queryParameters,
|
|
115
|
+
body: (0, index_1.DocumentAddRequestUioToJSON)(requestParameters['documentAddRequestUio']),
|
|
116
|
+
}, initOverrides);
|
|
117
|
+
return new runtime.VoidApiResponse(response);
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Adds a text document to the agent\'s knowledge base, splitting it into chunks if necessary
|
|
121
|
+
* Add a document to agent\'s knowledge base
|
|
122
|
+
*/
|
|
123
|
+
async agentsAgentIdKnowledgeDocumentsPost(agentId, documentAddRequestUio, noSplit, initOverrides) {
|
|
124
|
+
await this.agentsAgentIdKnowledgeDocumentsPostRaw({ agentId: agentId, documentAddRequestUio: documentAddRequestUio, noSplit: noSplit }, initOverrides);
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Processes documents like PDFs, CSVs, and text files, and adds them to the brain\'s knowledge base
|
|
128
|
+
* Upload and import a file into the brain\'s knowledge base
|
|
129
|
+
*/
|
|
130
|
+
async agentsAgentIdKnowledgeFileImportsPostRaw(requestParameters, initOverrides) {
|
|
131
|
+
if (requestParameters['agentId'] == null) {
|
|
132
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling agentsAgentIdKnowledgeFileImportsPost().');
|
|
133
|
+
}
|
|
134
|
+
if (requestParameters['file'] == null) {
|
|
135
|
+
throw new runtime.RequiredError('file', 'Required parameter "file" was null or undefined when calling agentsAgentIdKnowledgeFileImportsPost().');
|
|
136
|
+
}
|
|
137
|
+
const queryParameters = {};
|
|
138
|
+
const headerParameters = {};
|
|
139
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
140
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
141
|
+
}
|
|
142
|
+
const consumes = [
|
|
143
|
+
{ contentType: 'multipart/form-data' },
|
|
144
|
+
];
|
|
145
|
+
// @ts-ignore: canConsumeForm may be unused
|
|
146
|
+
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
147
|
+
let formParams;
|
|
148
|
+
let useForm = false;
|
|
149
|
+
// use FormData to transmit files using content-type "multipart/form-data"
|
|
150
|
+
useForm = canConsumeForm;
|
|
151
|
+
if (useForm) {
|
|
152
|
+
formParams = new FormData();
|
|
153
|
+
}
|
|
154
|
+
else {
|
|
155
|
+
formParams = new URLSearchParams();
|
|
156
|
+
}
|
|
157
|
+
if (requestParameters['file'] != null) {
|
|
158
|
+
formParams.append('file', requestParameters['file']);
|
|
159
|
+
}
|
|
160
|
+
const response = await this.request({
|
|
161
|
+
path: `/agents/{agentId}/knowledge/file-imports`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))),
|
|
162
|
+
method: 'POST',
|
|
163
|
+
headers: headerParameters,
|
|
164
|
+
query: queryParameters,
|
|
165
|
+
body: formParams,
|
|
166
|
+
}, initOverrides);
|
|
167
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AgentsAgentIdKnowledgeFileImportsPost200ResponseUioFromJSON)(jsonValue));
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Processes documents like PDFs, CSVs, and text files, and adds them to the brain\'s knowledge base
|
|
171
|
+
* Upload and import a file into the brain\'s knowledge base
|
|
172
|
+
*/
|
|
173
|
+
async agentsAgentIdKnowledgeFileImportsPost(agentId, file, initOverrides) {
|
|
174
|
+
const response = await this.agentsAgentIdKnowledgeFileImportsPostRaw({ agentId: agentId, file: file }, initOverrides);
|
|
175
|
+
return await response.value();
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Removes a file and its associated chunks from the agent\'s knowledge base
|
|
179
|
+
* Delete a knowledge file from an agent
|
|
180
|
+
*/
|
|
181
|
+
async agentsAgentIdKnowledgeFilesFileIdDeleteRaw(requestParameters, initOverrides) {
|
|
182
|
+
if (requestParameters['agentId'] == null) {
|
|
183
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling agentsAgentIdKnowledgeFilesFileIdDelete().');
|
|
184
|
+
}
|
|
185
|
+
if (requestParameters['fileId'] == null) {
|
|
186
|
+
throw new runtime.RequiredError('fileId', 'Required parameter "fileId" was null or undefined when calling agentsAgentIdKnowledgeFilesFileIdDelete().');
|
|
187
|
+
}
|
|
188
|
+
const queryParameters = {};
|
|
189
|
+
const headerParameters = {};
|
|
190
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
191
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
192
|
+
}
|
|
193
|
+
const response = await this.request({
|
|
194
|
+
path: `/agents/{agentId}/knowledge/files/{fileId}`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))).replace(`{${"fileId"}}`, encodeURIComponent(String(requestParameters['fileId']))),
|
|
195
|
+
method: 'DELETE',
|
|
196
|
+
headers: headerParameters,
|
|
197
|
+
query: queryParameters,
|
|
198
|
+
}, initOverrides);
|
|
199
|
+
return new runtime.VoidApiResponse(response);
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Removes a file and its associated chunks from the agent\'s knowledge base
|
|
203
|
+
* Delete a knowledge file from an agent
|
|
204
|
+
*/
|
|
205
|
+
async agentsAgentIdKnowledgeFilesFileIdDelete(agentId, fileId, initOverrides) {
|
|
206
|
+
await this.agentsAgentIdKnowledgeFilesFileIdDeleteRaw({ agentId: agentId, fileId: fileId }, initOverrides);
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Retrieves metadata for a file that has been imported into the agent\'s knowledge base
|
|
210
|
+
* Get a specific knowledge file from an agent
|
|
211
|
+
*/
|
|
212
|
+
async agentsAgentIdKnowledgeFilesFileIdGetRaw(requestParameters, initOverrides) {
|
|
213
|
+
if (requestParameters['agentId'] == null) {
|
|
214
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling agentsAgentIdKnowledgeFilesFileIdGet().');
|
|
215
|
+
}
|
|
216
|
+
if (requestParameters['fileId'] == null) {
|
|
217
|
+
throw new runtime.RequiredError('fileId', 'Required parameter "fileId" was null or undefined when calling agentsAgentIdKnowledgeFilesFileIdGet().');
|
|
218
|
+
}
|
|
219
|
+
const queryParameters = {};
|
|
220
|
+
const headerParameters = {};
|
|
221
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
222
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
223
|
+
}
|
|
224
|
+
const response = await this.request({
|
|
225
|
+
path: `/agents/{agentId}/knowledge/files/{fileId}`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))).replace(`{${"fileId"}}`, encodeURIComponent(String(requestParameters['fileId']))),
|
|
226
|
+
method: 'GET',
|
|
227
|
+
headers: headerParameters,
|
|
228
|
+
query: queryParameters,
|
|
229
|
+
}, initOverrides);
|
|
230
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.FileWithDownloadUrlUioFromJSON)(jsonValue));
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Retrieves metadata for a file that has been imported into the agent\'s knowledge base
|
|
234
|
+
* Get a specific knowledge file from an agent
|
|
235
|
+
*/
|
|
236
|
+
async agentsAgentIdKnowledgeFilesFileIdGet(agentId, fileId, initOverrides) {
|
|
237
|
+
const response = await this.agentsAgentIdKnowledgeFilesFileIdGetRaw({ agentId: agentId, fileId: fileId }, initOverrides);
|
|
238
|
+
return await response.value();
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* Updates the status of a knowledge file and triggers the indexing process if the file is uploaded
|
|
242
|
+
* Update file status and trigger indexing
|
|
243
|
+
*/
|
|
244
|
+
async agentsAgentIdKnowledgeFilesFileIdStatusPostRaw(requestParameters, initOverrides) {
|
|
245
|
+
if (requestParameters['agentId'] == null) {
|
|
246
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling agentsAgentIdKnowledgeFilesFileIdStatusPost().');
|
|
247
|
+
}
|
|
248
|
+
if (requestParameters['fileId'] == null) {
|
|
249
|
+
throw new runtime.RequiredError('fileId', 'Required parameter "fileId" was null or undefined when calling agentsAgentIdKnowledgeFilesFileIdStatusPost().');
|
|
250
|
+
}
|
|
251
|
+
if (requestParameters['fileStatusUpdateRequestUio'] == null) {
|
|
252
|
+
throw new runtime.RequiredError('fileStatusUpdateRequestUio', 'Required parameter "fileStatusUpdateRequestUio" was null or undefined when calling agentsAgentIdKnowledgeFilesFileIdStatusPost().');
|
|
253
|
+
}
|
|
254
|
+
const queryParameters = {};
|
|
255
|
+
const headerParameters = {};
|
|
256
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
257
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
258
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
259
|
+
}
|
|
260
|
+
const response = await this.request({
|
|
261
|
+
path: `/agents/{agentId}/knowledge/files/{fileId}/status`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))).replace(`{${"fileId"}}`, encodeURIComponent(String(requestParameters['fileId']))),
|
|
262
|
+
method: 'POST',
|
|
263
|
+
headers: headerParameters,
|
|
264
|
+
query: queryParameters,
|
|
265
|
+
body: (0, index_1.FileStatusUpdateRequestUioToJSON)(requestParameters['fileStatusUpdateRequestUio']),
|
|
266
|
+
}, initOverrides);
|
|
267
|
+
if (this.isJsonMime(response.headers.get('content-type'))) {
|
|
268
|
+
return new runtime.JSONApiResponse(response);
|
|
269
|
+
}
|
|
270
|
+
else {
|
|
271
|
+
return new runtime.TextApiResponse(response);
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Updates the status of a knowledge file and triggers the indexing process if the file is uploaded
|
|
276
|
+
* Update file status and trigger indexing
|
|
277
|
+
*/
|
|
278
|
+
async agentsAgentIdKnowledgeFilesFileIdStatusPost(agentId, fileId, fileStatusUpdateRequestUio, initOverrides) {
|
|
279
|
+
const response = await this.agentsAgentIdKnowledgeFilesFileIdStatusPostRaw({ agentId: agentId, fileId: fileId, fileStatusUpdateRequestUio: fileStatusUpdateRequestUio }, initOverrides);
|
|
280
|
+
return await response.value();
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* Registers a file for upload to the brain\'s knowledge base and returns an upload URL
|
|
284
|
+
* Prepare file upload for knowledge base
|
|
285
|
+
*/
|
|
286
|
+
async agentsAgentIdKnowledgeFilesPostRaw(requestParameters, initOverrides) {
|
|
287
|
+
if (requestParameters['agentId'] == null) {
|
|
288
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling agentsAgentIdKnowledgeFilesPost().');
|
|
289
|
+
}
|
|
290
|
+
if (requestParameters['fileCreationRequestUio'] == null) {
|
|
291
|
+
throw new runtime.RequiredError('fileCreationRequestUio', 'Required parameter "fileCreationRequestUio" was null or undefined when calling agentsAgentIdKnowledgeFilesPost().');
|
|
292
|
+
}
|
|
293
|
+
const queryParameters = {};
|
|
294
|
+
const headerParameters = {};
|
|
295
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
296
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
297
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
298
|
+
}
|
|
299
|
+
const response = await this.request({
|
|
300
|
+
path: `/agents/{agentId}/knowledge/files`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))),
|
|
301
|
+
method: 'POST',
|
|
302
|
+
headers: headerParameters,
|
|
303
|
+
query: queryParameters,
|
|
304
|
+
body: (0, index_1.FileCreationRequestUioToJSON)(requestParameters['fileCreationRequestUio']),
|
|
305
|
+
}, initOverrides);
|
|
306
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.FileCreationResponseUioFromJSON)(jsonValue));
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* Registers a file for upload to the brain\'s knowledge base and returns an upload URL
|
|
310
|
+
* Prepare file upload for knowledge base
|
|
311
|
+
*/
|
|
312
|
+
async agentsAgentIdKnowledgeFilesPost(agentId, fileCreationRequestUio, initOverrides) {
|
|
313
|
+
const response = await this.agentsAgentIdKnowledgeFilesPostRaw({ agentId: agentId, fileCreationRequestUio: fileCreationRequestUio }, initOverrides);
|
|
314
|
+
return await response.value();
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* Imports project data from a local JSON file into the agent\'s knowledge base
|
|
318
|
+
* Import projects into agent knowledge
|
|
319
|
+
*/
|
|
320
|
+
async agentsAgentIdKnowledgeProjectImportsPostRaw(requestParameters, initOverrides) {
|
|
321
|
+
if (requestParameters['agentId'] == null) {
|
|
322
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling agentsAgentIdKnowledgeProjectImportsPost().');
|
|
323
|
+
}
|
|
324
|
+
const queryParameters = {};
|
|
325
|
+
const headerParameters = {};
|
|
326
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
327
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
328
|
+
}
|
|
329
|
+
const response = await this.request({
|
|
330
|
+
path: `/agents/{agentId}/knowledge/project-imports`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))),
|
|
331
|
+
method: 'POST',
|
|
332
|
+
headers: headerParameters,
|
|
333
|
+
query: queryParameters,
|
|
334
|
+
}, initOverrides);
|
|
335
|
+
return new runtime.VoidApiResponse(response);
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* Imports project data from a local JSON file into the agent\'s knowledge base
|
|
339
|
+
* Import projects into agent knowledge
|
|
340
|
+
*/
|
|
341
|
+
async agentsAgentIdKnowledgeProjectImportsPost(agentId, initOverrides) {
|
|
342
|
+
await this.agentsAgentIdKnowledgeProjectImportsPostRaw({ agentId: agentId }, initOverrides);
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* Deletes all knowledge embeddings and files associated with an agent
|
|
346
|
+
* Reset all knowledge for an agent
|
|
347
|
+
*/
|
|
348
|
+
async agentsAgentIdKnowledgeResetsPostRaw(requestParameters, initOverrides) {
|
|
349
|
+
if (requestParameters['agentId'] == null) {
|
|
350
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling agentsAgentIdKnowledgeResetsPost().');
|
|
351
|
+
}
|
|
352
|
+
const queryParameters = {};
|
|
353
|
+
const headerParameters = {};
|
|
354
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
355
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
356
|
+
}
|
|
357
|
+
const response = await this.request({
|
|
358
|
+
path: `/agents/{agentId}/knowledge/resets`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))),
|
|
359
|
+
method: 'POST',
|
|
360
|
+
headers: headerParameters,
|
|
361
|
+
query: queryParameters,
|
|
362
|
+
}, initOverrides);
|
|
363
|
+
return new runtime.VoidApiResponse(response);
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* Deletes all knowledge embeddings and files associated with an agent
|
|
367
|
+
* Reset all knowledge for an agent
|
|
368
|
+
*/
|
|
369
|
+
async agentsAgentIdKnowledgeResetsPost(agentId, initOverrides) {
|
|
370
|
+
await this.agentsAgentIdKnowledgeResetsPostRaw({ agentId: agentId }, initOverrides);
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
373
|
+
* Create a new module for an organization
|
|
374
|
+
* Create a new module for an organization
|
|
375
|
+
*/
|
|
376
|
+
async createModuleForOrganizationRaw(requestParameters, initOverrides) {
|
|
377
|
+
if (requestParameters['organizationId'] == null) {
|
|
378
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling createModuleForOrganization().');
|
|
379
|
+
}
|
|
380
|
+
if (requestParameters['agentModuleUio'] == null) {
|
|
381
|
+
throw new runtime.RequiredError('agentModuleUio', 'Required parameter "agentModuleUio" was null or undefined when calling createModuleForOrganization().');
|
|
382
|
+
}
|
|
383
|
+
const queryParameters = {};
|
|
384
|
+
const headerParameters = {};
|
|
385
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
386
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
387
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
388
|
+
}
|
|
389
|
+
const response = await this.request({
|
|
390
|
+
path: `/organizations/{organizationId}/modules`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))),
|
|
391
|
+
method: 'POST',
|
|
392
|
+
headers: headerParameters,
|
|
393
|
+
query: queryParameters,
|
|
394
|
+
body: (0, index_1.AgentModuleUioToJSON)(requestParameters['agentModuleUio']),
|
|
395
|
+
}, initOverrides);
|
|
396
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AgentModuleUioFromJSON)(jsonValue));
|
|
397
|
+
}
|
|
398
|
+
/**
|
|
399
|
+
* Create a new module for an organization
|
|
400
|
+
* Create a new module for an organization
|
|
401
|
+
*/
|
|
402
|
+
async createModuleForOrganization(organizationId, agentModuleUio, initOverrides) {
|
|
403
|
+
const response = await this.createModuleForOrganizationRaw({ organizationId: organizationId, agentModuleUio: agentModuleUio }, initOverrides);
|
|
404
|
+
return await response.value();
|
|
405
|
+
}
|
|
406
|
+
/**
|
|
407
|
+
* Reset knowledge base
|
|
408
|
+
* Reset knowledge base
|
|
409
|
+
*/
|
|
410
|
+
async resetKnowledgeBaseRaw(requestParameters, initOverrides) {
|
|
411
|
+
if (requestParameters['organizationId'] == null) {
|
|
412
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling resetKnowledgeBase().');
|
|
413
|
+
}
|
|
414
|
+
const queryParameters = {};
|
|
415
|
+
const headerParameters = {};
|
|
416
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
417
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
418
|
+
}
|
|
419
|
+
const response = await this.request({
|
|
420
|
+
path: `/organizations/{organizationId}/knowledge/resets`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))),
|
|
421
|
+
method: 'POST',
|
|
422
|
+
headers: headerParameters,
|
|
423
|
+
query: queryParameters,
|
|
424
|
+
}, initOverrides);
|
|
425
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.BodyWithMessageUioFromJSON)(jsonValue));
|
|
426
|
+
}
|
|
427
|
+
/**
|
|
428
|
+
* Reset knowledge base
|
|
429
|
+
* Reset knowledge base
|
|
430
|
+
*/
|
|
431
|
+
async resetKnowledgeBase(organizationId, initOverrides) {
|
|
432
|
+
const response = await this.resetKnowledgeBaseRaw({ organizationId: organizationId }, initOverrides);
|
|
433
|
+
return await response.value();
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
exports.KnowledgeApi = KnowledgeApi;
|