From 671b3e77a975f1bb7c1121fa0edba446675eda96 Mon Sep 17 00:00:00 2001 From: Roman Kostenko Date: Wed, 28 Oct 2026 14:13:27 +0200 Subject: [PATCH] Change from availableViaApi to customerAccessEnabled. Exclude by default invoke from readonly roles --- .../upgrade/lts/4.4.1.0/schema_update.sql | 2 +- .../server/controller/AiModelController.java | 22 ++--- .../permission/CustomerUserPermissions.java | 11 ++- .../controller/AiModelControllerTest.java | 98 ++++++++++++++----- .../server/dao/ai/AiModelService.java | 4 +- .../server/common/data/ai/AiModel.java | 4 +- .../server/common/data/ai/AiModelInfo.java | 9 +- .../thingsboard/server/dao/ai/AiModelDao.java | 2 +- .../server/dao/ai/AiModelInfoDao.java | 2 +- .../server/dao/ai/AiModelServiceImpl.java | 8 +- .../server/dao/model/ModelConstants.java | 2 +- .../server/dao/model/sql/AiModelEntity.java | 8 +- .../dao/model/sql/AiModelInfoEntity.java | 6 +- .../dao/sql/ai/AiModelInfoRepository.java | 4 +- .../server/dao/sql/ai/AiModelRepository.java | 6 +- .../server/dao/sql/ai/JpaAiModelDao.java | 4 +- .../server/dao/sql/ai/JpaAiModelInfoDao.java | 4 +- .../main/resources/sql/schema-entities.sql | 16 +-- .../python/license-headers/curations.json | 2 +- .../ai-model/ai-model-dialog.component.html | 6 +- .../ai-model/ai-model-dialog.component.ts | 2 +- .../src/app/shared/models/ai-model.models.ts | 2 +- .../assets/locale/locale.constant-da_DK.json | 4 +- .../assets/locale/locale.constant-de_DE.json | 4 +- .../assets/locale/locale.constant-el_GR.json | 4 +- .../assets/locale/locale.constant-en_US.json | 4 +- .../assets/locale/locale.constant-es_ES.json | 4 +- .../assets/locale/locale.constant-fr_FR.json | 4 +- .../assets/locale/locale.constant-hi_IN.json | 4 +- .../assets/locale/locale.constant-it_IT.json | 4 +- .../assets/locale/locale.constant-ja_JP.json | 4 +- .../assets/locale/locale.constant-ko_KR.json | 4 +- .../assets/locale/locale.constant-lt_LT.json | 4 +- .../assets/locale/locale.constant-nl_NL.json | 4 +- .../assets/locale/locale.constant-no_NO.json | 4 +- .../assets/locale/locale.constant-pt_BR.json | 4 +- .../assets/locale/locale.constant-tr_TR.json | 4 +- .../assets/locale/locale.constant-uk_UA.json | 4 +- .../assets/locale/locale.constant-zh_CN.json | 4 +- .../assets/locale/locale.constant-zh_TW.json | 4 +- 40 files changed, 174 insertions(+), 122 deletions(-) diff --git a/application/src/main/data/upgrade/lts/4.4.1.0/schema_update.sql b/application/src/main/data/upgrade/lts/4.4.1.0/schema_update.sql index 78aa309ba5..8779620567 100644 --- a/application/src/main/data/upgrade/lts/4.4.1.0/schema_update.sql +++ b/application/src/main/data/upgrade/lts/4.4.1.0/schema_update.sql @@ -7,4 +7,4 @@ -- when the calculated field actors initialize, otherwise scans the whole table and sorts on each call. CREATE INDEX IF NOT EXISTS idx_calculated_field_tenant_id_id ON calculated_field(tenant_id, id); -ALTER TABLE ai_model ADD COLUMN IF NOT EXISTS available_via_api BOOLEAN NOT NULL DEFAULT FALSE; +ALTER TABLE ai_model ADD COLUMN IF NOT EXISTS customer_access_enabled BOOLEAN NOT NULL DEFAULT FALSE; diff --git a/application/src/main/java/org/thingsboard/server/controller/AiModelController.java b/application/src/main/java/org/thingsboard/server/controller/AiModelController.java index ef060cda0d..d0102a4ecf 100644 --- a/application/src/main/java/org/thingsboard/server/controller/AiModelController.java +++ b/application/src/main/java/org/thingsboard/server/controller/AiModelController.java @@ -111,19 +111,20 @@ class AiModelController extends BaseController { @RequestParam(required = false) String sortProperty, @Parameter(description = SORT_ORDER_DESCRIPTION, schema = @Schema(allowableValues = {"ASC", "DESC"})) @RequestParam(required = false) String sortOrder, - @Parameter(description = "Filter by the 'available via API' flag; all models are returned when omitted") - @RequestParam(required = false) Boolean availableViaApi + @Parameter(description = "Filter by the 'customer access enabled' flag; all models are returned when omitted") + @RequestParam(required = false) Boolean customerAccessEnabled ) throws ThingsboardException { var user = getCurrentUser(); accessControlService.checkPermission(user, Resource.AI_MODEL, Operation.READ); var pageLink = createPageLink(pageSize, page, textSearch, sortProperty, sortOrder); - return aiModelService.findAiModelsByTenantId(user.getTenantId(), availableViaApi, pageLink); + return aiModelService.findAiModelsByTenantId(user.getTenantId(), customerAccessEnabled, pageLink); } @ApiOperation( value = "Get AI model infos (getAiModelInfos)", notes = "Returns a page of AI model infos: AI models without the configuration and its provider credentials. " + - "Requires the 'INVOKE' permission for AI models, so it lists the models a user can choose from to send chat requests to. " + + "Requires the 'INVOKE' permission for AI models. " + + "Customer users only get the models with customer access enabled, which are the ones they can send chat requests to. " + PAGE_DATA_PARAMETERS + TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH ) @PreAuthorize("hasAnyAuthority('TENANT_ADMIN', 'CUSTOMER_USER')") @@ -139,13 +140,13 @@ class AiModelController extends BaseController { @RequestParam(required = false) String sortProperty, @Parameter(description = SORT_ORDER_DESCRIPTION, schema = @Schema(allowableValues = {"ASC", "DESC"})) @RequestParam(required = false) String sortOrder, - @Parameter(description = "Filter by the 'available via API' flag; all models are returned when omitted") - @RequestParam(required = false) Boolean availableViaApi + @Parameter(description = "Filter by the 'customer access enabled' flag; all models are returned when omitted. Ignored for customer users") + @RequestParam(required = false) Boolean customerAccessEnabled ) throws ThingsboardException { var user = getCurrentUser(); accessControlService.checkPermission(user, Resource.AI_MODEL, Operation.INVOKE); var pageLink = createPageLink(pageSize, page, textSearch, sortProperty, sortOrder); - return aiModelService.findAiModelInfosByTenantId(user.getTenantId(), availableViaApi, pageLink); + return aiModelService.findAiModelInfosByTenantId(user.getTenantId(), user.isCustomerUser() ? Boolean.TRUE : customerAccessEnabled, pageLink); } @ApiOperation( @@ -195,9 +196,9 @@ class AiModelController extends BaseController { value = "Send request to a saved AI chat model (sendChatRequestToAiModel)", notes = "Submits a single prompt - made up of an optional system message and a required user message - to the AI chat model " + "with the specified `id`, using its saved configuration, and returns either the generated answer or an error envelope. " + - "The model must be marked as available via API, and the user must have the 'INVOKE' permission for AI models. " + + "The user must have the 'INVOKE' permission for AI models, and customer users additionally require the model to have customer access enabled. " + "Roles that grant all operations, such as the default 'Customer Administrator' role, include 'INVOKE', " + - "so marking a model as available via API makes it callable by every user with such a role." + + "so enabling customer access makes the model callable by every customer user with such a role." + TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH ) @PreAuthorize("hasAnyAuthority('TENANT_ADMIN', 'CUSTOMER_USER')") @@ -212,9 +213,6 @@ class AiModelController extends BaseController { @Valid @RequestBody TbChatRequest tbChatRequest ) throws ThingsboardException { AiModel model = checkAiModelId(new AiModelId(modelUuid), Operation.INVOKE); - if (!model.isAvailableViaApi()) { - throw new ThingsboardException("AI model with id [" + modelUuid + "] is not available via API", ThingsboardErrorCode.PERMISSION_DENIED); - } if (!(model.getConfiguration() instanceof AiChatModelConfig chatModelConfig)) { throw new ThingsboardException("AI model with id [" + modelUuid + "] is not a chat model", ThingsboardErrorCode.BAD_REQUEST_PARAMS); } diff --git a/application/src/main/java/org/thingsboard/server/service/security/permission/CustomerUserPermissions.java b/application/src/main/java/org/thingsboard/server/service/security/permission/CustomerUserPermissions.java index 14223b4321..e2da30f57f 100644 --- a/application/src/main/java/org/thingsboard/server/service/security/permission/CustomerUserPermissions.java +++ b/application/src/main/java/org/thingsboard/server/service/security/permission/CustomerUserPermissions.java @@ -11,6 +11,7 @@ import org.thingsboard.server.common.data.HasOwnerId; import org.thingsboard.server.common.data.ResourceType; import org.thingsboard.server.common.data.TbResourceInfo; import org.thingsboard.server.common.data.TenantEntity; +import org.thingsboard.server.common.data.ai.AiModelInfo; import org.thingsboard.server.common.data.alarm.Alarm; import org.thingsboard.server.common.data.exception.ThingsboardErrorCode; import org.thingsboard.server.common.data.exception.ThingsboardException; @@ -489,7 +490,7 @@ public class CustomerUserPermissions extends AbstractPermissions { }; // Only INVOKE is grantable: reading the model would expose the provider credentials stored in its configuration. - // Roles granting ALL include INVOKE, so the model's 'availableViaApi' flag decides which models such users can call. + // Roles granting ALL include INVOKE, so the model's 'customerAccessEnabled' flag decides which models such users can call. private static final PermissionChecker aiModelPermissionChecker = new PermissionChecker() { @Override @@ -499,7 +500,13 @@ public class CustomerUserPermissions extends AbstractPermissions { @Override public boolean hasPermission(SecurityUser user, Operation operation, EntityId entityId, TenantEntity entity) { - if (operation != Operation.INVOKE || !user.getTenantId().equals(entity.getTenantId())) { + if (operation != Operation.INVOKE) { + return false; + } + if (!user.getTenantId().equals(entity.getTenantId())) { + return false; + } + if (!(entity instanceof AiModelInfo model) || !model.isCustomerAccessEnabled()) { return false; } return user.getUserPermissions().hasGenericPermission(Resource.AI_MODEL, operation); diff --git a/application/src/test/java/org/thingsboard/server/controller/AiModelControllerTest.java b/application/src/test/java/org/thingsboard/server/controller/AiModelControllerTest.java index ad7e102683..fde826c47a 100644 --- a/application/src/test/java/org/thingsboard/server/controller/AiModelControllerTest.java +++ b/application/src/test/java/org/thingsboard/server/controller/AiModelControllerTest.java @@ -92,24 +92,24 @@ public class AiModelControllerTest extends AbstractControllerTest { assertThat(savedModel.getTenantId()).isEqualTo(tenantId); assertThat(savedModel.getName()).isEqualTo("Test model"); assertThat(savedModel.getConfiguration()).isEqualTo(model.getConfiguration()); - assertThat(savedModel.isAvailableViaApi()).isFalse(); + assertThat(savedModel.isCustomerAccessEnabled()).isFalse(); assertThat(savedModel.getExternalId()).isNull(); } @Test - public void saveAiModel_whenAvailableViaApiIsSet_shouldPersistIt() throws Exception { + public void saveAiModel_whenCustomerAccessEnabledIsSet_shouldPersistIt() throws Exception { // GIVEN loginTenantAdmin(); AiModel model = constructValidOpenAiModel("Test model"); - model.setAvailableViaApi(true); + model.setCustomerAccessEnabled(true); // WHEN var savedModel = doPost("/api/ai/model", model, AiModel.class); // THEN - assertThat(savedModel.isAvailableViaApi()).isTrue(); - assertThat(doGet("/api/ai/model/" + savedModel.getId(), AiModel.class).isAvailableViaApi()).isTrue(); + assertThat(savedModel.isCustomerAccessEnabled()).isTrue(); + assertThat(doGet("/api/ai/model/" + savedModel.getId(), AiModel.class).isCustomerAccessEnabled()).isTrue(); } @Test @@ -306,25 +306,44 @@ public class AiModelControllerTest extends AbstractControllerTest { } @Test - public void sendChatRequestToAiModel_whenModelIsNotAvailableViaApi_shouldReturnForbidden() throws Exception { + public void sendChatRequestToAiModel_whenTenantAdminAndCustomerAccessDisabled_shouldBeAllowed() throws Exception { // GIVEN loginTenantAdmin(); + var model = saveModelWithBlockedBaseUrl(false); + SsrfProtectionValidator.setEnabled(true); - var model = doPost("/api/ai/model", constructValidOpenAiModel("Test model"), AiModel.class); + try { + // WHEN + TbChatResponse response = doPostAsync("/api/ai/model/" + model.getId() + "/chat", constructChatRequest(), TbChatResponse.class, status().isOk()); + + // THEN + assertThat(response).isInstanceOf(TbChatResponse.Failure.class); + assertThat(((TbChatResponse.Failure) response).errorDetails()).contains("URI is invalid"); + } finally { + SsrfProtectionValidator.setEnabled(false); + } + } + + @Test + public void sendChatRequestToAiModel_whenCustomerAdminAndCustomerAccessDisabled_shouldReturnForbidden() throws Exception { + // GIVEN + loginTenantAdmin(); + var model = saveModelWithBlockedBaseUrl(false); + loginCustomerAdminUser(); // WHEN ResultActions result = doPost("/api/ai/model/" + model.getId() + "/chat", constructChatRequest()); // THEN result.andExpect(status().isForbidden()) - .andExpect(statusReason(is("AI model with id [" + model.getId() + "] is not available via API"))); + .andExpect(statusReason(equalTo("You don't have permission to perform 'INVOKE' operation with AI_MODEL 'Test model'!"))); } @Test public void sendChatRequestToAiModel_whenTenantAdmin_shouldUseStoredConfigurationAndReturnProviderError() throws Exception { // GIVEN loginTenantAdmin(); - var model = saveModelAvailableViaApiWithBlockedBaseUrl(); + var model = saveModelWithBlockedBaseUrl(); SsrfProtectionValidator.setEnabled(true); try { @@ -343,7 +362,7 @@ public class AiModelControllerTest extends AbstractControllerTest { public void sendChatRequestToAiModel_whenCustomerAdmin_shouldBeAllowedAndHideProviderError() throws Exception { // GIVEN loginTenantAdmin(); - var model = saveModelAvailableViaApiWithBlockedBaseUrl(); + var model = saveModelWithBlockedBaseUrl(); loginCustomerAdminUser(); SsrfProtectionValidator.setEnabled(true); @@ -363,7 +382,7 @@ public class AiModelControllerTest extends AbstractControllerTest { public void sendChatRequestToAiModel_whenCustomerUserWithoutInvokePermission_shouldReturnForbidden() throws Exception { // GIVEN loginTenantAdmin(); - var model = saveModelAvailableViaApiWithBlockedBaseUrl(); + var model = saveModelWithBlockedBaseUrl(); loginCustomerUser(); // WHEN @@ -380,7 +399,9 @@ public class AiModelControllerTest extends AbstractControllerTest { public void aiModelPermission_whenCustomerAdminGrantedAll_shouldAllowInvokeOnly() throws Exception { // GIVEN loginTenantAdmin(); - var model = doPost("/api/ai/model", constructValidOpenAiModel("Test model"), AiModel.class); + var modelConfig = constructValidOpenAiModel("Test model"); + modelConfig.setCustomerAccessEnabled(true); + var model = doPost("/api/ai/model", modelConfig, AiModel.class); loginCustomerAdminUser(); // WHEN / THEN @@ -390,6 +411,20 @@ public class AiModelControllerTest extends AbstractControllerTest { assertThat(hasAiModelPermission(model, "DELETE")).isFalse(); } + @Test + public void aiModelPermission_whenCustomerAccessDisabled_shouldDenyInvokeForCustomerAdminOnly() throws Exception { + // GIVEN + loginTenantAdmin(); + var model = doPost("/api/ai/model", constructValidOpenAiModel("Test model"), AiModel.class); + + // WHEN / THEN + assertThat(model.isCustomerAccessEnabled()).isFalse(); + assertThat(hasAiModelPermission(model, "INVOKE")).isTrue(); + + loginCustomerAdminUser(); + assertThat(hasAiModelPermission(model, "INVOKE")).isFalse(); + } + @Test public void aiModelPermission_whenCustomerUserGrantedReadOnAllResources_shouldDenyReadAndInvoke() throws Exception { // GIVEN @@ -601,18 +636,18 @@ public class AiModelControllerTest extends AbstractControllerTest { } @Test - public void getAiModels_testFilterByAvailableViaApi() throws Exception { + public void getAiModels_testFilterByCustomerAccessEnabled() throws Exception { // GIVEN loginTenantAdmin(); var available = constructValidOpenAiModel("Available model"); - available.setAvailableViaApi(true); + available.setCustomerAccessEnabled(true); available = doPost("/api/ai/model", available, AiModel.class); var unavailable = doPost("/api/ai/model", constructValidOpenAiModel("Unavailable model"), AiModel.class); // WHEN - PageData onlyAvailable = doGetTypedWithPageLink("/api/ai/model?availableViaApi=true&", new TypeReference<>() {}, new PageLink(10)); - PageData onlyUnavailable = doGetTypedWithPageLink("/api/ai/model?availableViaApi=false&", new TypeReference<>() {}, new PageLink(10)); + PageData onlyAvailable = doGetTypedWithPageLink("/api/ai/model?customerAccessEnabled=true&", new TypeReference<>() {}, new PageLink(10)); + PageData onlyUnavailable = doGetTypedWithPageLink("/api/ai/model?customerAccessEnabled=false&", new TypeReference<>() {}, new PageLink(10)); PageData all = doGetTypedWithPageLink("/api/ai/model?", new TypeReference<>() {}, new PageLink(10)); // THEN @@ -648,17 +683,17 @@ public class AiModelControllerTest extends AbstractControllerTest { } @Test - public void getAiModelInfos_whenTenantAdmin_shouldReturnInfosFilteredByAvailableViaApi() throws Exception { + public void getAiModelInfos_whenTenantAdmin_shouldReturnInfosFilteredByCustomerAccessEnabled() throws Exception { // GIVEN loginTenantAdmin(); var available = constructValidOpenAiModel("Available model"); - available.setAvailableViaApi(true); + available.setCustomerAccessEnabled(true); available = doPost("/api/ai/model", available, AiModel.class); var unavailable = doPost("/api/ai/model", constructValidOpenAiModel("Unavailable model"), AiModel.class); // WHEN - PageData onlyAvailable = doGetTypedWithPageLink("/api/ai/model/infos?availableViaApi=true&", new TypeReference<>() {}, new PageLink(10)); + PageData onlyAvailable = doGetTypedWithPageLink("/api/ai/model/infos?customerAccessEnabled=true&", new TypeReference<>() {}, new PageLink(10)); PageData all = doGetTypedWithPageLink("/api/ai/model/infos?", new TypeReference<>() {}, new PageLink(10)); // THEN @@ -708,18 +743,21 @@ public class AiModelControllerTest extends AbstractControllerTest { } @Test - public void getAiModelInfos_whenCustomerAdmin_shouldReturnInfosWithoutConfiguration() throws Exception { + public void getAiModelInfos_whenCustomerAdmin_shouldReturnOnlyCustomerAccessibleInfosWithoutConfiguration() throws Exception { // GIVEN loginTenantAdmin(); - var model = saveModelAvailableViaApiWithBlockedBaseUrl(); + var accessible = saveModelWithBlockedBaseUrl("Accessible model", true); + var notAccessible = saveModelWithBlockedBaseUrl("Not accessible model", false); loginCustomerAdminUser(); // WHEN - String response = doGet("/api/ai/model/infos?pageSize=10&page=0").andExpect(status().isOk()) + String response = doGet("/api/ai/model/infos?pageSize=10&page=0&customerAccessEnabled=false").andExpect(status().isOk()) .andReturn().getResponse().getContentAsString(); // THEN - assertThat(response).contains(model.getId().getId().toString()).doesNotContain("test-api-key"); + assertThat(response).contains(accessible.getId().getId().toString()) + .doesNotContain(notAccessible.getId().getId().toString()) + .doesNotContain("test-api-key"); } @Test @@ -983,7 +1021,15 @@ public class AiModelControllerTest extends AbstractControllerTest { assertThat(deleted).isFalse(); } - private AiModel saveModelAvailableViaApiWithBlockedBaseUrl() throws Exception { + private AiModel saveModelWithBlockedBaseUrl() throws Exception { + return saveModelWithBlockedBaseUrl(true); + } + + private AiModel saveModelWithBlockedBaseUrl(boolean customerAccessEnabled) throws Exception { + return saveModelWithBlockedBaseUrl("Test model", customerAccessEnabled); + } + + private AiModel saveModelWithBlockedBaseUrl(String name, boolean customerAccessEnabled) throws Exception { var modelConfig = OpenAiChatModelConfig.builder() .providerConfig(OpenAiProviderConfig.builder() .baseUrl("http://10.0.0.1:8080/") @@ -994,9 +1040,9 @@ public class AiModelControllerTest extends AbstractControllerTest { var model = AiModel.builder() .tenantId(tenantId) - .name("Test model") + .name(name) .configuration(modelConfig) - .availableViaApi(true) + .customerAccessEnabled(customerAccessEnabled) .build(); return doPost("/api/ai/model", model, AiModel.class); diff --git a/common/dao-api/src/main/java/org/thingsboard/server/dao/ai/AiModelService.java b/common/dao-api/src/main/java/org/thingsboard/server/dao/ai/AiModelService.java index 8b0796cfff..f61b54f291 100644 --- a/common/dao-api/src/main/java/org/thingsboard/server/dao/ai/AiModelService.java +++ b/common/dao-api/src/main/java/org/thingsboard/server/dao/ai/AiModelService.java @@ -24,9 +24,9 @@ public interface AiModelService extends EntityDaoService { PageData findAiModelsByTenantId(TenantId tenantId, PageLink pageLink); - PageData findAiModelsByTenantId(TenantId tenantId, Boolean availableViaApi, PageLink pageLink); + PageData findAiModelsByTenantId(TenantId tenantId, Boolean customerAccessEnabled, PageLink pageLink); - PageData findAiModelInfosByTenantId(TenantId tenantId, Boolean availableViaApi, PageLink pageLink); + PageData findAiModelInfosByTenantId(TenantId tenantId, Boolean customerAccessEnabled, PageLink pageLink); Optional findAiModelByTenantIdAndId(TenantId tenantId, AiModelId modelId); diff --git a/common/data/src/main/java/org/thingsboard/server/common/data/ai/AiModel.java b/common/data/src/main/java/org/thingsboard/server/common/data/ai/AiModel.java index dbd3d941e0..8f8231c6ef 100644 --- a/common/data/src/main/java/org/thingsboard/server/common/data/ai/AiModel.java +++ b/common/data/src/main/java/org/thingsboard/server/common/data/ai/AiModel.java @@ -44,11 +44,11 @@ public final class AiModel extends AiModelInfo implements ExportableEntity implements TenantEntity, Ha @Schema( requiredMode = Schema.RequiredMode.NOT_REQUIRED, accessMode = Schema.AccessMode.READ_WRITE, - description = "Whether the model can be used via the AI model chat API by users with the 'INVOKE' permission. " + - "Roles that grant all operations, such as the default 'Customer Administrator' role, include 'INVOKE'", + description = "Whether customer users with the 'INVOKE' permission for AI models can send chat requests to the model, " + + "such as users with the default 'Customer Administrator' role, which grants all operations. " + + "Tenant administrators with the 'INVOKE' permission can use the model regardless of this flag", defaultValue = "false" ) - private boolean availableViaApi; + private boolean customerAccessEnabled; @Schema( accessMode = Schema.AccessMode.READ_ONLY, @@ -89,7 +90,7 @@ public class AiModelInfo extends BaseData implements TenantEntity, Ha tenantId = modelInfo.getTenantId(); version = modelInfo.getVersion(); name = modelInfo.getName(); - availableViaApi = modelInfo.isAvailableViaApi(); + customerAccessEnabled = modelInfo.isCustomerAccessEnabled(); provider = modelInfo.getProvider(); modelId = modelInfo.getModelId(); } diff --git a/dao/src/main/java/org/thingsboard/server/dao/ai/AiModelDao.java b/dao/src/main/java/org/thingsboard/server/dao/ai/AiModelDao.java index 84be4e779e..0614aabf82 100644 --- a/dao/src/main/java/org/thingsboard/server/dao/ai/AiModelDao.java +++ b/dao/src/main/java/org/thingsboard/server/dao/ai/AiModelDao.java @@ -18,7 +18,7 @@ public interface AiModelDao extends TenantEntityDao, ExportableEntityDa Optional findByTenantIdAndId(TenantId tenantId, AiModelId modelId); - PageData findByTenantId(TenantId tenantId, Boolean availableViaApi, PageLink pageLink); + PageData findByTenantId(TenantId tenantId, Boolean customerAccessEnabled, PageLink pageLink); boolean deleteById(TenantId tenantId, AiModelId modelId); diff --git a/dao/src/main/java/org/thingsboard/server/dao/ai/AiModelInfoDao.java b/dao/src/main/java/org/thingsboard/server/dao/ai/AiModelInfoDao.java index 057a4fb1e6..06617a7b49 100644 --- a/dao/src/main/java/org/thingsboard/server/dao/ai/AiModelInfoDao.java +++ b/dao/src/main/java/org/thingsboard/server/dao/ai/AiModelInfoDao.java @@ -10,6 +10,6 @@ import org.thingsboard.server.dao.Dao; public interface AiModelInfoDao extends Dao { - PageData findByTenantId(TenantId tenantId, Boolean availableViaApi, PageLink pageLink); + PageData findByTenantId(TenantId tenantId, Boolean customerAccessEnabled, PageLink pageLink); } diff --git a/dao/src/main/java/org/thingsboard/server/dao/ai/AiModelServiceImpl.java b/dao/src/main/java/org/thingsboard/server/dao/ai/AiModelServiceImpl.java index cff4f2855d..400cb0b1df 100644 --- a/dao/src/main/java/org/thingsboard/server/dao/ai/AiModelServiceImpl.java +++ b/dao/src/main/java/org/thingsboard/server/dao/ai/AiModelServiceImpl.java @@ -98,15 +98,15 @@ class AiModelServiceImpl extends CachedVersionedEntityService findAiModelsByTenantId(TenantId tenantId, Boolean availableViaApi, PageLink pageLink) { + public PageData findAiModelsByTenantId(TenantId tenantId, Boolean customerAccessEnabled, PageLink pageLink) { validatePageLink(pageLink, AiModelEntity.ALLOWED_SORT_PROPERTIES); - return aiModelDao.findByTenantId(tenantId, availableViaApi, pageLink); + return aiModelDao.findByTenantId(tenantId, customerAccessEnabled, pageLink); } @Override - public PageData findAiModelInfosByTenantId(TenantId tenantId, Boolean availableViaApi, PageLink pageLink) { + public PageData findAiModelInfosByTenantId(TenantId tenantId, Boolean customerAccessEnabled, PageLink pageLink) { validatePageLink(pageLink, AiModelEntity.ALLOWED_SORT_PROPERTIES); - return aiModelInfoDao.findByTenantId(tenantId, availableViaApi, pageLink); + return aiModelInfoDao.findByTenantId(tenantId, customerAccessEnabled, pageLink); } @Override diff --git a/dao/src/main/java/org/thingsboard/server/dao/model/ModelConstants.java b/dao/src/main/java/org/thingsboard/server/dao/model/ModelConstants.java index b32788a06a..d69f97d11c 100644 --- a/dao/src/main/java/org/thingsboard/server/dao/model/ModelConstants.java +++ b/dao/src/main/java/org/thingsboard/server/dao/model/ModelConstants.java @@ -1085,7 +1085,7 @@ public class ModelConstants { public static final String AI_MODEL_TENANT_ID_COLUMN_NAME = TENANT_ID_COLUMN; public static final String AI_MODEL_NAME_COLUMN_NAME = NAME_PROPERTY; public static final String AI_MODEL_CONFIGURATION_COLUMN_NAME = "configuration"; - public static final String AI_MODEL_AVAILABLE_VIA_API_COLUMN_NAME = "available_via_api"; + public static final String AI_MODEL_CUSTOMER_ACCESS_ENABLED_COLUMN_NAME = "customer_access_enabled"; /** * Api Key constants. diff --git a/dao/src/main/java/org/thingsboard/server/dao/model/sql/AiModelEntity.java b/dao/src/main/java/org/thingsboard/server/dao/model/sql/AiModelEntity.java index a809bf1808..8393fdc485 100644 --- a/dao/src/main/java/org/thingsboard/server/dao/model/sql/AiModelEntity.java +++ b/dao/src/main/java/org/thingsboard/server/dao/model/sql/AiModelEntity.java @@ -54,8 +54,8 @@ public class AiModelEntity extends BaseVersionedEntity { @Column(name = ModelConstants.AI_MODEL_CONFIGURATION_COLUMN_NAME, nullable = false, columnDefinition = "JSONB") private AiModelConfig configuration; - @Column(name = ModelConstants.AI_MODEL_AVAILABLE_VIA_API_COLUMN_NAME, nullable = false) - private boolean availableViaApi; + @Column(name = ModelConstants.AI_MODEL_CUSTOMER_ACCESS_ENABLED_COLUMN_NAME, nullable = false) + private boolean customerAccessEnabled; @Column(name = ModelConstants.EXTERNAL_ID_PROPERTY, columnDefinition = "UUID") private UUID externalId; @@ -67,7 +67,7 @@ public class AiModelEntity extends BaseVersionedEntity { tenantId = getTenantUuid(aiModel.getTenantId()); name = aiModel.getName(); configuration = aiModel.getConfiguration(); - availableViaApi = aiModel.isAvailableViaApi(); + customerAccessEnabled = aiModel.isCustomerAccessEnabled(); externalId = getUuid(aiModel.getExternalId()); } @@ -79,7 +79,7 @@ public class AiModelEntity extends BaseVersionedEntity { model.setTenantId(TenantId.fromUUID(tenantId)); model.setName(name); model.setConfiguration(configuration); - model.setAvailableViaApi(availableViaApi); + model.setCustomerAccessEnabled(customerAccessEnabled); model.setExternalId(getEntityId(externalId, AiModelId::new)); return model; } diff --git a/dao/src/main/java/org/thingsboard/server/dao/model/sql/AiModelInfoEntity.java b/dao/src/main/java/org/thingsboard/server/dao/model/sql/AiModelInfoEntity.java index d7ef8070e4..447e9ab38e 100644 --- a/dao/src/main/java/org/thingsboard/server/dao/model/sql/AiModelInfoEntity.java +++ b/dao/src/main/java/org/thingsboard/server/dao/model/sql/AiModelInfoEntity.java @@ -32,8 +32,8 @@ public class AiModelInfoEntity extends BaseVersionedEntity { @Column(name = ModelConstants.AI_MODEL_NAME_COLUMN_NAME) private String name; - @Column(name = ModelConstants.AI_MODEL_AVAILABLE_VIA_API_COLUMN_NAME) - private boolean availableViaApi; + @Column(name = ModelConstants.AI_MODEL_CUSTOMER_ACCESS_ENABLED_COLUMN_NAME) + private boolean customerAccessEnabled; @Formula("configuration ->> 'provider'") private String provider; @@ -50,7 +50,7 @@ public class AiModelInfoEntity extends BaseVersionedEntity { modelInfo.setVersion(version); modelInfo.setTenantId(TenantId.fromUUID(tenantId)); modelInfo.setName(name); - modelInfo.setAvailableViaApi(availableViaApi); + modelInfo.setCustomerAccessEnabled(customerAccessEnabled); modelInfo.setProvider(provider != null ? AiProvider.valueOf(provider) : null); modelInfo.setModelId(modelId); return modelInfo; diff --git a/dao/src/main/java/org/thingsboard/server/dao/sql/ai/AiModelInfoRepository.java b/dao/src/main/java/org/thingsboard/server/dao/sql/ai/AiModelInfoRepository.java index 49610c224c..df8906ea36 100644 --- a/dao/src/main/java/org/thingsboard/server/dao/sql/ai/AiModelInfoRepository.java +++ b/dao/src/main/java/org/thingsboard/server/dao/sql/ai/AiModelInfoRepository.java @@ -14,13 +14,13 @@ import java.util.UUID; interface AiModelInfoRepository extends JpaRepository { @Query("SELECT m FROM AiModelInfoEntity m WHERE m.tenantId = :tenantId " + - "AND (:availableViaApi IS NULL OR m.availableViaApi = :availableViaApi) " + + "AND (:customerAccessEnabled IS NULL OR m.customerAccessEnabled = :customerAccessEnabled) " + "AND (:textSearch IS NULL " + "OR ilike(m.name, CONCAT('%', :textSearch, '%')) = true " + "OR ilike(REPLACE(m.provider, '_', ' '), CONCAT('%', :textSearch, '%')) = true " + "OR ilike(m.modelId, CONCAT('%', :textSearch, '%')) = true)") Page findByTenantId(@Param("tenantId") UUID tenantId, - @Param("availableViaApi") Boolean availableViaApi, + @Param("customerAccessEnabled") Boolean customerAccessEnabled, @Param("textSearch") String textSearch, Pageable pageable); diff --git a/dao/src/main/java/org/thingsboard/server/dao/sql/ai/AiModelRepository.java b/dao/src/main/java/org/thingsboard/server/dao/sql/ai/AiModelRepository.java index 25e6589a1f..b033d13d42 100644 --- a/dao/src/main/java/org/thingsboard/server/dao/sql/ai/AiModelRepository.java +++ b/dao/src/main/java/org/thingsboard/server/dao/sql/ai/AiModelRepository.java @@ -30,7 +30,7 @@ interface AiModelRepository extends JpaRepository, Exportab SELECT * FROM ai_model model WHERE model.tenant_id = :tenantId - AND (CAST(:availableViaApi AS BOOLEAN) IS NULL OR model.available_via_api = CAST(:availableViaApi AS BOOLEAN)) + AND (CAST(:customerAccessEnabled AS BOOLEAN) IS NULL OR model.customer_access_enabled = CAST(:customerAccessEnabled AS BOOLEAN)) AND (:textSearch IS NULL OR model.name ILIKE '%' || :textSearch || '%' OR REPLACE(model.configuration ->> 'provider', '_', ' ') ILIKE '%' || :textSearch || '%' @@ -40,7 +40,7 @@ interface AiModelRepository extends JpaRepository, Exportab SELECT COUNT(*) FROM ai_model model WHERE model.tenant_id = :tenantId - AND (CAST(:availableViaApi AS BOOLEAN) IS NULL OR model.available_via_api = CAST(:availableViaApi AS BOOLEAN)) + AND (CAST(:customerAccessEnabled AS BOOLEAN) IS NULL OR model.customer_access_enabled = CAST(:customerAccessEnabled AS BOOLEAN)) AND (:textSearch IS NULL OR model.name ILIKE '%' || :textSearch || '%' OR REPLACE(model.configuration ->> 'provider', '_', ' ') ILIKE '%' || :textSearch || '%' @@ -49,7 +49,7 @@ interface AiModelRepository extends JpaRepository, Exportab nativeQuery = true ) Page findByTenantId(@Param("tenantId") UUID tenantId, - @Param("availableViaApi") Boolean availableViaApi, + @Param("customerAccessEnabled") Boolean customerAccessEnabled, @Param("textSearch") String textSearch, Pageable pageable); diff --git a/dao/src/main/java/org/thingsboard/server/dao/sql/ai/JpaAiModelDao.java b/dao/src/main/java/org/thingsboard/server/dao/sql/ai/JpaAiModelDao.java index 92d9829b68..1312376ef2 100644 --- a/dao/src/main/java/org/thingsboard/server/dao/sql/ai/JpaAiModelDao.java +++ b/dao/src/main/java/org/thingsboard/server/dao/sql/ai/JpaAiModelDao.java @@ -65,9 +65,9 @@ class JpaAiModelDao extends JpaAbstractDao implements Ai } @Override - public PageData findByTenantId(TenantId tenantId, Boolean availableViaApi, PageLink pageLink) { + public PageData findByTenantId(TenantId tenantId, Boolean customerAccessEnabled, PageLink pageLink) { return DaoUtil.toPageData(aiModelRepository.findByTenantId( - tenantId.getId(), availableViaApi, StringUtils.defaultIfEmpty(pageLink.getTextSearch(), null), toPageRequest(pageLink)) + tenantId.getId(), customerAccessEnabled, StringUtils.defaultIfEmpty(pageLink.getTextSearch(), null), toPageRequest(pageLink)) ); } diff --git a/dao/src/main/java/org/thingsboard/server/dao/sql/ai/JpaAiModelInfoDao.java b/dao/src/main/java/org/thingsboard/server/dao/sql/ai/JpaAiModelInfoDao.java index cfd3ec9d4a..3bf3be8d52 100644 --- a/dao/src/main/java/org/thingsboard/server/dao/sql/ai/JpaAiModelInfoDao.java +++ b/dao/src/main/java/org/thingsboard/server/dao/sql/ai/JpaAiModelInfoDao.java @@ -26,9 +26,9 @@ class JpaAiModelInfoDao extends JpaAbstractDao i private final AiModelInfoRepository aiModelInfoRepository; @Override - public PageData findByTenantId(TenantId tenantId, Boolean availableViaApi, PageLink pageLink) { + public PageData findByTenantId(TenantId tenantId, Boolean customerAccessEnabled, PageLink pageLink) { return DaoUtil.toPageData(aiModelInfoRepository.findByTenantId( - tenantId.getId(), availableViaApi, StringUtils.defaultIfEmpty(pageLink.getTextSearch(), null), DaoUtil.toPageable(pageLink)) + tenantId.getId(), customerAccessEnabled, StringUtils.defaultIfEmpty(pageLink.getTextSearch(), null), DaoUtil.toPageable(pageLink)) ); } diff --git a/dao/src/main/resources/sql/schema-entities.sql b/dao/src/main/resources/sql/schema-entities.sql index 9de7393439..cce079ace3 100644 --- a/dao/src/main/resources/sql/schema-entities.sql +++ b/dao/src/main/resources/sql/schema-entities.sql @@ -1369,14 +1369,14 @@ CREATE TABLE IF NOT EXISTS report ( ) PARTITION BY RANGE (created_time); CREATE TABLE IF NOT EXISTS ai_model ( - id UUID NOT NULL PRIMARY KEY, - external_id UUID, - created_time BIGINT NOT NULL, - tenant_id UUID NOT NULL, - version BIGINT NOT NULL DEFAULT 1, - name VARCHAR(255) NOT NULL, - configuration JSONB NOT NULL, - available_via_api BOOLEAN NOT NULL DEFAULT FALSE, + id UUID NOT NULL PRIMARY KEY, + external_id UUID, + created_time BIGINT NOT NULL, + tenant_id UUID NOT NULL, + version BIGINT NOT NULL DEFAULT 1, + name VARCHAR(255) NOT NULL, + configuration JSONB NOT NULL, + customer_access_enabled BOOLEAN NOT NULL DEFAULT FALSE, CONSTRAINT ai_model_name_unq_key UNIQUE (tenant_id, name), CONSTRAINT ai_model_external_id_unq_key UNIQUE (tenant_id, external_id) ); diff --git a/tools/src/main/python/license-headers/curations.json b/tools/src/main/python/license-headers/curations.json index 6b7f549c86..e4e74bdb44 100644 --- a/tools/src/main/python/license-headers/curations.json +++ b/tools/src/main/python/license-headers/curations.json @@ -275,7 +275,7 @@ "path": "common/data/src/main/java/org/thingsboard/server/common/data/ai/AiModelInfo.java", "header": "busl", "reason": "New PE file that does not exist in CE. It is the superclass of AiModel holding the fields shared with the configuration-free info view, so its field declarations and schema annotations repeat those of AiModel. Reviewed similarity candidate common/data/src/main/java/org/thingsboard/server/common/data/ai/AiModel.java at 269bc8dc73a.", - "contentHash": "sha256:d7b2034b532aa029c9ff49e794c57ba62fe674c0b502f73999b4204d5aa3b704" + "contentHash": "sha256:650bd82c42a513c19af48ba986481cd5a56f9f3491a9282deff76fccec64c4d0" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/edqs/fields/BlobEntityFields.java", diff --git a/ui-ngx/src/app/modules/home/components/ai-model/ai-model-dialog.component.html b/ui-ngx/src/app/modules/home/components/ai-model/ai-model-dialog.component.html index e40df84fc0..e78aede310 100644 --- a/ui-ngx/src/app/modules/home/components/ai-model/ai-model-dialog.component.html +++ b/ui-ngx/src/app/modules/home/components/ai-model/ai-model-dialog.component.html @@ -40,9 +40,9 @@ }
- - {{ 'ai-models.available-via-api' | translate }} + tb-hint-tooltip-icon="{{ 'ai-models.customer-access-hint' | translate }}"> + + {{ 'ai-models.customer-access' | translate }}
diff --git a/ui-ngx/src/app/modules/home/components/ai-model/ai-model-dialog.component.ts b/ui-ngx/src/app/modules/home/components/ai-model/ai-model-dialog.component.ts index fe89bbea4c..472c3502b1 100644 --- a/ui-ngx/src/app/modules/home/components/ai-model/ai-model-dialog.component.ts +++ b/ui-ngx/src/app/modules/home/components/ai-model/ai-model-dialog.component.ts @@ -90,7 +90,7 @@ export class AIModelDialogComponent extends DialogComponent, 'label'>, HasTenantId, ExportableEntity { modelType: ModelType; - availableViaApi?: boolean; + customerAccessEnabled?: boolean; configuration: { provider: AiProvider providerConfig: { diff --git a/ui-ngx/src/assets/locale/locale.constant-da_DK.json b/ui-ngx/src/assets/locale/locale.constant-da_DK.json index 302826f355..61e57435a2 100644 --- a/ui-ngx/src/assets/locale/locale.constant-da_DK.json +++ b/ui-ngx/src/assets/locale/locale.constant-da_DK.json @@ -1767,8 +1767,8 @@ "model": "Model", "name": "Navn", "ai-provider": "AI-udbyder", - "available-via-api": "Tilgængelig via API", - "available-via-api-hint": "Giver brugere med tilladelsen 'Kald' for AI-modeller mulighed for at sende chatforespørgsler til denne model via REST API, f.eks. fra Trendz Analytics. Roller, der giver alle handlinger, såsom standardrollen 'Customer Administrator', omfatter 'Kald', så alle brugere med en sådan rolle kan kalde denne model. Modellens konfiguration og legitimationsoplysninger vises aldrig. Kundebrugere kan kun tildeles handlingen 'Kald' for AI-modeller.", + "customer-access": "Kundeadgang", + "customer-access-hint": "Giver kundebrugere med tilladelsen 'Kald' for AI-modeller mulighed for at sende chatforespørgsler til denne model via REST API, f.eks. fra Trendz Analytics. Roller, der giver alle handlinger, såsom standardrollen 'Customer Administrator', omfatter 'Kald', så alle kundebrugere med en sådan rolle kan kalde denne model. Lejeradministratorer med tilladelsen 'Kald' kan kalde modellen uanset denne indstilling. Modellens konfiguration og legitimationsoplysninger eksponeres aldrig.", "no-found": "Ingen AI-modeller fundet", "list": "{ count, plural, =1 {Én model} other {Liste med # modeller} }", "selected-fields": "{ count, plural, =1 {1 model} other {# modeller} } valgt", diff --git a/ui-ngx/src/assets/locale/locale.constant-de_DE.json b/ui-ngx/src/assets/locale/locale.constant-de_DE.json index 828e53496b..fa001cf17f 100644 --- a/ui-ngx/src/assets/locale/locale.constant-de_DE.json +++ b/ui-ngx/src/assets/locale/locale.constant-de_DE.json @@ -1880,8 +1880,8 @@ "model": "Modell", "name": "Name", "ai-provider": "KI-Anbieter", - "available-via-api": "Über API verfügbar", - "available-via-api-hint": "Erlaubt Benutzern mit der Berechtigung 'Aufrufen' für KI-Modelle, über die REST-API Chat-Anfragen an dieses Modell zu senden, z. B. aus Trendz Analytics. Rollen, die alle Operationen gewähren, wie die Standardrolle 'Customer Administrator', enthalten 'Aufrufen', sodass jeder Benutzer mit einer solchen Rolle dieses Modell aufrufen kann. Die Modellkonfiguration und die Zugangsdaten werden nie offengelegt. Kundenbenutzern kann für KI-Modelle nur die Operation 'Aufrufen' gewährt werden.", + "customer-access": "Kundenzugriff", + "customer-access-hint": "Erlaubt Kundenbenutzern mit der Berechtigung 'Aufrufen' für KI-Modelle, über die REST-API Chat-Anfragen an dieses Modell zu senden, z. B. aus Trendz Analytics. Rollen, die alle Operationen gewähren, wie die Standardrolle 'Customer Administrator', enthalten 'Aufrufen', sodass jeder Kundenbenutzer mit einer solchen Rolle dieses Modell aufrufen kann. Mandantenadministratoren mit der Berechtigung 'Aufrufen' können das Modell unabhängig von dieser Einstellung aufrufen. Die Modellkonfiguration und die Zugangsdaten werden nie offengelegt.", "no-found": "Keine KI-Modelle gefunden", "list": "{ count, plural, one {Ein Modell} other {Liste von # Modellen} }", "selected-fields": "{ count, plural, one {# Modell} other {# Modelle} } ausgewählt", diff --git a/ui-ngx/src/assets/locale/locale.constant-el_GR.json b/ui-ngx/src/assets/locale/locale.constant-el_GR.json index eace9b01f5..a7b89e995d 100644 --- a/ui-ngx/src/assets/locale/locale.constant-el_GR.json +++ b/ui-ngx/src/assets/locale/locale.constant-el_GR.json @@ -1767,8 +1767,8 @@ "model": "Μοντέλο", "name": "Όνομα", "ai-provider": "Πάροχος AI", - "available-via-api": "Διαθέσιμο μέσω API", - "available-via-api-hint": "Επιτρέπει σε χρήστες με το δικαίωμα 'Κλήση' για μοντέλα AI να στέλνουν αιτήματα συνομιλίας σε αυτό το μοντέλο μέσω REST API, π.χ. από το Trendz Analytics. Οι ρόλοι που παρέχουν όλες τις λειτουργίες, όπως ο προεπιλεγμένος ρόλος 'Customer Administrator', περιλαμβάνουν την 'Κλήση', οπότε κάθε χρήστης με τέτοιο ρόλο μπορεί να καλέσει αυτό το μοντέλο. Η διαμόρφωση και τα διαπιστευτήρια του μοντέλου δεν εκτίθενται ποτέ. Στους χρήστες πελατών μπορεί να εκχωρηθεί μόνο η λειτουργία 'Κλήση' για μοντέλα AI.", + "customer-access": "Πρόσβαση πελατών", + "customer-access-hint": "Επιτρέπει σε χρήστες πελατών με το δικαίωμα 'Κλήση' για μοντέλα AI να στέλνουν αιτήματα συνομιλίας σε αυτό το μοντέλο μέσω REST API, π.χ. από το Trendz Analytics. Οι ρόλοι που παρέχουν όλες τις λειτουργίες, όπως ο προεπιλεγμένος ρόλος 'Customer Administrator', περιλαμβάνουν την 'Κλήση', οπότε κάθε χρήστης πελάτη με τέτοιο ρόλο μπορεί να καλεί αυτό το μοντέλο. Οι διαχειριστές μισθωτή με το δικαίωμα 'Κλήση' μπορούν να καλούν το μοντέλο ανεξάρτητα από αυτή τη ρύθμιση. Η διαμόρφωση του μοντέλου και τα διαπιστευτήρια δεν εκτίθενται ποτέ.", "no-found": "Δεν βρέθηκαν μοντέλα AI", "list": "{ count, plural, =1 {Ένα μοντέλο} other {Λίστα με # μοντέλα} }", "selected-fields": "{ count, plural, =1 {1 μοντέλο} other {# μοντέλα} } επιλεγμένα", diff --git a/ui-ngx/src/assets/locale/locale.constant-en_US.json b/ui-ngx/src/assets/locale/locale.constant-en_US.json index 1e00a8cefb..4dae7f4ca8 100644 --- a/ui-ngx/src/assets/locale/locale.constant-en_US.json +++ b/ui-ngx/src/assets/locale/locale.constant-en_US.json @@ -1882,8 +1882,8 @@ "model": "Model", "name": "Name", "ai-provider": "AI provider", - "available-via-api": "Available via API", - "available-via-api-hint": "Allows users with the 'Invoke' permission for AI models to send chat requests to this model via REST API, e.g. from Trendz Analytics. Roles that grant all operations, such as the default 'Customer Administrator' role, include 'Invoke', so every user with such a role can call this model. The model configuration and credentials are never exposed. Customer users can only be granted the 'Invoke' operation for AI models.", + "customer-access": "Customer access", + "customer-access-hint": "Allows customer users with the 'Invoke' permission for AI models to send chat requests to this model via REST API, e.g. from Trendz Analytics. Roles that grant all operations, such as the default 'Customer Administrator' role, include 'Invoke', so every customer user with such a role can call this model. Tenant administrators with the 'Invoke' permission can call the model regardless of this setting. The model configuration and credentials are never exposed.", "no-found": "No AI models found", "list": "{ count, plural, =1 {One model} other {List of # models} }", "selected-fields": "{ count, plural, =1 {1 model} other {# models} } selected", diff --git a/ui-ngx/src/assets/locale/locale.constant-es_ES.json b/ui-ngx/src/assets/locale/locale.constant-es_ES.json index f7299e6a82..65ec4db177 100644 --- a/ui-ngx/src/assets/locale/locale.constant-es_ES.json +++ b/ui-ngx/src/assets/locale/locale.constant-es_ES.json @@ -1880,8 +1880,8 @@ "model": "Modelo", "name": "Nombre", "ai-provider": "Proveedor de IA", - "available-via-api": "Disponible mediante API", - "available-via-api-hint": "Permite a los usuarios con el permiso 'Invocar' para modelos de IA enviar solicitudes de chat a este modelo mediante la API REST, p. ej., desde Trendz Analytics. Los roles que conceden todas las operaciones, como el rol predeterminado 'Customer Administrator', incluyen 'Invocar', por lo que cualquier usuario con dicho rol puede llamar a este modelo. La configuración y las credenciales del modelo nunca se exponen. A los usuarios de cliente solo se les puede conceder la operación 'Invocar' para modelos de IA.", + "customer-access": "Acceso de clientes", + "customer-access-hint": "Permite a los usuarios de clientes con el permiso 'Invocar' para modelos de IA enviar solicitudes de chat a este modelo mediante la API REST, p. ej., desde Trendz Analytics. Los roles que conceden todas las operaciones, como el rol predeterminado 'Customer Administrator', incluyen 'Invocar', por lo que cualquier usuario de cliente con dicho rol puede llamar a este modelo. Los administradores de inquilino con el permiso 'Invocar' pueden llamar al modelo independientemente de esta configuración. La configuración del modelo y las credenciales nunca se exponen.", "no-found": "No se encontraron modelos de IA", "list": "{ count, plural, =1 {Un modelo} other {Lista de # modelos} }", "selected-fields": "{ count, plural, =1 {1 modelo} other {# modelos} } seleccionados", diff --git a/ui-ngx/src/assets/locale/locale.constant-fr_FR.json b/ui-ngx/src/assets/locale/locale.constant-fr_FR.json index 136c4b31a3..b5f3f8af40 100644 --- a/ui-ngx/src/assets/locale/locale.constant-fr_FR.json +++ b/ui-ngx/src/assets/locale/locale.constant-fr_FR.json @@ -1880,8 +1880,8 @@ "model": "Modèle", "name": "Nom", "ai-provider": "Fournisseur d’IA", - "available-via-api": "Disponible via l’API", - "available-via-api-hint": "Permet aux utilisateurs disposant de l’autorisation « Invoquer » pour les modèles d’IA d’envoyer des requêtes de chat à ce modèle via l’API REST, par exemple depuis Trendz Analytics. Les rôles qui accordent toutes les opérations, comme le rôle par défaut « Customer Administrator », incluent « Invoquer » : tout utilisateur disposant d’un tel rôle peut donc appeler ce modèle. La configuration et les identifiants du modèle ne sont jamais exposés. Les utilisateurs client ne peuvent recevoir que l’opération « Invoquer » pour les modèles d’IA.", + "customer-access": "Accès client", + "customer-access-hint": "Permet aux utilisateurs clients disposant de l’autorisation « Invoquer » pour les modèles d’IA d’envoyer des requêtes de chat à ce modèle via l’API REST, par exemple depuis Trendz Analytics. Les rôles qui accordent toutes les opérations, comme le rôle par défaut « Customer Administrator », incluent « Invoquer » : tout utilisateur client disposant d’un tel rôle peut donc appeler ce modèle. Les administrateurs de locataire disposant de l’autorisation « Invoquer » peuvent appeler le modèle quel que soit ce paramètre. La configuration du modèle et les identifiants ne sont jamais exposés.", "no-found": "Aucun modèle d’IA trouvé", "list": "{ count, plural, =1 {Un modèle} one {Liste de # modèle} other {Liste de # modèles} }", "selected-fields": "{ count, plural, one {# modèle sélectionné} other {# modèles sélectionnés} }", diff --git a/ui-ngx/src/assets/locale/locale.constant-hi_IN.json b/ui-ngx/src/assets/locale/locale.constant-hi_IN.json index 9284cbafd5..f67167d274 100644 --- a/ui-ngx/src/assets/locale/locale.constant-hi_IN.json +++ b/ui-ngx/src/assets/locale/locale.constant-hi_IN.json @@ -1767,8 +1767,8 @@ "model": "मॉडल", "name": "नाम", "ai-provider": "AI प्रदाता", - "available-via-api": "API के माध्यम से उपलब्ध", - "available-via-api-hint": "AI मॉडल के लिए 'इनवोक करें' अनुमति वाले उपयोगकर्ताओं को REST API के माध्यम से इस मॉडल को चैट अनुरोध भेजने की अनुमति देता है, जैसे Trendz Analytics से। सभी ऑपरेशन प्रदान करने वाली भूमिकाएँ, जैसे डिफ़ॉल्ट 'Customer Administrator' भूमिका, में 'इनवोक करें' शामिल है, इसलिए ऐसी भूमिका वाला हर उपयोगकर्ता इस मॉडल को कॉल कर सकता है। मॉडल का कॉन्फ़िगरेशन और क्रेडेंशियल कभी प्रकट नहीं किए जाते। ग्राहक उपयोगकर्ताओं को AI मॉडल के लिए केवल 'इनवोक करें' ऑपरेशन दिया जा सकता है।", + "customer-access": "ग्राहक पहुंच", + "customer-access-hint": "AI मॉडल के लिए 'इनवोक करें' अनुमति वाले ग्राहक उपयोगकर्ताओं को REST API के माध्यम से इस मॉडल को चैट अनुरोध भेजने की अनुमति देता है, जैसे Trendz Analytics से। सभी ऑपरेशन देने वाली भूमिकाएं, जैसे डिफ़ॉल्ट 'Customer Administrator' भूमिका, 'इनवोक करें' शामिल करती हैं, इसलिए ऐसी भूमिका वाला हर ग्राहक उपयोगकर्ता इस मॉडल को कॉल कर सकता है। 'इनवोक करें' अनुमति वाले टेनेंट व्यवस्थापक इस सेटिंग की परवाह किए बिना मॉडल को कॉल कर सकते हैं। मॉडल का कॉन्फ़िगरेशन और क्रेडेंशियल कभी उजागर नहीं होते।", "no-found": "कोई AI मॉडल नहीं मिला", "list": "{ count, plural, =1 {एक मॉडल} other {# मॉडलों की सूची} }", "selected-fields": "{ count, plural, =1 {1 मॉडल} other {# मॉडल्स} } चयनित", diff --git a/ui-ngx/src/assets/locale/locale.constant-it_IT.json b/ui-ngx/src/assets/locale/locale.constant-it_IT.json index f35c4d7105..e29b2aab04 100644 --- a/ui-ngx/src/assets/locale/locale.constant-it_IT.json +++ b/ui-ngx/src/assets/locale/locale.constant-it_IT.json @@ -1880,8 +1880,8 @@ "model": "Modello", "name": "Nome", "ai-provider": "Fornitore IA", - "available-via-api": "Disponibile tramite API", - "available-via-api-hint": "Consente agli utenti con il permesso 'Invocare' per i modelli IA di inviare richieste di chat a questo modello tramite REST API, ad es. da Trendz Analytics. I ruoli che concedono tutte le operazioni, come il ruolo predefinito 'Customer Administrator', includono 'Invocare', quindi ogni utente con tale ruolo può chiamare questo modello. La configurazione e le credenziali del modello non vengono mai esposte. Agli utenti cliente può essere concessa solo l'operazione 'Invocare' per i modelli IA.", + "customer-access": "Accesso clienti", + "customer-access-hint": "Consente agli utenti dei clienti con il permesso 'Invocare' per i modelli IA di inviare richieste di chat a questo modello tramite REST API, ad es. da Trendz Analytics. I ruoli che concedono tutte le operazioni, come il ruolo predefinito 'Customer Administrator', includono 'Invocare', quindi ogni utente cliente con tale ruolo può chiamare questo modello. Gli amministratori del tenant con il permesso 'Invocare' possono chiamare il modello indipendentemente da questa impostazione. La configurazione del modello e le credenziali non vengono mai esposte.", "no-found": "Nessun modello IA trovato", "list": "{ count, plural, =1 {Un modello} other {Elenco di # modelli} }", "selected-fields": "{ count, plural, =1 {1 modello} other {# modelli} } selezionati", diff --git a/ui-ngx/src/assets/locale/locale.constant-ja_JP.json b/ui-ngx/src/assets/locale/locale.constant-ja_JP.json index eda154ae1d..e9abfc45ec 100644 --- a/ui-ngx/src/assets/locale/locale.constant-ja_JP.json +++ b/ui-ngx/src/assets/locale/locale.constant-ja_JP.json @@ -1767,8 +1767,8 @@ "model": "モデル", "name": "名前", "ai-provider": "AIプロバイダー", - "available-via-api": "API経由で利用可能", - "available-via-api-hint": "AIモデルの「呼び出し」権限を持つユーザーが、REST APIを介して(例:Trendz Analyticsから)このモデルにチャットリクエストを送信できるようにします。デフォルトの「Customer Administrator」ロールなど、すべての操作を許可するロールには「呼び出し」が含まれるため、そのようなロールを持つすべてのユーザーがこのモデルを呼び出せます。モデルの設定と認証情報が公開されることはありません。顧客ユーザーには、AIモデルに対して「呼び出し」操作のみを付与できます。", + "customer-access": "顧客アクセス", + "customer-access-hint": "AIモデルの「呼び出し」権限を持つ顧客ユーザーが、REST APIを介して(例:Trendz Analyticsから)このモデルにチャットリクエストを送信できるようにします。デフォルトの「Customer Administrator」ロールなど、すべての操作を許可するロールには「呼び出し」が含まれるため、そのようなロールを持つすべての顧客ユーザーがこのモデルを呼び出せます。「呼び出し」権限を持つテナント管理者は、この設定に関係なくモデルを呼び出せます。モデルの設定と認証情報が公開されることはありません。", "no-found": "AIモデルが見つかりません", "list": "{ count, plural, =1 {AIモデル} other {AIモデル一覧 # 件} }", "selected-fields": "{ count, plural, =1 {1 件のAIモデル} other {# 件のAIモデル} } を選択", diff --git a/ui-ngx/src/assets/locale/locale.constant-ko_KR.json b/ui-ngx/src/assets/locale/locale.constant-ko_KR.json index 09d7fa0677..afbf4eb62f 100644 --- a/ui-ngx/src/assets/locale/locale.constant-ko_KR.json +++ b/ui-ngx/src/assets/locale/locale.constant-ko_KR.json @@ -1607,8 +1607,8 @@ "model": "모델", "name": "이름", "ai-provider": "AI 제공자", - "available-via-api": "API를 통해 사용 가능", - "available-via-api-hint": "AI 모델에 대한 'Invoke' 권한이 있는 사용자가 REST API를 통해(예: Trendz Analytics에서) 이 모델에 채팅 요청을 보낼 수 있도록 합니다. 기본 'Customer Administrator' 역할처럼 모든 작업을 허용하는 역할에는 'Invoke'가 포함되므로 해당 역할을 가진 모든 사용자가 이 모델을 호출할 수 있습니다. 모델 구성과 자격 증명은 절대 노출되지 않습니다. 고객 사용자에게는 AI 모델에 대해 'Invoke' 작업만 부여할 수 있습니다.", + "customer-access": "고객 액세스", + "customer-access-hint": "AI 모델에 대한 'Invoke' 권한이 있는 고객 사용자가 REST API를 통해(예: Trendz Analytics에서) 이 모델에 채팅 요청을 보낼 수 있도록 합니다. 기본 'Customer Administrator' 역할처럼 모든 작업을 허용하는 역할에는 'Invoke'가 포함되므로 해당 역할을 가진 모든 고객 사용자가 이 모델을 호출할 수 있습니다. 'Invoke' 권한이 있는 테넌트 관리자는 이 설정과 관계없이 모델을 호출할 수 있습니다. 모델 구성과 자격 증명은 절대 노출되지 않습니다.", "no-found": "AI 모델이 없습니다", "list": "{ count, plural, =1 {1개 모델} other {#개 모델 목록} }", "selected-fields": "{ count, plural, =1 {1개 모델} other {#개 모델} } 선택됨", diff --git a/ui-ngx/src/assets/locale/locale.constant-lt_LT.json b/ui-ngx/src/assets/locale/locale.constant-lt_LT.json index fda78b2d40..7c318a15e7 100644 --- a/ui-ngx/src/assets/locale/locale.constant-lt_LT.json +++ b/ui-ngx/src/assets/locale/locale.constant-lt_LT.json @@ -1301,8 +1301,8 @@ "model": "Modelis", "name": "Pavadinimas", "ai-provider": "AI tiekėjas", - "available-via-api": "Pasiekiama per API", - "available-via-api-hint": "Leidžia naudotojams, turintiems AI modelių leidimą „Iškviesti“, siųsti pokalbių užklausas šiam modeliui per REST API, pvz., iš Trendz Analytics. Rolės, suteikiančios visas operacijas, pvz., numatytoji rolė „Customer Administrator“, apima „Iškviesti“, todėl kiekvienas naudotojas, turintis tokią rolę, gali iškviesti šį modelį. Modelio konfigūracija ir prisijungimo duomenys niekada neatskleidžiami. Kliento naudotojams AI modeliams gali būti suteikta tik operacija „Iškviesti“.", + "customer-access": "Klientų prieiga", + "customer-access-hint": "Leidžia klientų naudotojams, turintiems AI modelių leidimą „Iškviesti“, siųsti pokalbių užklausas šiam modeliui per REST API, pvz., iš Trendz Analytics. Rolės, suteikiančios visas operacijas, pvz., numatytoji rolė „Customer Administrator“, apima „Iškviesti“, todėl kiekvienas kliento naudotojas, turintis tokią rolę, gali iškviesti šį modelį. Nuomininko administratoriai, turintys leidimą „Iškviesti“, gali iškviesti modelį nepriklausomai nuo šio nustatymo. Modelio konfigūracija ir prisijungimo duomenys niekada neatskleidžiami.", "no-found": "AI modelių nerasta", "list": "{ count, plural, =1 {Vienas modelis} other {# modelių sąrašas} }", "selected-fields": "{ count, plural, =1 {1 modelis} other {# modeliai} } pasirinkta", diff --git a/ui-ngx/src/assets/locale/locale.constant-nl_NL.json b/ui-ngx/src/assets/locale/locale.constant-nl_NL.json index a036f23506..eab1e11434 100644 --- a/ui-ngx/src/assets/locale/locale.constant-nl_NL.json +++ b/ui-ngx/src/assets/locale/locale.constant-nl_NL.json @@ -1767,8 +1767,8 @@ "model": "Model", "name": "Naam", "ai-provider": "AI-provider", - "available-via-api": "Beschikbaar via API", - "available-via-api-hint": "Hiermee kunnen gebruikers met de machtiging 'Aanroepen' voor AI-modellen chatverzoeken naar dit model sturen via de REST API, bijvoorbeeld vanuit Trendz Analytics. Rollen die alle bewerkingen toestaan, zoals de standaardrol 'Customer Administrator', bevatten 'Aanroepen', zodat elke gebruiker met zo'n rol dit model kan aanroepen. De modelconfiguratie en inloggegevens worden nooit vrijgegeven. Klantgebruikers kunnen voor AI-modellen alleen de bewerking 'Aanroepen' krijgen.", + "customer-access": "Klanttoegang", + "customer-access-hint": "Hiermee kunnen klantgebruikers met de machtiging 'Aanroepen' voor AI-modellen chatverzoeken naar dit model sturen via de REST API, bijvoorbeeld vanuit Trendz Analytics. Rollen die alle bewerkingen toestaan, zoals de standaardrol 'Customer Administrator', bevatten 'Aanroepen', zodat elke klantgebruiker met zo'n rol dit model kan aanroepen. Tenantbeheerders met de machtiging 'Aanroepen' kunnen het model aanroepen ongeacht deze instelling. De modelconfiguratie en inloggegevens worden nooit vrijgegeven.", "no-found": "Geen AI-modellen gevonden", "list": "{ count, plural, =1 {Eén model} other {Lijst van # modellen} }", "selected-fields": "{ count, plural, =1 {1 model} other {# modellen} } geselecteerd", diff --git a/ui-ngx/src/assets/locale/locale.constant-no_NO.json b/ui-ngx/src/assets/locale/locale.constant-no_NO.json index 084fff172f..f17be73ad2 100644 --- a/ui-ngx/src/assets/locale/locale.constant-no_NO.json +++ b/ui-ngx/src/assets/locale/locale.constant-no_NO.json @@ -1767,8 +1767,8 @@ "model": "Modell", "name": "Navn", "ai-provider": "AI-leverandør", - "available-via-api": "Tilgjengelig via API", - "available-via-api-hint": "Lar brukere med tillatelsen 'Kall' for AI-modeller sende chatforespørsler til denne modellen via REST API, f.eks. fra Trendz Analytics. Roller som gir alle operasjoner, som standardrollen 'Customer Administrator', inkluderer 'Kall', så alle brukere med en slik rolle kan kalle denne modellen. Modellens konfigurasjon og legitimasjon blir aldri eksponert. Kundebrukere kan bare få operasjonen 'Kall' for AI-modeller.", + "customer-access": "Kundetilgang", + "customer-access-hint": "Lar kundebrukere med tillatelsen 'Kall' for AI-modeller sende chatforespørsler til denne modellen via REST API, f.eks. fra Trendz Analytics. Roller som gir alle operasjoner, som standardrollen 'Customer Administrator', inkluderer 'Kall', så alle kundebrukere med en slik rolle kan kalle denne modellen. Leietakeradministratorer med tillatelsen 'Kall' kan kalle modellen uavhengig av denne innstillingen. Modellens konfigurasjon og legitimasjon blir aldri eksponert.", "no-found": "Fant ingen AI-modeller", "list": "{ count, plural, =1 {Én modell} other {Liste over # modeller} }", "selected-fields": "{ count, plural, =1 {1 modell} other {# modeller} } valgt", diff --git a/ui-ngx/src/assets/locale/locale.constant-pt_BR.json b/ui-ngx/src/assets/locale/locale.constant-pt_BR.json index 833e095066..be5e0341f8 100644 --- a/ui-ngx/src/assets/locale/locale.constant-pt_BR.json +++ b/ui-ngx/src/assets/locale/locale.constant-pt_BR.json @@ -1880,8 +1880,8 @@ "model": "Modelo", "name": "Nome", "ai-provider": "Provedor de IA", - "available-via-api": "Disponível via API", - "available-via-api-hint": "Permite que usuários com a permissão 'Invocar' para modelos de IA enviem solicitações de chat a este modelo via API REST, por exemplo, a partir do Trendz Analytics. Funções que concedem todas as operações, como a função padrão 'Customer Administrator', incluem 'Invocar', portanto qualquer usuário com essa função pode chamar este modelo. A configuração e as credenciais do modelo nunca são expostas. Usuários de cliente só podem receber a operação 'Invocar' para modelos de IA.", + "customer-access": "Acesso de clientes", + "customer-access-hint": "Permite que usuários de clientes com a permissão 'Invocar' para modelos de IA enviem solicitações de chat a este modelo via API REST, por exemplo, a partir do Trendz Analytics. Funções que concedem todas as operações, como a função padrão 'Customer Administrator', incluem 'Invocar', portanto qualquer usuário de cliente com essa função pode chamar este modelo. Administradores de tenant com a permissão 'Invocar' podem chamar o modelo independentemente desta configuração. A configuração do modelo e as credenciais nunca são expostas.", "no-found": "Nenhum modelo de IA encontrado", "list": "{ count, plural, =1 {Um modelo} other {Lista de # modelos} }", "selected-fields": "{ count, plural, =1 {1 modelo} other {# modelos} } selecionado(s)", diff --git a/ui-ngx/src/assets/locale/locale.constant-tr_TR.json b/ui-ngx/src/assets/locale/locale.constant-tr_TR.json index e4987c325d..10c9f99c5e 100644 --- a/ui-ngx/src/assets/locale/locale.constant-tr_TR.json +++ b/ui-ngx/src/assets/locale/locale.constant-tr_TR.json @@ -1767,8 +1767,8 @@ "model": "Model", "name": "Ad", "ai-provider": "Yapay Zeka Sağlayıcısı", - "available-via-api": "API üzerinden kullanılabilir", - "available-via-api-hint": "Yapay zeka modelleri için 'Çağır' iznine sahip kullanıcıların REST API üzerinden, örneğin Trendz Analytics'ten, bu modele sohbet istekleri göndermesine olanak tanır. Varsayılan 'Customer Administrator' rolü gibi tüm işlemleri veren roller 'Çağır' iznini içerir; bu nedenle böyle bir role sahip her kullanıcı bu modeli çağırabilir. Modelin yapılandırması ve kimlik bilgileri asla açığa çıkarılmaz. Müşteri kullanıcılarına yapay zeka modelleri için yalnızca 'Çağır' işlemi verilebilir.", + "customer-access": "Müşteri erişimi", + "customer-access-hint": "Yapay zeka modelleri için 'Çağır' iznine sahip müşteri kullanıcılarının REST API üzerinden, örneğin Trendz Analytics'ten, bu modele sohbet istekleri göndermesine olanak tanır. Varsayılan 'Customer Administrator' rolü gibi tüm işlemleri veren roller 'Çağır' iznini içerir; bu nedenle böyle bir role sahip her müşteri kullanıcısı bu modeli çağırabilir. 'Çağır' iznine sahip kiracı yöneticileri bu ayardan bağımsız olarak modeli çağırabilir. Model yapılandırması ve kimlik bilgileri asla açığa çıkarılmaz.", "no-found": "Yapay zeka modeli bulunamadı", "list": "{ count, plural, =1 {Bir model} other {# model listesi} }", "selected-fields": "{ count, plural, =1 {1 model} other {# model seçildi} }", diff --git a/ui-ngx/src/assets/locale/locale.constant-uk_UA.json b/ui-ngx/src/assets/locale/locale.constant-uk_UA.json index 2ea20f2ad1..00db57b3f5 100644 --- a/ui-ngx/src/assets/locale/locale.constant-uk_UA.json +++ b/ui-ngx/src/assets/locale/locale.constant-uk_UA.json @@ -1880,8 +1880,8 @@ "model": "Модель", "name": "Назва", "ai-provider": "Постачальник ШІ", - "available-via-api": "Доступна через API", - "available-via-api-hint": "Дозволяє користувачам із дозволом «Виклик» для моделей ШІ надсилати чат-запити до цієї моделі через REST API, наприклад із Trendz Analytics. Ролі, що надають усі операції, як-от типова роль «Customer Administrator», містять «Виклик», тому кожен користувач із такою роллю може викликати цю модель. Конфігурація та облікові дані моделі ніколи не розкриваються. Користувачам клієнта для моделей ШІ можна надати лише операцію «Виклик».", + "customer-access": "Доступ для клієнтів", + "customer-access-hint": "Дозволяє користувачам клієнтів із дозволом «Виклик» для моделей ШІ надсилати чат-запити до цієї моделі через REST API, наприклад із Trendz Analytics. Ролі, що надають усі операції, як-от типова роль «Customer Administrator», містять «Виклик», тож кожен користувач клієнта з такою роллю може викликати цю модель. Адміністратори тенанта з дозволом «Виклик» можуть викликати модель незалежно від цього налаштування. Конфігурація моделі та облікові дані ніколи не розкриваються.", "no-found": "Моделей ШІ не знайдено", "list": "{ count, plural, =1 {Одна модель} few {Список із # моделей} many {Список із # моделей} other {Список із # моделі} }", "selected-fields": "Вибрано { count, plural, one {# модель} few {# моделі} other {# моделей} }", diff --git a/ui-ngx/src/assets/locale/locale.constant-zh_CN.json b/ui-ngx/src/assets/locale/locale.constant-zh_CN.json index ac98416ffb..61c65ffde9 100644 --- a/ui-ngx/src/assets/locale/locale.constant-zh_CN.json +++ b/ui-ngx/src/assets/locale/locale.constant-zh_CN.json @@ -1767,8 +1767,8 @@ "model": "模型", "name": "名称", "ai-provider": "AI 提供商", - "available-via-api": "可通过 API 使用", - "available-via-api-hint": "允许拥有 AI 模型“调用”权限的用户通过 REST API(例如从 Trendz Analytics)向此模型发送聊天请求。授予所有操作的角色(例如默认的“Customer Administrator”角色)包含“调用”,因此拥有此类角色的每个用户都可以调用此模型。模型的配置和凭据永远不会被公开。客户用户只能被授予 AI 模型的“调用”操作。", + "customer-access": "客户访问", + "customer-access-hint": "允许拥有 AI 模型“调用”权限的客户用户通过 REST API(例如从 Trendz Analytics)向此模型发送聊天请求。授予所有操作的角色(例如默认的“Customer Administrator”角色)包含“调用”,因此拥有此类角色的每个客户用户都可以调用此模型。拥有“调用”权限的租户管理员可以调用此模型,不受此设置影响。模型的配置和凭据永远不会被公开。", "no-found": "未找到 AI 模型", "list": "{ count, plural, =1 {1 个模型} other {# 个模型列表} }", "selected-fields": "已选择{ count, plural, =1 {1 个模型} other {# 个模型} }", diff --git a/ui-ngx/src/assets/locale/locale.constant-zh_TW.json b/ui-ngx/src/assets/locale/locale.constant-zh_TW.json index 45de046b80..0b3172ac52 100644 --- a/ui-ngx/src/assets/locale/locale.constant-zh_TW.json +++ b/ui-ngx/src/assets/locale/locale.constant-zh_TW.json @@ -8617,8 +8617,8 @@ "model": "模型", "name": "名稱", "ai-provider": "AI 提供者", - "available-via-api": "可透過 API 使用", - "available-via-api-hint": "允許擁有 AI 模型「呼叫」權限的使用者透過 REST API(例如從 Trendz Analytics)向此模型傳送聊天請求。授予所有操作的角色(例如預設的「Customer Administrator」角色)包含「呼叫」,因此擁有此類角色的每位使用者都能呼叫此模型。模型的設定與憑證永遠不會被公開。客戶使用者只能被授予 AI 模型的「呼叫」操作。", + "customer-access": "客戶存取", + "customer-access-hint": "允許擁有 AI 模型「呼叫」權限的客戶使用者透過 REST API(例如從 Trendz Analytics)向此模型傳送聊天請求。授予所有操作的角色(例如預設的「Customer Administrator」角色)包含「呼叫」,因此擁有此類角色的每位客戶使用者都能呼叫此模型。擁有「呼叫」權限的租戶管理員可呼叫此模型,不受此設定影響。模型的設定與憑證永遠不會被公開。", "no-found": "找不到 AI 模型", "list": "{ count, plural, =1 {1 個模型} other {模型清單(# 個)} }", "selected-fields": "已選擇 { count, plural, =1 {1 個模型} other {# 個模型} }",