mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-04-23 03:00:31 -04:00
feat(ui): improved dynamicprompts generator
- Split into two (random and combinatorial) - lots of fiddly logic to do both in one generator. - Update to support seeds for random.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import type { components } from 'services/api/schema';
|
||||
import type { paths } from 'services/api/schema';
|
||||
|
||||
import { api, buildV1Url } from '..';
|
||||
|
||||
@@ -13,8 +13,8 @@ const buildUtilitiesUrl = (path: string = '') => buildV1Url(`utilities/${path}`)
|
||||
export const utilitiesApi = api.injectEndpoints({
|
||||
endpoints: (build) => ({
|
||||
dynamicPrompts: build.query<
|
||||
components['schemas']['DynamicPromptsResponse'],
|
||||
{ prompt: string; max_prompts: number; combinatorial?: boolean }
|
||||
paths['/api/v1/utilities/dynamicprompts']['post']['responses']['200']['content']['application/json'],
|
||||
paths['/api/v1/utilities/dynamicprompts']['post']['requestBody']['content']['application/json']
|
||||
>({
|
||||
query: (arg) => ({
|
||||
url: buildUtilitiesUrl('dynamicprompts'),
|
||||
@@ -28,3 +28,5 @@ export const utilitiesApi = api.injectEndpoints({
|
||||
}),
|
||||
}),
|
||||
});
|
||||
|
||||
export const { useDynamicPromptsQuery, useLazyDynamicPromptsQuery } = utilitiesApi;
|
||||
|
||||
Reference in New Issue
Block a user