ChainForge/chainforge/oaievals/svg_understanding.cforge

1 line
35 KiB
Plaintext
Raw Permalink Normal View History

TypeScript backend, HuggingFace models, JavaScript evaluators, Comment Nodes, and more (#81) * Beginning to convert Python backend to Typescript * Change all fetch() calls to fetch_from_backend switcher * wip converting query.py to query.ts * wip started utils.js conversion. Tested that OpenAI API call works * more progress on converting utils.py to Typescript * jest tests for query, utils, template.ts. Confirmed PromptPipeline works. * wip converting queryLLM in flask_app to TS * Tested queryLLM and StorageCache compressed saving/loading * wip execute() in backend.ts * Added execute() and tested w concrete func. Need to test eval() * Added craco for optional webpack config. Config'd for TypeScript with Node.js packages browserify'd * Execute JS code on iframe sandbox * Tested and working JS Evaluator execution. * wip swapping backends * Tested TypeScript backendgit status! :) woot * Added fetchEnvironAPIKeys to Flask server to fetch os.environ keys when running locally * Route Anthropic calls through Flask when running locally * Added info button to Eval nodes. Rebuilt react * Edits to info modal on Eval node * Remove/error out on Python eval nodes when not running locally. * Check browser compat and display error if not supported * Changed all example flows to use JS. Bug fix in query.ts * Refactored to LLMProvider to streamline model additions * Added HuggingFace models API * Added back Dalai call support, routing through Flask * Remove flask app calls and socketio server that are no longer used * Added Comment Nodes. Rebuilt react. * Fix PaLM temp=0 build, update package vers and rebuild react
2023-06-30 15:11:20 -04:00
{"flow": {"nodes": [{"width": 312, "height": 311, "id": "prompt-svg_understanding", "type": "prompt", "data": {"prompt": "{prompt}", "n": 1, "llms": [{"key": "aa3c0f03-22bd-416e-af4d-4bf5c4278c99", "settings": {"system_msg": "Identify the object the following SVG path is a drawing of in a single word.", "temperature": 1, "functions": [], "function_call": "", "top_p": 1, "stop": [], "presence_penalty": 0, "frequency_penalty": 0}, "name": "GPT3.5", "emoji": "\ud83d\ude42", "model": "gpt-3.5-turbo", "base_model": "gpt-3.5-turbo", "temp": 1, "formData": {"shortname": "GPT3.5", "model": "gpt-3.5-turbo", "system_msg": "Identify the object the following SVG path is a drawing of in a single word.", "temperature": 1, "functions": "", "function_call": "", "top_p": 1, "stop": "", "presence_penalty": 0, "frequency_penalty": 0}}]}, "position": {"x": 448, "y": 224}, "selected": false, "positionAbsolute": {"x": 448, "y": 224}, "dragging": false}, {"width": 333, "height": 182, "id": "eval-svg_understanding", "type": "evaluator", "data": {"code": "function evaluate(response) {\n\tlet ideal = response.meta['Ideal'];\n\treturn response.text.startsWith(ideal);\n}", "language": "javascript"}, "position": {"x": 820, "y": 150}, "positionAbsolute": {"x": 820, "y": 150}}, {"width": 228, "height": 196, "id": "vis-svg_understanding", "type": "vis", "data": {"input": "eval-svg_understanding"}, "position": {"x": 1200, "y": 250}, "positionAbsolute": {"x": 1200, "y": 250}}, {"width": 302, "height": 260, "id": "inspect-svg_understanding", "type": "inspect", "data": {"input": "prompt-svg_understanding"}, "position": {"x": 820, "y": 400}, "positionAbsolute": {"x": 820, "y": 400}}, {"width": 423, "height": 417, "id": "table-svg_understanding", "type": "table", "data": {"rows": [{"prompt": "M5113 12775 c-128 -40 -231 -149 -283 -301 -12 -32 -30 -111 -41 -174 -11 -63 -40 -205 -64 -315 -24 -110 -46 -231 -50 -270 -17 -189 -47 -466 -56 -515 -6 -30 -71 -302 -144 -605 -74 -302 -143 -599 -154 -660 -11 -60 -41 -290 -66 -510 -69 -604 -110 -858 -154 -942 -38 -76 -226 -223 -284 -223 -8 0 -29 32 -49 78 -32 70 -36 91 -47 227 -47 579 -67 701 -236 1465 -74 333 -84 441 -95 1080 -10 537 -17 640 -45 725 -36 106 -88 158 -220 221 -128 61 -231 65 -371 13 -97 -36 -203 -151 -247 -267 -22 -56 -22 -66 -19 -472 2 -349 5 -438 22 -560 48 -345 50 -388 50 -875 0 -351 4 -498 15 -580 15 -120 55 -490 81 -765 9 -96 17 -240 18 -320 1 -134 -1 -151 -27 -228 l-28 -84 -97 -46 c-89 -43 -105 -47 -185 -50 -148 -7 -168 0 -249 76 -220 207 -462 487 -714 823 -159 214 -200 278 -250 396 -228 541 -467 865 -692 938 -44 15 -61 15 -119 5 -92 -16 -164 -52 -212 -107 -69 -78 -106 -216 -88 -332 11 -79 85 -292 164 -477 58 -136 90 -192 205 -365 174 -262 216 -334 287 -505 105 -252 232 -487 401 -739 36 -55 74 -118 82 -140 9 -22 55 -120 103 -219 47 -98 102 -217 121 -263 79 -190 182 -761 219 -1213 37 -450 103 -1014 141 -1200 34 -162 87 -346 119 -409 31 -62 156 -361 241 -578 64 -162 137 -435 269 -1008 78 -339 100 -548 92 -867 -5 -204 -33 -435 -167 -1388 -16 -118 -30 -223 -30 -232 0 -17 83 -18 1596 -18 l1597 0 -7 128 c-16 315 -26 768 -26 1252 0 574 -1 560 65 855 48 211 69 275 133 399 47 89 74 127 151 208 51 54 140 136 196 183 61 50 199 188 343 342 132 142 291 307 353 367 63 60 200 193 305 295 105 102 242 233 304 291 120 111 220 235 270 335 16 33 57 125 91 205 83 196 232 503 256 527 18 18 62 77 103 138 8 12 24 35 35 51 10 16 41 53 67 82 26 30 51 65 54 78 4 15 19 30 39 38 40 17 130 127 146 179 9 27 18 37 33 37 33 0 79 33 122 86 21 27 68 78 104 114 36 36 142 148 235 248 l170 183 205 135 c113 75 211 143 218 152 6 9 12 27 12 41 0 13 7 33 16 43 12 12 17 35 16 78 -1 49 -8 73 -38 131 -46 88 -107 136 -225 181 -80 30 -91 31 -224 31 -216 0 -602 -68 -759 -133 -293 -122 -483 -248 -636 -421 -36 -41 -104 -112 -151 -159 -47 -47 -137 -155 -200 -240 -84 -113 -163 -203 -290 -331 -96 -96 -190 -184 -210 -194 l-37 -18 -25 29 c-14 16 -31 52 -38 79 -13 56 -71 228 -117 350 -20 53 -32 108 -37 163 -4 46 -13 108 -21 138 -9 35 -14 107 -14 198 0 133 3 156 39 307 22 90 56 267 76 392 36 223 39 237 155 590 119 361 222 658 299 858 22 58 65 191 95 297 5