🔀 refactor(endpoints.py): rename predict_flow endpoint to process_flow and update its functionality

🔀 refactor(constants.tsx): update BASE_API_URL to reflect the changes in the predict_flow endpoint name
The predict_flow endpoint has been renamed to process_flow to better reflect its functionality. The inputs are now passed as a dictionary instead of a PredictRequest object. The tweaks parameter is now optional and is passed as a dictionary. The response model has been updated to reflect the changes in the response. The BASE_API_URL constant in constants.tsx has been updated to reflect the changes in the endpoint name.
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-06-22 18:57:17 -03:00
commit 176738987b
2 changed files with 14 additions and 14 deletions

View file

@ -66,7 +66,7 @@ export const getPythonApiCode = (flow: FlowType): string => {
BASE_API_URL = "${window.location.protocol}//${
window.location.host
}/api/v1/predict"
}/api/v1/process"
FLOW_ID = "${flowId}"
# You can tweak the flow by adding a tweaks dictionary
# e.g {"OpenAI-XXXXX": {"model_name": "gpt-4"}}
@ -106,7 +106,7 @@ export const getCurlCode = (flow: FlowType): string => {
return `curl -X POST \\
${window.location.protocol}//${
window.location.host
}/api/v1/predict/${flowId} \\
}/api/v1/process/${flowId} \\
-H 'Content-Type: application/json' \\
-d '{"message": "Your message", "tweaks": ${JSON.stringify(
tweaks,