{{ dialogTitle | translate }}

@if (isLoading$ | async) { } @else {
}
ai-models.name @if (aiModelForms.get('name').hasError('required') || aiModelForms.get('name').hasError('pattern')) { {{ 'ai-models.name-required' | translate }} } @if (aiModelForms.get('name').hasError('maxlength')) { {{ 'ai-models.name-max-length' | translate }} }
ai-models.provider
ai-models.ai-provider @for (provider of providerMap; track provider) { {{providerTranslationMap.get(provider) | translate}} }
@if (providerFieldsList.includes('personalAccessToken')) { ai-models.personal-access-token @if (aiModelForms.get('configuration.providerConfig.personalAccessToken').hasError('required') || aiModelForms.get('configuration.providerConfig.personalAccessToken').hasError('pattern')) { {{ 'ai-models.personal-access-token-required' | translate }} } } @if (providerFieldsList.includes('projectId')) { ai-models.project-id @if (aiModelForms.get('configuration.providerConfig.projectId').hasError('required') || aiModelForms.get('configuration.providerConfig.projectId').hasError('pattern')) { {{ 'ai-models.project-id-required' | translate }} } } @if (providerFieldsList.includes('location')) { ai-models.location @if (aiModelForms.get('configuration.providerConfig.location').hasError('required') || aiModelForms.get('configuration.providerConfig.location').hasError('pattern')) { {{ 'ai-models.location-required' | translate }} } } @if (providerFieldsList.includes('serviceAccountKey')) { } @if (providerFieldsList.includes('endpoint')) { ai-models.endpoint @if (aiModelForms.get('configuration.providerConfig.endpoint').hasError('required') || aiModelForms.get('configuration.providerConfig.endpoint').hasError('pattern')) { {{ 'ai-models.endpoint-required' | translate }} } } @if (providerFieldsList.includes('serviceVersion')) { ai-models.service-version } @if (providerFieldsList.includes('baseUrl')) { ai-models.baseurl @if (aiModelForms.get('configuration.providerConfig.baseUrl').hasError('required') || aiModelForms.get('configuration.providerConfig.baseUrl').hasError('pattern')) { {{ 'ai-models.baseurl-required' | translate }} } } @if (providerFieldsList.includes('apiKey')) { ai-models.api-key @if (aiModelForms.get('configuration.providerConfig.apiKey').hasError('required') || aiModelForms.get('configuration.providerConfig.apiKey').hasError('pattern')) { {{ ( provider === aiProvider.OPENAI ? 'ai-models.api-key-open-ai-required' : 'ai-models.api-key-required') | translate }} } } @if (providerFieldsList.includes('region')) { ai-models.region @if (aiModelForms.get('configuration.providerConfig.region').hasError('required') || aiModelForms.get('configuration.providerConfig.region').hasError('pattern')) { {{ 'ai-models.region-required' | translate }} } } @if (providerFieldsList.includes('accessKeyId')) { ai-models.access-key-id @if (aiModelForms.get('configuration.providerConfig.accessKeyId').hasError('required') || aiModelForms.get('configuration.providerConfig.accessKeyId').hasError('pattern')) { {{ 'ai-models.access-key-id-required' | translate }} } } @if (providerFieldsList.includes('secretAccessKey')) { ai-models.secret-access-key @if (aiModelForms.get('configuration.providerConfig.secretAccessKey').hasError('required') || aiModelForms.get('configuration.providerConfig.secretAccessKey').hasError('pattern')) { {{ 'ai-models.secret-access-key-required' | translate }} } } @if (provider === aiProvider.OLLAMA) {
{{ 'ai-models.authentication' | translate }}
{{ 'ai-models.authentication-type.none' | translate }} {{ 'ai-models.authentication-type.basic' | translate }} {{ 'ai-models.authentication-type.token' | translate }}
@if (aiModelForms.get('configuration.providerConfig.auth.type').value === AuthenticationType.BASIC) { ai-models.username @if (aiModelForms.get('configuration.providerConfig.auth.username').hasError('required') || aiModelForms.get('configuration.providerConfig.auth.username').hasError('pattern')) { {{ 'ai-models.username-required' | translate }} } ai-models.password @if (aiModelForms.get('configuration.providerConfig.auth.password').hasError('required') || aiModelForms.get('configuration.providerConfig.auth.password').hasError('pattern')) { {{ 'ai-models.password-required' | translate }} } } @if (aiModelForms.get('configuration.providerConfig.auth.type').value === AuthenticationType.TOKEN) { ai-models.token @if (aiModelForms.get('configuration.providerConfig.auth.token').hasError('required') || aiModelForms.get('configuration.providerConfig.auth.token').hasError('pattern')) { {{ 'ai-models.token-required' | translate }} } }
}
ai-models.configuration
@if (modelFieldsList.includes('temperature')) {
{{ 'ai-models.temperature' | translate }}
@if (aiModelForms.get('configuration').get('temperature').hasError('min')) { warning }
} @if (modelFieldsList.includes('topP')) {
{{ 'ai-models.top-p' | translate }}
@if (aiModelForms.get('configuration').get('topP').hasError('min') || aiModelForms.get('configuration').get('topP').hasError('max')) { warning }
} @if (modelFieldsList.includes('topK')) {
{{ 'ai-models.top-k' | translate }}
@if (aiModelForms.get('configuration').get('topK').hasError('min')) { warning }
} @if (modelFieldsList.includes('presencePenalty')) {
{{ 'ai-models.presence-penalty' | translate }}
} @if (modelFieldsList.includes('frequencyPenalty')) {
{{ 'ai-models.frequency-penalty' | translate }}
} @if (modelFieldsList.includes('maxOutputTokens')) {
{{ 'ai-models.max-output-tokens' | translate }}
} @if (modelFieldsList.includes('contextLength')) {
{{ 'ai-models.context-length' | translate }}
}