@@ -534,15 +534,26 @@ const Configuration = ({
534534 [ state ] ,
535535 ) ;
536536
537+ const isAOProvider = useMemo (
538+ ( ) => currentOperator ?. tx ?. node ?. id === 'ARrzKTW93CuLRbcOo63YlA3l1VEuw8OvZ43RcRMzBnM' ,
539+ [ currentOperator ] ,
540+ ) ;
541+
537542 useEffect ( ( ) => {
538- if ( availableModels . length > 0 ) {
543+ if ( currentOperator ?. tx ?. node ?. id === 'ARrzKTW93CuLRbcOo63YlA3l1VEuw8OvZ43RcRMzBnM' ) {
544+ setConfigValue ( 'modelName' , 'Phi2' , {
545+ shouldDirty : true ,
546+ shouldTouch : true ,
547+ shouldValidate : true ,
548+ } ) ;
549+ } else if ( availableModels . length > 0 ) {
539550 setConfigValue ( 'modelName' , availableModels [ 0 ] . name , {
540551 shouldDirty : true ,
541552 shouldTouch : true ,
542553 shouldValidate : true ,
543554 } ) ;
544555 }
545- } , [ availableModels ] ) ;
556+ } , [ availableModels , currentOperator ] ) ;
546557
547558 const checkAssetNamesValidity = useCallback ( ( ) => {
548559 const assetNames = assetNamesField . value ;
@@ -590,11 +601,25 @@ const Configuration = ({
590601 ) ;
591602 if ( operator ) {
592603 setCurrentOperator ( operator ) ;
604+ // change model
605+ if ( operator . tx . node . id === 'ARrzKTW93CuLRbcOo63YlA3l1VEuw8OvZ43RcRMzBnM' ) {
606+ setConfigValue ( 'modelName' , 'Phi2' , {
607+ shouldDirty : true ,
608+ shouldTouch : true ,
609+ shouldValidate : true ,
610+ } ) ;
611+ } else {
612+ setConfigValue ( 'modelName' , availableModels [ 0 ] . name , {
613+ shouldDirty : true ,
614+ shouldTouch : true ,
615+ shouldValidate : true ,
616+ } ) ;
617+ }
593618 } else {
594619 // ifgnore
595620 }
596621 } ,
597- [ state , setCurrentOperator ] ,
622+ [ state , availableModels , setCurrentOperator ] ,
598623 ) ;
599624
600625 return (
@@ -660,10 +685,12 @@ const Configuration = ({
660685 defaultValue = { currentOperator ?. tx . node . id }
661686 renderValue = { ( value ) => (
662687 < Typography >
663- { displayShortTxOrAddr (
664- state . availableOperators . find ( ( op ) => op . tx . node . id === value ) ?. evmWallet ??
665- 'None' ,
666- ) }
688+ { value === 'ARrzKTW93CuLRbcOo63YlA3l1VEuw8OvZ43RcRMzBnM'
689+ ? 'AO provider'
690+ : displayShortTxOrAddr (
691+ state . availableOperators . find ( ( op ) => op . tx . node . id === value ) ?. evmWallet ??
692+ 'None' ,
693+ ) }
667694 </ Typography >
668695 ) }
669696 >
@@ -673,7 +700,11 @@ const Configuration = ({
673700 value = { operator . tx . node . id }
674701 sx = { { display : 'flex' , alignItems : 'center' , justifyContent : spaceBetween } }
675702 >
676- < Typography > { displayShortTxOrAddr ( operator . evmWallet ) } </ Typography >
703+ < Typography >
704+ { operator . tx . node . id === 'ARrzKTW93CuLRbcOo63YlA3l1VEuw8OvZ43RcRMzBnM'
705+ ? 'AO provider'
706+ : displayShortTxOrAddr ( operator . evmWallet ) }
707+ </ Typography >
677708 < Tooltip title = { 'Operator Fee' } >
678709 < Box display = { 'flex' } alignItems = { 'center' } gap = { '8px' } >
679710 < Typography > { operator . operatorFee } </ Typography >
@@ -706,7 +737,7 @@ const Configuration = ({
706737 } }
707738 />
708739 </ Box >
709- { ! isArbitrumSolution && (
740+ { ! isArbitrumSolution && ! isAOProvider && (
710741 < Box >
711742 < SelectControl
712743 name = { 'modelName' }
@@ -737,34 +768,36 @@ const Configuration = ({
737768 { ! isArbitrumSolution && isTextSolution && (
738769 < TextConfiguration messages = { messages } control = { control } />
739770 ) }
740- < FormControl component = 'fieldset' variant = 'standard' >
741- < FormControlLabel
742- control = {
743- < Checkbox
744- ref = { privateModeField . ref }
745- value = { privateModeField . value }
746- onChange = { privateModeField . onChange }
747- />
748- }
749- label = {
750- < Typography sx = { { display : 'flex' , alignItems : 'center' , gap : '8px' } } >
751- Private Mode
752- < Tooltip
753- title = {
754- < Typography variant = 'caption' sx = { { whiteSpace : 'pre-line' } } >
755- {
756- 'When this is on, prompts and responses will be encrypted with your keys and will only be acessbile by you.'
757- }
758- </ Typography >
759- }
760- placement = 'bottom'
761- >
762- < InfoOutlined fontSize = 'small' />
763- </ Tooltip >
764- </ Typography >
765- }
766- />
767- </ FormControl >
771+ { ! isAOProvider && (
772+ < FormControl component = 'fieldset' variant = 'standard' >
773+ < FormControlLabel
774+ control = {
775+ < Checkbox
776+ ref = { privateModeField . ref }
777+ value = { privateModeField . value }
778+ onChange = { privateModeField . onChange }
779+ />
780+ }
781+ label = {
782+ < Typography sx = { { display : 'flex' , alignItems : 'center' , gap : '8px' } } >
783+ Private Mode
784+ < Tooltip
785+ title = {
786+ < Typography variant = 'caption' sx = { { whiteSpace : 'pre-line' } } >
787+ {
788+ 'When this is on, prompts and responses will be encrypted with your keys and will only be acessbile by you.'
789+ }
790+ </ Typography >
791+ }
792+ placement = 'bottom'
793+ >
794+ < InfoOutlined fontSize = 'small' />
795+ </ Tooltip >
796+ </ Typography >
797+ }
798+ />
799+ </ FormControl >
800+ ) }
768801 { ! isArbitrumSolution && (
769802 < >
770803 < SelectControl
0 commit comments