@@ -10,6 +10,7 @@ import AdminForthAdapterGoogleOauth2 from '../../adapters/adminforth-oauth-adapt
1010import OpenSignupPlugin from '../../plugins/adminforth-open-signup/index.js' ;
1111import OAuthPlugin from '../../plugins/adminforth-oauth/index.js' ;
1212import KeyValueAdapterRam from '../../adapters/adminforth-key-value-adapter-ram/index.js' ;
13+ import AdminForthAgent from '../../plugins/adminforth-agent/index.js' ;
1314import CompletionAdapterOpenAIChatGPT from '../../adapters/adminforth-completion-adapter-open-ai-chat-gpt/index.js' ;
1415
1516async function allowedForSuperAdmin ( { adminUser } : { adminUser : AdminUser } ) : Promise < boolean > {
@@ -95,6 +96,14 @@ export default {
9596 resourceId : 'adminuser' ,
9697 }
9798 } ,
99+ {
100+ name : "cars" ,
101+ type : AdminForthDataTypes . STRING ,
102+ foreignResource : {
103+ resourceId : 'cars_sl' ,
104+ searchableFields : [ 'model' ]
105+ }
106+ } ,
98107 {
99108 name : "avatar" ,
100109 type : AdminForthDataTypes . STRING ,
@@ -191,31 +200,31 @@ export default {
191200 } ,
192201 } ,
193202 } ) ,
194- new AdminForthAgent ( {
195- completionAdapter : new CompletionAdapterOpenAIChatGPT ( {
196- openAiApiKey : process . env . OPENAI_API_KEY as string ,
197- model : 'gpt-5.4-mini' ,
198- } ) ,
199- maxTokens : 10000 ,
200- reasoning : 'none' ,
201- sessionResource : {
202- resourceId : 'sessions' ,
203- idField : 'id' ,
204- titleField : 'title' ,
205- turnsField : 'turns' ,
206- askerIdField : 'asker_id' ,
207- createdAtField : 'created_at' ,
208- } ,
209- turnResource : {
210- resourceId : 'turns' ,
211- idField : 'id' ,
212- sessionIdField : 'session_id' ,
213- createdAtField : 'created_at' ,
214- promptField : 'prompt' ,
215- responseField : 'response' ,
216- debugField : 'dubbug' ,
217- } ,
218- } ) ,
203+ // new AdminForthAgent({
204+ // completionAdapter: new CompletionAdapterOpenAIChatGPT({
205+ // openAiApiKey: process.env.OPENAI_API_KEY as string,
206+ // model: 'gpt-5.4-mini',
207+ // }),
208+ // maxTokens: 10000,
209+ // reasoning: 'none',
210+ // sessionResource: {
211+ // resourceId: 'sessions',
212+ // idField: 'id',
213+ // titleField: 'title',
214+ // turnsField: 'turns',
215+ // askerIdField: 'asker_id',
216+ // createdAtField: 'created_at',
217+ // },
218+ // turnResource: {
219+ // resourceId: 'turns',
220+ // idField: 'id',
221+ // sessionIdField: 'session_id',
222+ // createdAtField: 'created_at',
223+ // promptField: 'prompt',
224+ // responseField: 'response',
225+ // debugField: 'dubbug',
226+ // },
227+ // }),
219228 ] ,
220229 hooks : {
221230 create : {
0 commit comments