From 9909416694ce0c593d3c9ddbcb4709eb77963a87 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Thu, 15 Jun 2023 18:14:23 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20docs(constants.tsx):=20add=20doc?= =?UTF-8?q?umentation=20for=20TWEAKS=20constant=20The=20TWEAKS=20constant?= =?UTF-8?q?=20is=20a=20dictionary=20that=20can=20be=20used=20to=20tweak=20?= =?UTF-8?q?the=20flow.=20It=20is=20an=20optional=20parameter=20that=20can?= =?UTF-8?q?=20be=20passed=20to=20the=20run=5Fflow=20function.=20The=20dict?= =?UTF-8?q?ionary=20should=20be=20in=20the=20format=20{"OpenAI-XXXXX":=20{?= =?UTF-8?q?"model=5Fname":=20"gpt-4"}}.=20This=20commit=20adds=20documenta?= =?UTF-8?q?tion=20to=20the=20code=20to=20make=20it=20easier=20for=20develo?= =?UTF-8?q?pers=20to=20understand=20how=20to=20use=20the=20TWEAKS=20consta?= =?UTF-8?q?nt.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/src/constants.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/frontend/src/constants.tsx b/src/frontend/src/constants.tsx index 55a4123ce..e32336578 100644 --- a/src/frontend/src/constants.tsx +++ b/src/frontend/src/constants.tsx @@ -68,6 +68,8 @@ BASE_API_URL = "${window.location.protocol}//${ window.location.host }/ap1/v1/predict" FLOW_ID = "${flowId}" +# You can tweak the flow by adding a tweaks dictionary +# e.g {"OpenAI-XXXXX": {"model_name": "gpt-4"}} TWEAKS = ${JSON.stringify(tweaks, null, 2)} def run_flow(message: str, flow_id: str, tweaks: dict = None) -> dict: