update metadata endpoint

This commit is contained in:
Mary Hipp 2024-02-22 09:39:19 -05:00 committed by psychedelicious
parent 5b7633f3c6
commit 5a12886dbb
3 changed files with 5 additions and 5 deletions

View File

@ -1,6 +1,6 @@
import { skipToken } from '@reduxjs/toolkit/query'; import { skipToken } from '@reduxjs/toolkit/query';
import { useAppDispatch, useAppSelector } from '../../../../app/store/storeHooks'; import { useAppDispatch, useAppSelector } from '../../../../app/store/storeHooks';
import { useGetModelQuery, useUpdateModelsMutation } from '../../../../services/api/endpoints/models'; import { useGetModelConfigQuery, useUpdateModelsMutation } from '../../../../services/api/endpoints/models';
import { import {
Flex, Flex,
Text, Text,
@ -40,7 +40,7 @@ import { makeToast } from '../../../system/util/makeToast';
export const ModelEdit = () => { export const ModelEdit = () => {
const dispatch = useAppDispatch(); const dispatch = useAppDispatch();
const selectedModelKey = useAppSelector((s) => s.modelmanagerV2.selectedModelKey); const selectedModelKey = useAppSelector((s) => s.modelmanagerV2.selectedModelKey);
const { data, isLoading } = useGetModelQuery(selectedModelKey ?? skipToken); const { data, isLoading } = useGetModelConfigQuery(selectedModelKey ?? skipToken);
const [updateModel, { isLoading: isSubmitting }] = useUpdateModelsMutation(); const [updateModel, { isLoading: isSubmitting }] = useUpdateModelsMutation();

View File

@ -1,6 +1,6 @@
import { skipToken } from '@reduxjs/toolkit/query'; import { skipToken } from '@reduxjs/toolkit/query';
import { useAppDispatch, useAppSelector } from '../../../../app/store/storeHooks'; import { useAppDispatch, useAppSelector } from '../../../../app/store/storeHooks';
import { useGetModelMetadataQuery, useGetModelQuery } from '../../../../services/api/endpoints/models'; import { useGetModelMetadataQuery, useGetModelConfigQuery } from '../../../../services/api/endpoints/models';
import { Flex, Text, Heading, Button, Box } from '@invoke-ai/ui-library'; import { Flex, Text, Heading, Button, Box } from '@invoke-ai/ui-library';
import DataViewer from '../../../gallery/components/ImageMetadataViewer/DataViewer'; import DataViewer from '../../../gallery/components/ImageMetadataViewer/DataViewer';
import { useCallback, useMemo } from 'react'; import { useCallback, useMemo } from 'react';
@ -21,7 +21,7 @@ import { setSelectedModelMode } from '../../store/modelManagerV2Slice';
export const ModelView = () => { export const ModelView = () => {
const dispatch = useAppDispatch(); const dispatch = useAppDispatch();
const selectedModelKey = useAppSelector((s) => s.modelmanagerV2.selectedModelKey); const selectedModelKey = useAppSelector((s) => s.modelmanagerV2.selectedModelKey);
const { data, isLoading } = useGetModelQuery(selectedModelKey ?? skipToken); const { data, isLoading } = useGetModelConfigQuery(selectedModelKey ?? skipToken);
const { data: metadata } = useGetModelMetadataQuery(selectedModelKey ?? skipToken); const { data: metadata } = useGetModelMetadataQuery(selectedModelKey ?? skipToken);
const modelData = useMemo(() => { const modelData = useMemo(() => {

View File

@ -46,7 +46,7 @@ export type paths = {
*/ */
get: operations["list_model_summary"]; get: operations["list_model_summary"];
}; };
"/api/v2/models/meta/i/{key}": { "/api/v2/models/i/{key}/meta": {
/** /**
* Get Model Metadata * Get Model Metadata
* @description Get a model metadata object. * @description Get a model metadata object.