From 0f1db5bbe4073fb118ca21d93438018ee91608ac Mon Sep 17 00:00:00 2001 From: Vince Loewe Date: Wed, 27 Mar 2024 22:19:47 +0900 Subject: [PATCH] fix: import to playground --- packages/frontend/pages/prompts/[[...id]].tsx | 4 ++++ packages/frontend/pages/radars/index.tsx | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/frontend/pages/prompts/[[...id]].tsx b/packages/frontend/pages/prompts/[[...id]].tsx index 848614fc..e0637733 100644 --- a/packages/frontend/pages/prompts/[[...id]].tsx +++ b/packages/frontend/pages/prompts/[[...id]].tsx @@ -64,6 +64,7 @@ function Playground() { const [streaming, setStreaming] = useState(false) const [loading, setLoading] = useState(false) + const [output, setOutput] = useState(null) const [outputTokens, setOutputTokens] = useState(null) const [error, setError] = useState(null) @@ -124,6 +125,8 @@ function Playground() { if (run?.input) { setTemplateVersion({ ...templateVersion, content: run.input }) + + setTemplate({ mode: "openai", extra: run.params }) } setLoading(false) @@ -309,6 +312,7 @@ function Playground() { // reset output when the template or template version changes useEffect(() => { setOutput(null) + setError(null) setOutputTokens(0) }, [ template?.id, diff --git a/packages/frontend/pages/radars/index.tsx b/packages/frontend/pages/radars/index.tsx index 60d32b54..14e46544 100644 --- a/packages/frontend/pages/radars/index.tsx +++ b/packages/frontend/pages/radars/index.tsx @@ -395,7 +395,7 @@ export default function Radar() { Radars - Alpha + Beta