Elevate AI fields in admin config
This commit is contained in:
parent
e299c6d2af
commit
82acdca068
@ -30,6 +30,7 @@ import AdminLink from './AdminLink';
|
||||
import ScoreCardContainer from '@/components/ScoreCardContainer';
|
||||
import { capitalize, deparameterize } from '@/utility/string';
|
||||
import { DEFAULT_CATEGORY_KEYS, getHiddenCategories } from '@/category';
|
||||
import { AI_AUTO_GENERATED_FIELDS_ALL } from '@/photo/ai';
|
||||
|
||||
export default function AdminAppConfigurationClient({
|
||||
// Storage
|
||||
@ -365,6 +366,28 @@ export default function AdminAppConfigurationClient({
|
||||
and improve accessibility:
|
||||
{renderEnvVars(['OPENAI_SECRET_KEY'])}
|
||||
</ChecklistRow>
|
||||
<ChecklistRow
|
||||
title={'Auto-generated fields'}
|
||||
status={hasAiTextAutoGeneratedFields}
|
||||
optional
|
||||
>
|
||||
{hasAiTextAutoGeneratedFields &&
|
||||
AI_AUTO_GENERATED_FIELDS_ALL.map(field =>
|
||||
<Fragment key={field}>
|
||||
{renderSubStatus(
|
||||
aiTextAutoGeneratedFields.includes(field)
|
||||
? 'checked'
|
||||
: 'optional',
|
||||
capitalize(field),
|
||||
)}
|
||||
</Fragment>)}
|
||||
Comma-separated fields to auto-generate when
|
||||
uploading photos. Accepted values: title, caption,
|
||||
tags, description, all, or none
|
||||
{' '}
|
||||
(default: {'"title,tags,semantic"'}):
|
||||
{renderEnvVars(['AI_TEXT_AUTO_GENERATED_FIELDS'])}
|
||||
</ChecklistRow>
|
||||
<ChecklistRow
|
||||
title={hasRedisStorage && isAnalyzingConfiguration
|
||||
? 'Testing Redis connection'
|
||||
@ -380,19 +403,6 @@ export default function AdminAppConfigurationClient({
|
||||
on Vercel dashboard and connect to this project
|
||||
to enable rate limiting
|
||||
</ChecklistRow>
|
||||
<ChecklistRow
|
||||
// eslint-disable-next-line max-len
|
||||
title={`Auto-generated fields: ${aiTextAutoGeneratedFields.join(',')}`}
|
||||
status={hasAiTextAutoGeneratedFields}
|
||||
optional
|
||||
>
|
||||
Comma-separated fields to auto-generate when
|
||||
uploading photos. Accepted values: title, caption,
|
||||
tags, description, all, or none
|
||||
{' '}
|
||||
(default: {'"title,tags,semantic"'}):
|
||||
{renderEnvVars(['AI_TEXT_AUTO_GENERATED_FIELDS'])}
|
||||
</ChecklistRow>
|
||||
</ChecklistGroup>
|
||||
<ChecklistGroup
|
||||
title="Performance"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user