Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/pr-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
Orchestration
DevOps
PromptRegistry
Grounding
headerPattern: '^(\w.+): (?:\[(\w.+)\] )?(.+)$'
headerPatternCorrespondence: type, scope, subject
# for available types, check:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.sap.ai.sdk.grounding.model.GetPipelineExecutions;
import com.sap.ai.sdk.grounding.model.GetPipelineStatus;
import com.sap.ai.sdk.grounding.model.GetPipelines;
import com.sap.ai.sdk.grounding.model.ManualPipelineTrigger;
import com.sap.ai.sdk.grounding.model.PipelineDocumentResponse;
import com.sap.ai.sdk.grounding.model.PipelineId;
import com.sap.cloud.sdk.cloudplatform.connectivity.Destination;
Expand Down Expand Up @@ -1002,4 +1003,72 @@ public GetPipelineStatus getPipelineStatus(
localVarAuthNames,
localVarReturnType);
}

/**
* Pipeline Trigger
*
* <p>Manually trigger a pipeline
*
* <p><b>202</b> - Accepted
*
* <p><b>400</b> - The specification of the resource was incorrect
*
* @param aiResourceGroup Resource Group ID
* @param manualPipelineTrigger The value for the parameter manualPipelineTrigger
* @return An OpenApiResponse containing the status code of the HttpResponse.
* @throws OpenApiRequestException if an error occurs while attempting to invoke the API
*/
@Nonnull
public OpenApiResponse manualTriggerPipeline(
Copy link
Contributor

@newtork newtork Aug 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Question)

We don't have a pipeline integration test right? We may need a BLI if there isn't one already. Low priority.

@Nonnull final String aiResourceGroup,
@Nonnull final ManualPipelineTrigger manualPipelineTrigger)
throws OpenApiRequestException {
final Object localVarPostBody = manualPipelineTrigger;

// verify the required parameter 'aiResourceGroup' is set
if (aiResourceGroup == null) {
throw new OpenApiRequestException(
"Missing the required parameter 'aiResourceGroup' when calling manualTriggerPipeline");
}

// verify the required parameter 'manualPipelineTrigger' is set
if (manualPipelineTrigger == null) {
throw new OpenApiRequestException(
"Missing the required parameter 'manualPipelineTrigger' when calling pipelineV1PipelineEndpointsTriggerPipeline");
}

final String localVarPath =
UriComponentsBuilder.fromPath("/pipelines/trigger").build().toUriString();

final MultiValueMap<String, String> localVarQueryParams =
new LinkedMultiValueMap<String, String>();
final HttpHeaders localVarHeaderParams = new HttpHeaders();
final MultiValueMap<String, Object> localVarFormParams =
new LinkedMultiValueMap<String, Object>();

if (aiResourceGroup != null)
localVarHeaderParams.add("AI-Resource-Group", apiClient.parameterToString(aiResourceGroup));

final String[] localVarAccepts = {"application/json"};
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {"application/json"};
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

final String[] localVarAuthNames = new String[] {};

final ParameterizedTypeReference<Void> localVarReturnType =
new ParameterizedTypeReference<Void>() {};
apiClient.invokeAPI(
localVarPath,
HttpMethod.POST,
localVarQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType);
return new OpenApiResponse(apiClient);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
import com.sap.ai.sdk.grounding.model.DocumentUpdateRequest;
import com.sap.ai.sdk.grounding.model.Documents;
import com.sap.ai.sdk.grounding.model.DocumentsListResponse;
import com.sap.ai.sdk.grounding.model.SearchResults;
import com.sap.ai.sdk.grounding.model.TextSearchRequest;
import com.sap.ai.sdk.grounding.model.VectorSearchResults;
import com.sap.ai.sdk.grounding.model.VectorV1VectorEndpointsGetCollectionCreationStatus200Response;
import com.sap.ai.sdk.grounding.model.VectorV1VectorEndpointsGetCollectionDeletionStatus200Response;
import com.sap.cloud.sdk.cloudplatform.connectivity.Destination;
Expand Down Expand Up @@ -914,11 +914,11 @@ public DocumentResponse getDocumentById(
*
* @param aiResourceGroup Resource Group ID
* @param textSearchRequest The value for the parameter textSearchRequest
* @return SearchResults
* @return VectorSearchResults
* @throws OpenApiRequestException if an error occurs while attempting to invoke the API
*/
@Nonnull
public SearchResults search(
public VectorSearchResults search(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Comment)

Also here we may need a BLI for adding an integration test for vector searching. Low priority.

@Nonnull final String aiResourceGroup, @Nonnull final TextSearchRequest textSearchRequest)
throws OpenApiRequestException {
final Object localVarPostBody = textSearchRequest;
Expand Down Expand Up @@ -954,8 +954,8 @@ public SearchResults search(

final String[] localVarAuthNames = new String[] {};

final ParameterizedTypeReference<SearchResults> localVarReturnType =
new ParameterizedTypeReference<SearchResults>() {};
final ParameterizedTypeReference<VectorSearchResults> localVarReturnType =
new ParameterizedTypeReference<VectorSearchResults>() {};
return apiClient.invokeAPI(
localVarPath,
HttpMethod.POST,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class BaseDocument
private List<TextOnlyBaseChunk> chunks = new ArrayList<>();

@JsonProperty("metadata")
private List<DocumentKeyValueListPair> metadata = new ArrayList<>();
private List<VectorDocumentKeyValueListPair> metadata = new ArrayList<>();

@JsonAnySetter @JsonAnyGetter
private final Map<String, Object> cloudSdkCustomFields = new LinkedHashMap<>();
Expand Down Expand Up @@ -96,7 +96,7 @@ public void setChunks(@Nonnull final List<TextOnlyBaseChunk> chunks) {
* @return The same instance of this {@link BaseDocument} class
*/
@Nonnull
public BaseDocument metadata(@Nonnull final List<DocumentKeyValueListPair> metadata) {
public BaseDocument metadata(@Nonnull final List<VectorDocumentKeyValueListPair> metadata) {
this.metadata = metadata;
return this;
}
Expand All @@ -108,7 +108,7 @@ public BaseDocument metadata(@Nonnull final List<DocumentKeyValueListPair> metad
* @return The same instance of type {@link BaseDocument}
*/
@Nonnull
public BaseDocument addMetadataItem(@Nonnull final DocumentKeyValueListPair metadataItem) {
public BaseDocument addMetadataItem(@Nonnull final VectorDocumentKeyValueListPair metadataItem) {
if (this.metadata == null) {
this.metadata = new ArrayList<>();
}
Expand All @@ -122,7 +122,7 @@ public BaseDocument addMetadataItem(@Nonnull final DocumentKeyValueListPair meta
* @return metadata The metadata of this {@link BaseDocument} instance.
*/
@Nonnull
public List<DocumentKeyValueListPair> getMetadata() {
public List<VectorDocumentKeyValueListPair> getMetadata() {
return metadata;
}

Expand All @@ -131,7 +131,7 @@ public List<DocumentKeyValueListPair> getMetadata() {
*
* @param metadata The metadata of this {@link BaseDocument}
*/
public void setMetadata(@Nonnull final List<DocumentKeyValueListPair> metadata) {
public void setMetadata(@Nonnull final List<VectorDocumentKeyValueListPair> metadata) {
this.metadata = metadata;
}

Expand Down Expand Up @@ -270,15 +270,15 @@ public interface Builder1 {
* @param metadata The metadata of this {@link BaseDocument}
* @return The BaseDocument instance.
*/
BaseDocument metadata(@Nonnull final List<DocumentKeyValueListPair> metadata);
BaseDocument metadata(@Nonnull final List<VectorDocumentKeyValueListPair> metadata);

/**
* Set the metadata of this {@link BaseDocument} instance.
*
* @param metadata The metadata of this {@link BaseDocument}
* @return The BaseDocument instance.
*/
default BaseDocument metadata(@Nonnull final DocumentKeyValueListPair... metadata) {
default BaseDocument metadata(@Nonnull final VectorDocumentKeyValueListPair... metadata) {
return metadata(Arrays.asList(metadata));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class Collection
private EmbeddingConfig embeddingConfig;

@JsonProperty("metadata")
private List<KeyValueListPair> metadata = new ArrayList<>();
private List<VectorKeyValueListPair> metadata = new ArrayList<>();

@JsonProperty("id")
private UUID id;
Expand Down Expand Up @@ -119,7 +119,7 @@ public void setEmbeddingConfig(@Nonnull final EmbeddingConfig embeddingConfig) {
* @return The same instance of this {@link Collection} class
*/
@Nonnull
public Collection metadata(@Nullable final List<KeyValueListPair> metadata) {
public Collection metadata(@Nullable final List<VectorKeyValueListPair> metadata) {
this.metadata = metadata;
return this;
}
Expand All @@ -131,7 +131,7 @@ public Collection metadata(@Nullable final List<KeyValueListPair> metadata) {
* @return The same instance of type {@link Collection}
*/
@Nonnull
public Collection addMetadataItem(@Nonnull final KeyValueListPair metadataItem) {
public Collection addMetadataItem(@Nonnull final VectorKeyValueListPair metadataItem) {
if (this.metadata == null) {
this.metadata = new ArrayList<>();
}
Expand All @@ -145,7 +145,7 @@ public Collection addMetadataItem(@Nonnull final KeyValueListPair metadataItem)
* @return metadata The metadata of this {@link Collection} instance.
*/
@Nonnull
public List<KeyValueListPair> getMetadata() {
public List<VectorKeyValueListPair> getMetadata() {
return metadata;
}

Expand All @@ -155,7 +155,7 @@ public List<KeyValueListPair> getMetadata() {
* @param metadata Metadata attached to collection. Useful to restrict search to a subset of
* collections.
*/
public void setMetadata(@Nullable final List<KeyValueListPair> metadata) {
public void setMetadata(@Nullable final List<VectorKeyValueListPair> metadata) {
this.metadata = metadata;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class CollectionRequest
private EmbeddingConfig embeddingConfig;

@JsonProperty("metadata")
private List<KeyValueListPair> metadata = new ArrayList<>();
private List<VectorKeyValueListPair> metadata = new ArrayList<>();

@JsonAnySetter @JsonAnyGetter
private final Map<String, Object> cloudSdkCustomFields = new LinkedHashMap<>();
Expand Down Expand Up @@ -116,7 +116,7 @@ public void setEmbeddingConfig(@Nonnull final EmbeddingConfig embeddingConfig) {
* @return The same instance of this {@link CollectionRequest} class
*/
@Nonnull
public CollectionRequest metadata(@Nullable final List<KeyValueListPair> metadata) {
public CollectionRequest metadata(@Nullable final List<VectorKeyValueListPair> metadata) {
this.metadata = metadata;
return this;
}
Expand All @@ -128,7 +128,7 @@ public CollectionRequest metadata(@Nullable final List<KeyValueListPair> metadat
* @return The same instance of type {@link CollectionRequest}
*/
@Nonnull
public CollectionRequest addMetadataItem(@Nonnull final KeyValueListPair metadataItem) {
public CollectionRequest addMetadataItem(@Nonnull final VectorKeyValueListPair metadataItem) {
if (this.metadata == null) {
this.metadata = new ArrayList<>();
}
Expand All @@ -142,7 +142,7 @@ public CollectionRequest addMetadataItem(@Nonnull final KeyValueListPair metadat
* @return metadata The metadata of this {@link CollectionRequest} instance.
*/
@Nonnull
public List<KeyValueListPair> getMetadata() {
public List<VectorKeyValueListPair> getMetadata() {
return metadata;
}

Expand All @@ -152,7 +152,7 @@ public List<KeyValueListPair> getMetadata() {
* @param metadata Metadata attached to collection. Useful to restrict search to a subset of
* collections.
*/
public void setMetadata(@Nullable final List<KeyValueListPair> metadata) {
public void setMetadata(@Nullable final List<VectorKeyValueListPair> metadata) {
this.metadata = metadata;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,18 @@
@JsonSubTypes({
@JsonSubTypes.Type(value = MSSharePointPipelineCreateRequest.class, name = "MSSharePoint"),
@JsonSubTypes.Type(value = S3PipelineCreateRequest.class, name = "S3"),
@JsonSubTypes.Type(value = SDMPipelineCreateRequest.class, name = "SDM"),
@JsonSubTypes.Type(value = SFTPPipelineCreateRequest.class, name = "SFTP"),
@JsonSubTypes.Type(value = WorkZonePipelineCreateRequest.class, name = "WorkZone"),
@JsonSubTypes.Type(
value = MSSharePointPipelineCreateRequest.class,
name = "MSSharePointPipelineCreateRequest"),
@JsonSubTypes.Type(value = S3PipelineCreateRequest.class, name = "S3PipelineCreateRequest"),
@JsonSubTypes.Type(value = SDMPipelineCreateRequest.class, name = "SDMPipelineCreateRequest"),
@JsonSubTypes.Type(value = SFTPPipelineCreateRequest.class, name = "SFTPPipelineCreateRequest"),
@JsonSubTypes.Type(
value = WorkZonePipelineCreateRequest.class,
name = "WorkZonePipelineCreateRequest"),
})
public interface CreatePipeline {
Object getType();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class DataRepository
private String title;

@JsonProperty("metadata")
private List<KeyValueListPair> metadata = new ArrayList<>();
private List<RetrievalKeyValueListPair> metadata = new ArrayList<>();

@JsonProperty("type")
private DataRepositoryType type;
Expand Down Expand Up @@ -119,7 +119,7 @@ public void setTitle(@Nonnull final String title) {
* @return The same instance of this {@link DataRepository} class
*/
@Nonnull
public DataRepository metadata(@Nullable final List<KeyValueListPair> metadata) {
public DataRepository metadata(@Nullable final List<RetrievalKeyValueListPair> metadata) {
this.metadata = metadata;
return this;
}
Expand All @@ -131,7 +131,7 @@ public DataRepository metadata(@Nullable final List<KeyValueListPair> metadata)
* @return The same instance of type {@link DataRepository}
*/
@Nonnull
public DataRepository addMetadataItem(@Nonnull final KeyValueListPair metadataItem) {
public DataRepository addMetadataItem(@Nonnull final RetrievalKeyValueListPair metadataItem) {
if (this.metadata == null) {
this.metadata = new ArrayList<>();
}
Expand All @@ -146,7 +146,7 @@ public DataRepository addMetadataItem(@Nonnull final KeyValueListPair metadataIt
* @return metadata The metadata of this {@link DataRepository} instance.
*/
@Nonnull
public List<KeyValueListPair> getMetadata() {
public List<RetrievalKeyValueListPair> getMetadata() {
return metadata;
}

Expand All @@ -156,7 +156,7 @@ public List<KeyValueListPair> getMetadata() {
* @param metadata Metadata attached to DataRepository. Useful to later limit search to a subset
* of DataRepositories.
*/
public void setMetadata(@Nullable final List<KeyValueListPair> metadata) {
public void setMetadata(@Nullable final List<RetrievalKeyValueListPair> metadata) {
this.metadata = metadata;
}

Expand Down
Loading