1
0
mirror of https://github.com/TandoorRecipes/recipes.git synced 2026-01-11 09:07:12 -05:00

ai provider system

This commit is contained in:
vabene1111
2025-09-08 22:15:57 +02:00
parent 75fcff8e70
commit a7c5240227
53 changed files with 588 additions and 33 deletions

View File

@@ -35,15 +35,17 @@
<database-model-col model="MealType"></database-model-col>
</v-row>
<v-row>
<v-col>
<h2>{{ $t('Ai') }}</h2>
</v-col>
</v-row>
<v-row dense>
<database-model-col model="AiProvider"></database-model-col>
<database-model-col model="AiLog"></database-model-col>
</v-row>
<template v-if="useUserPreferenceStore().activeSpace.aiEnabled">
<v-row>
<v-col>
<h2>{{ $t('Ai') }}</h2>
</v-col>
</v-row>
<v-row dense>
<database-model-col model="AiProvider"></database-model-col>
<database-model-col model="AiLog"></database-model-col>
</v-row>
</template>
<template v-for="p in TANDOOR_PLUGINS" :key="p.name">
<component :is="p.databasePageComponent" v-if="p.databasePageComponent"></component>
@@ -92,6 +94,7 @@
import DatabaseModelCol from "@/components/display/DatabaseModelCol.vue";
import DatabaseLinkCol from "@/components/display/DatabaseLinkCol.vue";
import {TANDOOR_PLUGINS} from "@/types/Plugins.ts";
import {useUserPreferenceStore} from "@/stores/UserPreferenceStore.ts";
</script>

View File

@@ -27,9 +27,16 @@
@delete="loadItems({page: page})"></model-edit-dialog>
</v-btn>
</template>
<!-- TODO build customizable model component system -->
<v-card-actions v-if="genericModel.model.name == 'RecipeImport'">
<v-btn prepend-icon="fa-solid fa-rotate" color="success" @click="importAllRecipes()">{{ $t('ImportAll') }}</v-btn>
</v-card-actions>
<v-card-text v-if="genericModel.model.name == 'AiLog'">
{{$t('MonthlyCreditsUsed')}} ({{ useUserPreferenceStore().activeSpace.aiMonthlyCreditsUsed }} / {{ useUserPreferenceStore().activeSpace.aiCreditsMonthly }})
<v-progress-linear :model-value="useUserPreferenceStore().activeSpace.aiMonthlyCreditsUsed"></v-progress-linear>
</v-card-text>
</v-card>
</v-col>
</v-row>