🚚 chore(endpoints.py): reorder endpoints to keep backwards compatibility

The `/predict/{flow_id}` endpoint was moved above the `/process/{flow_id}` endpoint to maintain backwards compatibility with existing clients.
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-06-23 12:36:46 -03:00
commit dc0a772635

View file

@ -24,6 +24,8 @@ def get_all():
return build_langchain_types_dict()
# For backwards compatibility we will keep the old endpoint
@router.post("/predict/{flow_id}", response_model=ProcessResponse)
@router.post("/process/{flow_id}", response_model=ProcessResponse)
async def process_flow(
flow_id: str,