feat(admin): add prompt management page (#7611)

close AF-907

Supports online modification of prompt, but does not support custom ai key yet

![CleanShot 2024-07-29 at 22 12 39@2x](https://github.com/user-attachments/assets/c67ad0d0-3e5b-44ff-b7db-d07dd11c19e2)
This commit is contained in:
JimmFly
2024-08-13 05:45:00 +00:00
committed by forehalo
parent bf6e36de37
commit b214003968
15 changed files with 658 additions and 36 deletions

View File

@@ -4,6 +4,7 @@ import { BadRequestException, NotFoundException } from '@nestjs/common';
import {
Args,
Field,
Float,
ID,
InputType,
Mutation,
@@ -205,16 +206,16 @@ class CopilotPromptConfigType {
@Field(() => Boolean, { nullable: true })
jsonMode!: boolean | null;
@Field(() => Number, { nullable: true })
@Field(() => Float, { nullable: true })
frequencyPenalty!: number | null;
@Field(() => Number, { nullable: true })
@Field(() => Float, { nullable: true })
presencePenalty!: number | null;
@Field(() => Number, { nullable: true })
@Field(() => Float, { nullable: true })
temperature!: number | null;
@Field(() => Number, { nullable: true })
@Field(() => Float, { nullable: true })
topP!: number | null;
}
@@ -238,8 +239,8 @@ class CopilotPromptType {
@Field(() => String)
name!: string;
@Field(() => AvailableModels)
model!: AvailableModels;
@Field(() => String)
model!: string;
@Field(() => String, { nullable: true })
action!: string | null;