Add inference endpoints management page

This commit is contained in:
Saikat Sarkar 2024-05-21 14:15:05 -06:00
parent 2908664d1a
commit 6f7099d19e
2 changed files with 5 additions and 5 deletions

View file

@ -29,4 +29,4 @@ export const FetchInferenceEndpointsAPILogic = createApiLogic(
fetchInferenceEndpoints
);
export type FetchInferenceEdnpointsApiActions = Actions<{}, FetchInferenceEndpointsResponse>;
export type FetchInferenceEdnpointsApiActions = Actions<void, FetchInferenceEndpointsResponse>;

View file

@ -20,7 +20,7 @@ export interface InferenceEndpointsActions {
apiError: FetchInferenceEndpointsApiActions['apiError'];
apiSuccess: FetchInferenceEndpointsApiActions['apiSuccess'];
cancelSuccess: CancelSyncsActions['apiSuccess'];
fetchInferenceEndpoints: () => {};
fetchInferenceEndpoints: () => void;
makeRequest: FetchInferenceEndpointsApiActions['makeRequest'];
}
export interface InferenceEndpointsValues {
@ -33,7 +33,7 @@ export const InferenceEndpointsLogic = kea<
MakeLogicType<InferenceEndpointsValues, InferenceEndpointsActions>
>({
actions: {
fetchInferenceEndpoints: () => ({}),
fetchInferenceEndpoints: true,
},
connect: {
actions: [
@ -45,9 +45,9 @@ export const InferenceEndpointsLogic = kea<
values: [FetchInferenceEndpointsAPILogic, ['data', 'status']],
},
listeners: ({ actions }) => ({
fetchInferenceEndpoints: async (input, breakpoint) => {
fetchInferenceEndpoints: async (_, breakpoint) => {
await breakpoint(150);
actions.makeRequest(input);
actions.makeRequest();
},
}),
path: ['enterprise_search', 'content', 'inference_endpoints_logic'],