Skip to content

Commit

Permalink
Removed post validate prompt from API.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaseduoli committed Aug 21, 2024
1 parent f184c55 commit dda07dd
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions src/frontend/src/controllers/API/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import {
APIClassType,
BuildStatusTypeAPI,
InitTypeAPI,
PromptTypeAPI,
UploadFileTypeAPI,
} from "./../../types/api/index";

Expand Down Expand Up @@ -57,25 +56,6 @@ export async function sendAll(data: sendAllProps) {
return await api.post(`${BASE_URL_API}predict`, data);
}

/**
* Checks the prompt for the code block by sending it to an API endpoint.
* @param {string} name - The name of the field to check.
* @param {string} template - The template string of the prompt to check.
* @param {APIClassType} frontend_node - The frontend node to check.
* @returns {Promise<AxiosResponse<PromptTypeAPI>>} A promise that resolves to an AxiosResponse containing the validation results.
*/
export async function postValidatePrompt(
name: string,
template: string,
frontend_node: APIClassType,
): Promise<AxiosResponse<PromptTypeAPI>> {
return api.post(`${BASE_URL_API}validate/prompt`, {
name,
template,
frontend_node,
});
}

/**
* Fetches a list of JSON files from a GitHub repository and returns their contents as an array of FlowType objects.
*
Expand Down

0 comments on commit dda07dd

Please sign in to comment.