import { HttpClient } from '@angular/common/http'; import { NovaCloudService } from '../../../nova-cloud/nova-cloud.service'; import Parse from "parse"; import { NovaUploadService } from '../../../storage/service-upload/nova-upload.service'; import { DalleOptions } from './imagine-func'; import * as i0 from "@angular/core"; export interface StableDiffusionOptions { prompt: string; modelStyleId: number; negativePrompt?: string; width?: number; height?: number; steps?: number; seed?: number; cfgScale?: number; hrScale?: number; hrSteps?: number; upscale?: number; batchSize?: number; faceFix?: boolean; detailsLevel?: number; img?: string; imgOptions?: imgOptions; denoisingStrength?: number; controlnet?: { units?: ControlnetUnits[]; }; } /** * imgOptions 图像配置参数 * @public */ export interface imgOptions { removeBackground?: boolean; redrawBackground?: boolean; mainObjectType?: "human" | "general"; facePreservation?: boolean; facePreservationCount?: number; genderDetect?: boolean; } /** * ControlnetUnits 控制网络单元 * @public */ export interface ControlnetUnits { isOpen?: boolean; type?: string; preprocess?: boolean; image?: string; controlMode?: number; weight?: number; controlStart?: number; controlEnd?: number; paramsA?: number; paramsB?: number; controlArray?: any[]; } /** * ImagineService AI绘画服务 */ export declare class ImagineService { private http; private ncloud; private uploadServ; /** * 图片生成接口主机地址 */ constructor(http: HttpClient, ncloud: NovaCloudService, uploadServ: NovaUploadService); /** * DALL-E-3 图片生成函数 * @description * @see * https://p4.hosteagle.club/docs/api-reference?__cpo=aHR0cHM6Ly9wbGF0Zm9ybS5vcGVuYWkuY29t * @returns * { "id": "lpJGiFwWeA", // 图片生成任务ID "createdAt": "2024-11-27T12:18:14.463Z" } * @param {DalleOptions} options * @param {string} options.prompt 1000 characters for dall-e-2 and 4000 characters for dall-e-3. * @param {string} options.model dall-e-3 dall-e-2 * @param {string} options.quality dall-e-3 only hd means more details & consistency * @param {string} options.response_format url | b64_json * @param {string} options.size 1024x1024, 1792x1024, or 1024x1792 for dall-e-3 * @param {string} options.style vivid | natural dall-e-3 only */ drawDalle(options: DalleOptions): Promise>; priceDalle(options: DalleOptions): any; priceStableDiffusion(options: StableDiffusionOptions): number; b64DataToBase64Image(b64_json: any): void; /** * Huashi6专用绘图函数 * @param reqBody * @see * 接口reqBody参数,参考:https://www.showdoc.com.cn/2307900595645609/10319675987319598 * 密码:123456 * @returns */ draw(reqBody: any): Promise; /** * 已完成的直接加载,未完成的再接口更新 * @param taskId * @returns */ taskDetail(taskId: string): Promise; taskDetailMap: any; /** * 我的绘画作品共享方法 */ newWorkList: Array; myWorkList: Array; getMyWorkQuery(): Parse.Query>; getWorkQuery(): Parse.Query>; getimg(): Promise; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }