@@ -26,6 +26,7 @@ import { PopupSpec } from "@/components/admin/connectors/Popup";
26
26
import * as Yup from "yup" ;
27
27
import isEqual from "lodash/isEqual" ;
28
28
import { IsPublicGroupSelector } from "@/components/IsPublicGroupSelector" ;
29
+ import { usePaidEnterpriseFeaturesEnabled } from "@/components/settings/usePaidEnterpriseFeaturesEnabled" ;
29
30
30
31
function customConfigProcessing ( customConfigsList : [ string , string ] [ ] ) {
31
32
const customConfig : { [ key : string ] : string } = { } ;
@@ -91,6 +92,8 @@ export function CustomLLMProviderUpdateForm({
91
92
deployment_name : Yup . string ( ) . nullable ( ) ,
92
93
} ) ;
93
94
95
+ const arePaidEnterpriseFeaturesEnabled = usePaidEnterpriseFeaturesEnabled ( ) ;
96
+
94
97
return (
95
98
< Formik
96
99
initialValues = { initialValues }
@@ -305,13 +308,13 @@ export function CustomLLMProviderUpdateForm({
305
308
< Field
306
309
name = { `custom_config_list[${ index } ][0]` }
307
310
className = { `
308
- border
309
- border-border
310
- bg-background
311
- rounded
312
- w-full
313
- py-2
314
- px-3
311
+ border
312
+ border-border
313
+ bg-background
314
+ rounded
315
+ w-full
316
+ py-2
317
+ px-3
315
318
mr-4
316
319
` }
317
320
autoComplete = "off"
@@ -328,13 +331,13 @@ export function CustomLLMProviderUpdateForm({
328
331
< Field
329
332
name = { `custom_config_list[${ index } ][1]` }
330
333
className = { `
331
- border
332
- border-border
333
- bg-background
334
- rounded
335
- w-full
336
- py-2
337
- px-3
334
+ border
335
+ border-border
336
+ bg-background
337
+ rounded
338
+ w-full
339
+ py-2
340
+ px-3
338
341
mr-4
339
342
` }
340
343
autoComplete = "off"
@@ -404,8 +407,8 @@ export function CustomLLMProviderUpdateForm({
404
407
< TextFormField
405
408
name = "default_model_name"
406
409
subtext = { `
407
- The model to use by default for this provider unless
408
- otherwise specified. Must be one of the models listed
410
+ The model to use by default for this provider unless
411
+ otherwise specified. Must be one of the models listed
409
412
above.` }
410
413
label = "Default Model"
411
414
placeholder = "E.g. gpt-4"
@@ -414,28 +417,31 @@ export function CustomLLMProviderUpdateForm({
414
417
{ ! existingLlmProvider ?. deployment_name && (
415
418
< TextFormField
416
419
name = "fast_default_model_name"
417
- subtext = { `The model to use for lighter flows like \`LLM Chunk Filter\`
418
- for this provider. If not set, will use
420
+ subtext = { `The model to use for lighter flows like \`LLM Chunk Filter\`
421
+ for this provider. If not set, will use
419
422
the Default Model configured above.` }
420
423
label = "[Optional] Fast Model"
421
424
placeholder = "E.g. gpt-4"
422
425
/>
423
426
) }
424
427
425
- < Separator />
426
-
427
- < AdvancedOptionsToggle
428
- showAdvancedOptions = { showAdvancedOptions }
429
- setShowAdvancedOptions = { setShowAdvancedOptions }
430
- />
431
-
432
- { showAdvancedOptions && (
433
- < IsPublicGroupSelector
434
- formikProps = { formikProps }
435
- objectName = "LLM Provider"
436
- publicToWhom = "all users"
437
- enforceGroupSelection = { true }
438
- />
428
+ { arePaidEnterpriseFeaturesEnabled && (
429
+ < >
430
+ < Separator />
431
+ < AdvancedOptionsToggle
432
+ showAdvancedOptions = { showAdvancedOptions }
433
+ setShowAdvancedOptions = { setShowAdvancedOptions }
434
+ />
435
+
436
+ { showAdvancedOptions && (
437
+ < IsPublicGroupSelector
438
+ formikProps = { formikProps }
439
+ objectName = "LLM Provider"
440
+ publicToWhom = "all users"
441
+ enforceGroupSelection = { true }
442
+ />
443
+ ) }
444
+ </ >
439
445
) }
440
446
441
447
< div >
0 commit comments