c3a9843fcb
https://github.com/user-attachments/assets/87f5a556-ff12-4ce0-aaa7-9120c0432151 --------- Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
62 lines
1.1 KiB
TypeScript
62 lines
1.1 KiB
TypeScript
import { Field, InputType } from '@nestjs/graphql';
|
|
|
|
import {
|
|
IsNotEmpty,
|
|
IsObject,
|
|
IsOptional,
|
|
IsString,
|
|
IsUUID,
|
|
} from 'class-validator';
|
|
import GraphQLJSON from 'graphql-type-json';
|
|
|
|
import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars';
|
|
import { ModelId } from 'src/engine/core-modules/ai/constants/ai-models.const';
|
|
|
|
@InputType()
|
|
export class UpdateAgentInput {
|
|
@IsUUID()
|
|
@IsNotEmpty()
|
|
@Field(() => UUIDScalarType)
|
|
id: string;
|
|
|
|
@IsString()
|
|
@IsOptional()
|
|
@Field()
|
|
name?: string;
|
|
|
|
@IsString()
|
|
@IsOptional()
|
|
@Field()
|
|
label?: string;
|
|
|
|
@IsString()
|
|
@IsOptional()
|
|
@Field({ nullable: true })
|
|
icon?: string;
|
|
|
|
@IsString()
|
|
@IsOptional()
|
|
@Field({ nullable: true })
|
|
description?: string;
|
|
|
|
@IsString()
|
|
@IsOptional()
|
|
@Field()
|
|
prompt?: string;
|
|
|
|
@IsString()
|
|
@IsOptional()
|
|
@Field(() => String)
|
|
modelId?: ModelId;
|
|
|
|
@IsUUID()
|
|
@IsOptional()
|
|
@Field(() => UUIDScalarType, { nullable: true })
|
|
roleId?: string;
|
|
|
|
@IsObject()
|
|
@IsOptional()
|
|
@Field(() => GraphQLJSON, { nullable: true })
|
|
responseFormat?: object;
|
|
}
|