Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/wso2/carbon-apimgt into m…
Browse files Browse the repository at this point in the history
…aster-AI-API-temp

# Conflicts:
#	components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/common/mappings/PublisherCommonUtils.java
  • Loading branch information
AnuGayan committed Oct 10, 2024
2 parents f86483d + 60991fb commit 3fdc01e
Show file tree
Hide file tree
Showing 110 changed files with 599 additions and 996 deletions.
2 changes: 1 addition & 1 deletion components/apimgt/org.wso2.carbon.apimgt.api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<parent>
<groupId>org.wso2.carbon.apimgt</groupId>
<artifactId>apimgt</artifactId>
<version>9.30.38-SNAPSHOT</version>
<version>9.30.43-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ public class APIConstants {
public static final String ENDPOINT_CONFIG_SESSION_TIMEOUT = "sessionTimeOut";

public static class AIAPIConstants {
public static final String API_KEY_IDENTIFIER_TYPE = "API_KEY_IDENTIFIER_TYPE";
public static final String API_KEY_IDENTIFIER_TYPE_HEADER = "HEADER";
public static final String API_KEY_IDENTIFIER_TYPE_QUERY_PARAMETER = "QUERY_PARAMETER";
public static final String AI_API_REQUEST_METADATA = "AI_API_REQUEST_METADATA";
public static final String AI_API_RESPONSE_METADATA = "AI_API_RESPONSE_METADATA";
public static final String INPUT_SOURCE_PAYLOAD = "payload";
Expand Down Expand Up @@ -89,5 +92,6 @@ public static class AIAPIConstants {
".completion_tokens";
public static final String LLM_PROVIDER_SERVICE_METADATA_IDENTIFIER_TOTAL_TOKEN_COUNT = "$.usage.total_tokens";
public static final String LLM_PROVIDER_SERVICE_DEFAULT = "default";
public static final String NULL = "null";
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2024, WSO2 LLC. (http://www.wso2.org) All Rights Reserved.
* Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com) All Rights Reserved.
*
* WSO2 LLC. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
Expand All @@ -18,7 +18,7 @@

package org.wso2.carbon.apimgt.api;

public class TokenBaseThrottlingCountHolder {
public class TokenBasedThrottlingCountHolder {

private String productionMaxPromptTokenCount;
private String productionMaxCompletionTokenCount;
Expand All @@ -28,11 +28,11 @@ public class TokenBaseThrottlingCountHolder {
private String sandboxMaxTotalTokenCount;
private Boolean isTokenBasedThrottlingEnabled = false;

public TokenBaseThrottlingCountHolder() {
public TokenBasedThrottlingCountHolder() {

}

public TokenBaseThrottlingCountHolder(String productionMaxPromptTokenCount, String productionMaxCompletionTokenCount,
public TokenBasedThrottlingCountHolder(String productionMaxPromptTokenCount, String productionMaxCompletionTokenCount,
String productionMaxTotalTokenCount, String sandboxMaxPromptTokenCount,
String sandboxMaxCompletionTokenCount, String sandboxMaxTotalTokenCount,
boolean isTokenBasedThrottlingEnabled) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,34 +18,10 @@

package org.wso2.carbon.apimgt.api.model;

import org.wso2.carbon.apimgt.api.TokenBaseThrottlingCountHolder;

public class AIConfiguration {
private String llmProviderId;
private AIEndpointConfiguration aiEndpointConfiguration;
private String llmProviderName;
private String llmProviderApiVersion;
private TokenBaseThrottlingCountHolder tokenBasedThrottlingConfiguration;

public AIEndpointConfiguration getAiEndpointConfiguration() {

return aiEndpointConfiguration;
}

public void setAiEndpointConfiguration(AIEndpointConfiguration aiEndpointConfiguration) {

this.aiEndpointConfiguration = aiEndpointConfiguration;
}

public TokenBaseThrottlingCountHolder getTokenBasedThrottlingConfiguration() {

return tokenBasedThrottlingConfiguration;
}

public void setTokenBasedThrottlingConfiguration(TokenBaseThrottlingCountHolder tokenBasedThrottlingConfiguration) {

this.tokenBasedThrottlingConfiguration = tokenBasedThrottlingConfiguration;
}

public String getLlmProviderName() {

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,8 @@ public void setSoapToRestSequences(List<SOAPToRestSequence> soapToRestSequences)

private AIConfiguration aiConfiguration;

private BackendThrottlingConfiguration backendThrottlingConfiguration;

public AIConfiguration getAiConfiguration() {

return aiConfiguration;
Expand All @@ -246,6 +248,14 @@ public void setAiConfiguration(AIConfiguration AiConfiguration) {
this.aiConfiguration = AiConfiguration;
}

public BackendThrottlingConfiguration getBackendThrottlingConfiguration() {
return backendThrottlingConfiguration;
}

public void setBackendThrottlingConfiguration(BackendThrottlingConfiguration backendThrottlingConfiguration) {
this.backendThrottlingConfiguration = backendThrottlingConfiguration;
}

public String getAudience() {
return audience;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
/*
* Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com) All Rights Reserved.
*
* WSO2 LLC. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

package org.wso2.carbon.apimgt.api.model;

import org.wso2.carbon.apimgt.api.TokenBasedThrottlingCountHolder;

public class BackendThrottlingConfiguration {

private String productionMaxTps;
private String productionTimeUnit = "1000";
private String sandboxMaxTps;
private String sandboxTimeUnit = "1000";
private TokenBasedThrottlingCountHolder tokenBasedThrottlingConfiguration;

public String getProductionMaxTps() {

return productionMaxTps;
}

public void setProductionMaxTps(String productionMaxTps) {

this.productionMaxTps = productionMaxTps;
}

public String getProductionTimeUnit() {
return productionTimeUnit;
}

public void setProductionTimeUnit(String productionTimeUnit) {

this.productionTimeUnit = productionTimeUnit;
}

public String getSandboxMaxTps() {

return sandboxMaxTps;
}

public void setSandboxMaxTps(String sandboxMaxTps) {

this.sandboxMaxTps = sandboxMaxTps;
}

public String getSandboxTimeUnit() {

return sandboxTimeUnit;
}

public void setSandboxTimeUnit(String sandboxTimeUnit) {

this.sandboxTimeUnit = sandboxTimeUnit;
}

public TokenBasedThrottlingCountHolder getTokenBasedThrottlingConfiguration() {

return tokenBasedThrottlingConfiguration;
}

public void setTokenBasedThrottlingConfiguration(TokenBasedThrottlingCountHolder tokenBasedThrottlingConfiguration) {

this.tokenBasedThrottlingConfiguration = tokenBasedThrottlingConfiguration;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ public class EndpointSecurity {

private String apiKeyValue = null;

private String apiKeyIdentifierType = null;

private String customParameters = null;

private Map additionalProperties = new HashMap();
Expand Down Expand Up @@ -205,6 +207,16 @@ public void setApiKeyValue(String apiKeyValue) {
this.apiKeyValue = apiKeyValue;
}

public String getApiKeyIdentifierType() {

return apiKeyIdentifierType;
}

public void setApiKeyIdentifierType(String apiKeyIdentifierType) {

this.apiKeyIdentifierType = apiKeyIdentifierType;
}

public int getConnectionTimeoutDuration() {
return connectionTimeoutDuration;
}
Expand Down Expand Up @@ -244,6 +256,7 @@ public String toString() {
", clientSecret='" + clientSecret + '\'' +
", apiKeyIdentifier='" + apiKeyIdentifier + '\'' +
", apiKeyValue='" + apiKeyValue + '\'' +
", apiKeyIdentifierType='" + apiKeyIdentifierType + '\'' +
", customParameters='" + customParameters + '\'' +
", additionalProperties=" + additionalProperties +
", connectionTimeoutDuration=" + connectionTimeoutDuration +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>apimgt</artifactId>
<groupId>org.wso2.carbon.apimgt</groupId>
<version>9.30.38-SNAPSHOT</version>
<version>9.30.43-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<parent>
<artifactId>apimgt</artifactId>
<groupId>org.wso2.carbon.apimgt</groupId>
<version>9.30.38-SNAPSHOT</version>
<version>9.30.43-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<parent>
<groupId>org.wso2.carbon.apimgt</groupId>
<artifactId>apimgt</artifactId>
<version>9.30.38-SNAPSHOT</version>
<version>9.30.43-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.wso2.carbon.apimgt</groupId>
<artifactId>apimgt</artifactId>
<version>9.30.38-SNAPSHOT</version>
<version>9.30.43-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.wso2.carbon.apimgt</groupId>
<artifactId>apimgt</artifactId>
<version>9.30.38-SNAPSHOT</version>
<version>9.30.43-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.wso2.carbon.apimgt</groupId>
<artifactId>apimgt</artifactId>
<version>9.30.38-SNAPSHOT</version>
<version>9.30.43-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion components/apimgt/org.wso2.carbon.apimgt.core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.wso2.carbon.apimgt</groupId>
<artifactId>apimgt</artifactId>
<version>9.30.38-SNAPSHOT</version>
<version>9.30.43-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>org.wso2.carbon.apimgt</groupId>
<artifactId>apimgt</artifactId>
<version>9.30.38-SNAPSHOT</version>
<version>9.30.43-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>apimgt</artifactId>
<groupId>org.wso2.carbon.apimgt</groupId>
<version>9.30.38-SNAPSHOT</version>
<version>9.30.43-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion components/apimgt/org.wso2.carbon.apimgt.eventing/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>apimgt</artifactId>
<groupId>org.wso2.carbon.apimgt</groupId>
<version>9.30.38-SNAPSHOT</version>
<version>9.30.43-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion components/apimgt/org.wso2.carbon.apimgt.gateway/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<parent>
<groupId>org.wso2.carbon.apimgt</groupId>
<artifactId>apimgt</artifactId>
<version>9.30.38-SNAPSHOT</version>
<version>9.30.43-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Loading

0 comments on commit 3fdc01e

Please sign in to comment.