diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 4874388..3600a7d 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -39,7 +39,6 @@ api_scaling_policy.go api_ssh_access.go api_tokens.go api_variables.go -api_vector_database.go api_volumes.go client.go configuration.go @@ -451,7 +450,6 @@ docs/ValidateCompose422Response.md docs/ValidateComposeRequest.md docs/Variable.md docs/VariablesAPI.md -docs/VectorDatabaseAPI.md docs/Volume.md docs/VolumesAPI.md docs/WafConfig.md @@ -875,6 +873,5 @@ test/api_scaling_policy_test.go test/api_ssh_access_test.go test/api_tokens_test.go test/api_variables_test.go -test/api_vector_database_test.go test/api_volumes_test.go utils.go diff --git a/README.md b/README.md index 5d29881..2fc26e1 100644 --- a/README.md +++ b/README.md @@ -163,6 +163,7 @@ Class | Method | HTTP request | Description *AIVectorDatabaseAPI* | [**DeleteVectorDocuments**](docs/AIVectorDatabaseAPI.md#deletevectordocuments) | **Delete** /api/v3/organizations/{organisation}/ai/vector-db/collections/{collectionId}/documents | Delete Documents from Collection *AIVectorDatabaseAPI* | [**GetVectorCollection**](docs/AIVectorDatabaseAPI.md#getvectorcollection) | **Get** /api/v3/organizations/{organisation}/ai/vector-db/collections/{collectionId} | Get Collection Details *AIVectorDatabaseAPI* | [**ListVectorCollections**](docs/AIVectorDatabaseAPI.md#listvectorcollections) | **Get** /api/v3/organizations/{organisation}/ai/vector-db/collections | List Vector Database Collections +*AIVectorDatabaseAPI* | [**ListVectorDocuments**](docs/AIVectorDatabaseAPI.md#listvectordocuments) | **Get** /api/v3/organizations/{organisation}/ai/vector-db/collections/{collectionId}/documents | List Documents in Collection *AIVectorDatabaseAPI* | [**QueryVectorCollection**](docs/AIVectorDatabaseAPI.md#queryvectorcollection) | **Post** /api/v3/organizations/{organisation}/ai/vector-db/collections/{collectionId}/query | Semantic Search Query *ApplicationsAPI* | [**CreateApplication**](docs/ApplicationsAPI.md#createapplication) | **Post** /api/v3/organizations/{organisation}/applications | Create a new application *ApplicationsAPI* | [**DeleteApplication**](docs/ApplicationsAPI.md#deleteapplication) | **Delete** /api/v3/organizations/{organisation}/applications/{application} | Delete an application @@ -297,7 +298,6 @@ Class | Method | HTTP request | Description *VariablesAPI* | [**DeleteEnvironmentVariable**](docs/VariablesAPI.md#deleteenvironmentvariable) | **Delete** /api/v3/organizations/{api_organisation}/applications/{api_application}/environments/{api_environment}/variables/{api_variable} | Delete a variable *VariablesAPI* | [**ListEnvironmentVariables**](docs/VariablesAPI.md#listenvironmentvariables) | **Get** /api/v3/organizations/{api_organisation}/applications/{api_application}/environments/{api_environment}/variables | Get all variables for an environment *VariablesAPI* | [**UpdateEnvironmentVariable**](docs/VariablesAPI.md#updateenvironmentvariable) | **Put** /api/v3/organizations/{api_organisation}/applications/{api_application}/environments/{api_environment}/variables/{api_variable} | Update a variable -*VectorDatabaseAPI* | [**ListVectorDocuments**](docs/VectorDatabaseAPI.md#listvectordocuments) | **Get** /api/v3/organizations/{organisation}/ai/vector-db/collections/{collectionId}/documents | List Documents in Collection *VolumesAPI* | [**CreateVolume**](docs/VolumesAPI.md#createvolume) | **Post** /api/v3/organizations/{organisation}/applications/{application}/environments/{environment}/volumes | Create a new volume *VolumesAPI* | [**DeleteVolume**](docs/VolumesAPI.md#deletevolume) | **Delete** /api/v3/organizations/{organisation}/applications/{application}/environments/{environment}/volumes/{volume} | Delete a volume *VolumesAPI* | [**GetVolume**](docs/VolumesAPI.md#getvolume) | **Get** /api/v3/organizations/{organisation}/applications/{application}/environments/{environment}/volumes/{volume} | Get a volume diff --git a/api/openapi.yaml b/api/openapi.yaml index f88b21e..982a584 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -80,8 +80,6 @@ tags: name: Volumes - description: API token management name: Tokens -- description: Vector Database - name: Vector Database - description: AI Slack Bots name: AI Slack Bots - description: AI Governance @@ -7590,7 +7588,7 @@ paths: description: Failed to list documents summary: List Documents in Collection tags: - - Vector Database + - AI Vector Database /api/v3/organizations/{organisation}/ai/vector-db/collections/{collectionId}/query: post: description: |- diff --git a/api_ai_vector_database.go b/api_ai_vector_database.go index e8d4f6b..2fa8e86 100644 --- a/api_ai_vector_database.go +++ b/api_ai_vector_database.go @@ -117,6 +117,21 @@ type AIVectorDatabaseAPI interface { // @return ListVectorCollections200Response ListVectorCollectionsExecute(r AIVectorDatabaseAPIListVectorCollectionsRequest) (*ListVectorCollections200Response, *http.Response, error) + /* + ListVectorDocuments List Documents in Collection + + Lists documents in a collection with pagination. Supports filtering by document key. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param organisation + @param collectionId + @return AIVectorDatabaseAPIListVectorDocumentsRequest + */ + ListVectorDocuments(ctx context.Context, organisation string, collectionId string) AIVectorDatabaseAPIListVectorDocumentsRequest + + // ListVectorDocumentsExecute executes the request + ListVectorDocumentsExecute(r AIVectorDatabaseAPIListVectorDocumentsRequest) (*http.Response, error) + /* QueryVectorCollection Semantic Search Query @@ -736,6 +751,136 @@ func (a *AIVectorDatabaseAPIService) ListVectorCollectionsExecute(r AIVectorData return localVarReturnValue, localVarHTTPResponse, nil } +type AIVectorDatabaseAPIListVectorDocumentsRequest struct { + ctx context.Context + ApiService AIVectorDatabaseAPI + organisation string + collectionId string + key *string + limit *int32 + offset *int32 +} + +// Filter by document key +func (r AIVectorDatabaseAPIListVectorDocumentsRequest) Key(key string) AIVectorDatabaseAPIListVectorDocumentsRequest { + r.key = &key + return r +} + +func (r AIVectorDatabaseAPIListVectorDocumentsRequest) Limit(limit int32) AIVectorDatabaseAPIListVectorDocumentsRequest { + r.limit = &limit + return r +} + +func (r AIVectorDatabaseAPIListVectorDocumentsRequest) Offset(offset int32) AIVectorDatabaseAPIListVectorDocumentsRequest { + r.offset = &offset + return r +} + +func (r AIVectorDatabaseAPIListVectorDocumentsRequest) Execute() (*http.Response, error) { + return r.ApiService.ListVectorDocumentsExecute(r) +} + +/* +ListVectorDocuments List Documents in Collection + +Lists documents in a collection with pagination. Supports filtering by document key. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param organisation + @param collectionId + @return AIVectorDatabaseAPIListVectorDocumentsRequest +*/ +func (a *AIVectorDatabaseAPIService) ListVectorDocuments(ctx context.Context, organisation string, collectionId string) AIVectorDatabaseAPIListVectorDocumentsRequest { + return AIVectorDatabaseAPIListVectorDocumentsRequest{ + ApiService: a, + ctx: ctx, + organisation: organisation, + collectionId: collectionId, + } +} + +// Execute executes the request +func (a *AIVectorDatabaseAPIService) ListVectorDocumentsExecute(r AIVectorDatabaseAPIListVectorDocumentsRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AIVectorDatabaseAPIService.ListVectorDocuments") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v3/organizations/{organisation}/ai/vector-db/collections/{collectionId}/documents" + localVarPath = strings.Replace(localVarPath, "{"+"organisation"+"}", url.PathEscape(parameterValueToString(r.organisation, "organisation")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"collectionId"+"}", url.PathEscape(parameterValueToString(r.collectionId, "collectionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.key != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "key", r.key, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } else { + var defaultValue int32 = 50 + r.limit = &defaultValue + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "form", "") + } else { + var defaultValue int32 = 0 + r.offset = &defaultValue + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + type AIVectorDatabaseAPIQueryVectorCollectionRequest struct { ctx context.Context ApiService AIVectorDatabaseAPI diff --git a/api_vector_database.go b/api_vector_database.go deleted file mode 100644 index 577e4e8..0000000 --- a/api_vector_database.go +++ /dev/null @@ -1,172 +0,0 @@ -/* -QuantCDN API - -Unified API for QuantCDN Admin and QuantCloud Platform services - -API version: 4.15.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package quantadmingo - -import ( - "bytes" - "context" - "io" - "net/http" - "net/url" - "strings" -) - - -type VectorDatabaseAPI interface { - - /* - ListVectorDocuments List Documents in Collection - - Lists documents in a collection with pagination. Supports filtering by document key. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param organisation - @param collectionId - @return VectorDatabaseAPIListVectorDocumentsRequest - */ - ListVectorDocuments(ctx context.Context, organisation string, collectionId string) VectorDatabaseAPIListVectorDocumentsRequest - - // ListVectorDocumentsExecute executes the request - ListVectorDocumentsExecute(r VectorDatabaseAPIListVectorDocumentsRequest) (*http.Response, error) -} - -// VectorDatabaseAPIService VectorDatabaseAPI service -type VectorDatabaseAPIService service - -type VectorDatabaseAPIListVectorDocumentsRequest struct { - ctx context.Context - ApiService VectorDatabaseAPI - organisation string - collectionId string - key *string - limit *int32 - offset *int32 -} - -// Filter by document key -func (r VectorDatabaseAPIListVectorDocumentsRequest) Key(key string) VectorDatabaseAPIListVectorDocumentsRequest { - r.key = &key - return r -} - -func (r VectorDatabaseAPIListVectorDocumentsRequest) Limit(limit int32) VectorDatabaseAPIListVectorDocumentsRequest { - r.limit = &limit - return r -} - -func (r VectorDatabaseAPIListVectorDocumentsRequest) Offset(offset int32) VectorDatabaseAPIListVectorDocumentsRequest { - r.offset = &offset - return r -} - -func (r VectorDatabaseAPIListVectorDocumentsRequest) Execute() (*http.Response, error) { - return r.ApiService.ListVectorDocumentsExecute(r) -} - -/* -ListVectorDocuments List Documents in Collection - -Lists documents in a collection with pagination. Supports filtering by document key. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param organisation - @param collectionId - @return VectorDatabaseAPIListVectorDocumentsRequest -*/ -func (a *VectorDatabaseAPIService) ListVectorDocuments(ctx context.Context, organisation string, collectionId string) VectorDatabaseAPIListVectorDocumentsRequest { - return VectorDatabaseAPIListVectorDocumentsRequest{ - ApiService: a, - ctx: ctx, - organisation: organisation, - collectionId: collectionId, - } -} - -// Execute executes the request -func (a *VectorDatabaseAPIService) ListVectorDocumentsExecute(r VectorDatabaseAPIListVectorDocumentsRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VectorDatabaseAPIService.ListVectorDocuments") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v3/organizations/{organisation}/ai/vector-db/collections/{collectionId}/documents" - localVarPath = strings.Replace(localVarPath, "{"+"organisation"+"}", url.PathEscape(parameterValueToString(r.organisation, "organisation")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"collectionId"+"}", url.PathEscape(parameterValueToString(r.collectionId, "collectionId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.key != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "key", r.key, "form", "") - } - if r.limit != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") - } else { - var defaultValue int32 = 50 - r.limit = &defaultValue - } - if r.offset != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "form", "") - } else { - var defaultValue int32 = 0 - r.offset = &defaultValue - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} diff --git a/client.go b/client.go index c3378c6..c373b68 100644 --- a/client.go +++ b/client.go @@ -123,8 +123,6 @@ type APIClient struct { VariablesAPI VariablesAPI - VectorDatabaseAPI VectorDatabaseAPI - VolumesAPI VolumesAPI } @@ -181,7 +179,6 @@ func NewAPIClient(cfg *Configuration) *APIClient { c.ScalingPolicyAPI = (*ScalingPolicyAPIService)(&c.common) c.TokensAPI = (*TokensAPIService)(&c.common) c.VariablesAPI = (*VariablesAPIService)(&c.common) - c.VectorDatabaseAPI = (*VectorDatabaseAPIService)(&c.common) c.VolumesAPI = (*VolumesAPIService)(&c.common) return c diff --git a/docs/AIVectorDatabaseAPI.md b/docs/AIVectorDatabaseAPI.md index 110764b..2bcdbc4 100644 --- a/docs/AIVectorDatabaseAPI.md +++ b/docs/AIVectorDatabaseAPI.md @@ -9,6 +9,7 @@ Method | HTTP request | Description [**DeleteVectorDocuments**](AIVectorDatabaseAPI.md#DeleteVectorDocuments) | **Delete** /api/v3/organizations/{organisation}/ai/vector-db/collections/{collectionId}/documents | Delete Documents from Collection [**GetVectorCollection**](AIVectorDatabaseAPI.md#GetVectorCollection) | **Get** /api/v3/organizations/{organisation}/ai/vector-db/collections/{collectionId} | Get Collection Details [**ListVectorCollections**](AIVectorDatabaseAPI.md#ListVectorCollections) | **Get** /api/v3/organizations/{organisation}/ai/vector-db/collections | List Vector Database Collections +[**ListVectorDocuments**](AIVectorDatabaseAPI.md#ListVectorDocuments) | **Get** /api/v3/organizations/{organisation}/ai/vector-db/collections/{collectionId}/documents | List Documents in Collection [**QueryVectorCollection**](AIVectorDatabaseAPI.md#QueryVectorCollection) | **Post** /api/v3/organizations/{organisation}/ai/vector-db/collections/{collectionId}/query | Semantic Search Query @@ -376,6 +377,83 @@ Name | Type | Description | Notes [[Back to README]](../README.md) +## ListVectorDocuments + +> ListVectorDocuments(ctx, organisation, collectionId).Key(key).Limit(limit).Offset(offset).Execute() + +List Documents in Collection + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/quantcdn/quant-admin-go" +) + +func main() { + organisation := "organisation_example" // string | + collectionId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | + key := "key_example" // string | Filter by document key (optional) + limit := int32(56) // int32 | (optional) (default to 50) + offset := int32(56) // int32 | (optional) (default to 0) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.AIVectorDatabaseAPI.ListVectorDocuments(context.Background(), organisation, collectionId).Key(key).Limit(limit).Offset(offset).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AIVectorDatabaseAPI.ListVectorDocuments``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**organisation** | **string** | | +**collectionId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListVectorDocumentsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **key** | **string** | Filter by document key | + **limit** | **int32** | | [default to 50] + **offset** | **int32** | | [default to 0] + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + ## QueryVectorCollection > QueryVectorCollection200Response QueryVectorCollection(ctx, organisation, collectionId).QueryVectorCollectionRequest(queryVectorCollectionRequest).Execute() diff --git a/docs/VectorDatabaseAPI.md b/docs/VectorDatabaseAPI.md deleted file mode 100644 index 2feaa52..0000000 --- a/docs/VectorDatabaseAPI.md +++ /dev/null @@ -1,86 +0,0 @@ -# \VectorDatabaseAPI - -All URIs are relative to *https://dashboard.quantcdn.io* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListVectorDocuments**](VectorDatabaseAPI.md#ListVectorDocuments) | **Get** /api/v3/organizations/{organisation}/ai/vector-db/collections/{collectionId}/documents | List Documents in Collection - - - -## ListVectorDocuments - -> ListVectorDocuments(ctx, organisation, collectionId).Key(key).Limit(limit).Offset(offset).Execute() - -List Documents in Collection - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/quantcdn/quant-admin-go" -) - -func main() { - organisation := "organisation_example" // string | - collectionId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | - key := "key_example" // string | Filter by document key (optional) - limit := int32(56) // int32 | (optional) (default to 50) - offset := int32(56) // int32 | (optional) (default to 0) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.VectorDatabaseAPI.ListVectorDocuments(context.Background(), organisation, collectionId).Key(key).Limit(limit).Offset(offset).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `VectorDatabaseAPI.ListVectorDocuments``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**organisation** | **string** | | -**collectionId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiListVectorDocumentsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - **key** | **string** | Filter by document key | - **limit** | **int32** | | [default to 50] - **offset** | **int32** | | [default to 0] - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/test/api_ai_vector_database_test.go b/test/api_ai_vector_database_test.go index 3b9af2a..8f63f5f 100644 --- a/test/api_ai_vector_database_test.go +++ b/test/api_ai_vector_database_test.go @@ -95,6 +95,20 @@ func Test_quantadmingo_AIVectorDatabaseAPIService(t *testing.T) { }) + t.Run("Test AIVectorDatabaseAPIService ListVectorDocuments", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var organisation string + var collectionId string + + httpRes, err := apiClient.AIVectorDatabaseAPI.ListVectorDocuments(context.Background(), organisation, collectionId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + t.Run("Test AIVectorDatabaseAPIService QueryVectorCollection", func(t *testing.T) { t.Skip("skip test") // remove to run test diff --git a/test/api_vector_database_test.go b/test/api_vector_database_test.go deleted file mode 100644 index 025dd0b..0000000 --- a/test/api_vector_database_test.go +++ /dev/null @@ -1,39 +0,0 @@ -/* -QuantCDN API - -Testing VectorDatabaseAPIService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package quantadmingo - -import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - openapiclient "github.com/quantcdn/quant-admin-go/v4" -) - -func Test_quantadmingo_VectorDatabaseAPIService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test VectorDatabaseAPIService ListVectorDocuments", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var organisation string - var collectionId string - - httpRes, err := apiClient.VectorDatabaseAPI.ListVectorDocuments(context.Background(), organisation, collectionId).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -}