ChainForge/chainforge/oaievals/italian-new-words.cforge
ianarawjo b33397930b
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

1 line
8.2 KiB
Plaintext

{"flow": {"nodes": [{"width": 312, "height": 311, "id": "prompt-italian-new-words", "type": "prompt", "data": {"prompt": "{prompt}", "n": 1, "llms": [{"key": "aa3c0f03-22bd-416e-af4d-4bf5c4278c99", "settings": {"system_msg": "You will be prompted with a single word. Does this word exist in the Italian language? Answer with exactly one letter: Y or N.", "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": "You will be prompted with a single word. Does this word exist in the Italian language? Answer with exactly one letter: Y or N.", "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-italian-new-words", "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-italian-new-words", "type": "vis", "data": {"input": "eval-italian-new-words"}, "position": {"x": 1200, "y": 250}, "positionAbsolute": {"x": 1200, "y": 250}}, {"width": 302, "height": 260, "id": "inspect-italian-new-words", "type": "inspect", "data": {"input": "prompt-italian-new-words"}, "position": {"x": 820, "y": 400}, "positionAbsolute": {"x": 820, "y": 400}}, {"width": 423, "height": 417, "id": "table-italian-new-words", "type": "table", "data": {"rows": [{"prompt": "abbattere", "ideal": "Y"}, {"prompt": "abilismo", "ideal": "Y"}, {"prompt": "ageismo", "ideal": "Y"}, {"prompt": "agnellato", "ideal": "Y"}, {"prompt": "algocrazia", "ideal": "Y"}, {"prompt": "algoretica", "ideal": "Y"}, {"prompt": "anagrafare", "ideal": "Y"}, {"prompt": "anagrafatura", "ideal": "Y"}, {"prompt": "armocromia", "ideal": "Y"}, {"prompt": "audismo", "ideal": "Y"}, {"prompt": "badante", "ideal": "Y"}, {"prompt": "bioeticista", "ideal": "Y"}, {"prompt": "bioterrorismo", "ideal": "Y"}, {"prompt": "blastare", "ideal": "Y"}, {"prompt": "boomer", "ideal": "Y"}, {"prompt": "bralette", "ideal": "Y"}, {"prompt": "brassare", "ideal": "Y"}, {"prompt": "bromance", "ideal": "Y"}, {"prompt": "bufu", "ideal": "Y"}, {"prompt": "bullizzare", "ideal": "Y"}, {"prompt": "burger", "ideal": "Y"}, {"prompt": "camperizzare", "ideal": "Y"}, {"prompt": "cartolarizzazione", "ideal": "Y"}, {"prompt": "catcalling", "ideal": "Y"}, {"prompt": "coding", "ideal": "Y"}, {"prompt": "coronavirus", "ideal": "Y"}, {"prompt": "cosmeceutica", "ideal": "Y"}, {"prompt": "cosmeceutico", "ideal": "Y"}, {"prompt": "cringe", "ideal": "Y"}, {"prompt": "cuociriso", "ideal": "Y"}, {"prompt": "demedicalizzazione", "ideal": "Y"}, {"prompt": "disiscrizione", "ideal": "Y"}, {"prompt": "dissare", "ideal": "Y"}, {"prompt": "docciarsi", "ideal": "Y"}, {"prompt": "domotizzare", "ideal": "Y"}, {"prompt": "domotizzazione", "ideal": "Y"}, {"prompt": "doomscrolling", "ideal": "Y"}, {"prompt": "dressare", "ideal": "Y"}, {"prompt": "droplet", "ideal": "Y"}, {"prompt": "enogastronomo", "ideal": "Y"}, {"prompt": "ergodico", "ideal": "Y"}, {"prompt": "eskere", "ideal": "Y"}, {"prompt": "esodato", "ideal": "Y"}, {"prompt": "eurocent", "ideal": "Y"}, {"prompt": "eurolandia", "ideal": "Y"}, {"prompt": "eurozona", "ideal": "Y"}, {"prompt": "fasarsi", "ideal": "Y"}, {"prompt": "fomo", "ideal": "Y"}, {"prompt": "foodie", "ideal": "Y"}, {"prompt": "forchiaio", "ideal": "Y"}, {"prompt": "freezare", "ideal": "Y"}, {"prompt": "friendzonare", "ideal": "Y"}, {"prompt": "ghostare", "ideal": "Y"}, {"prompt": "ghosting", "ideal": "Y"}, {"prompt": "gialloverde", "ideal": "Y"}, {"prompt": "girotondo", "ideal": "Y"}, {"prompt": "greenpass", "ideal": "Y"}, {"prompt": "hashtag", "ideal": "Y"}, {"prompt": "hater", "ideal": "Y"}, {"prompt": "hipster", "ideal": "Y"}, {"prompt": "impiattare", "ideal": "Y"}, {"prompt": "impigiamare", "ideal": "Y"}, {"prompt": "influencer", "ideal": "Y"}, {"prompt": "infodemia", "ideal": "Y"}, {"prompt": "ipermedicalizzazione", "ideal": "Y"}, {"prompt": "lievitista", "ideal": "Y"}, {"prompt": "lockdown", "ideal": "Y"}, {"prompt": "ludopatia", "ideal": "Y"}, {"prompt": "maskne", "ideal": "Y"}, {"prompt": "memare", "ideal": "Y"}, {"prompt": "metaverso", "ideal": "Y"}, {"prompt": "microondabile", "ideal": "Y"}, {"prompt": "microplastica", "ideal": "Y"}, {"prompt": "mobbing", "ideal": "Y"}, {"prompt": "neuroatipico", "ideal": "Y"}, {"prompt": "neurodivergente", "ideal": "Y"}, {"prompt": "neurodivergenza", "ideal": "Y"}, {"prompt": "neurodiverso", "ideal": "Y"}, {"prompt": "neurotipico", "ideal": "Y"}, {"prompt": "NFT", "ideal": "Y"}, {"prompt": "paddle", "ideal": "Y"}, {"prompt": "padel", "ideal": "Y"}, {"prompt": "pentastellato", "ideal": "Y"}, {"prompt": "perlescenza", "ideal": "Y"}, {"prompt": "phygital", "ideal": "Y"}, {"prompt": "pigiamare", "ideal": "Y"}, {"prompt": "poliamore", "ideal": "Y"}, {"prompt": "restanza", "ideal": "Y"}, {"prompt": "retrolfattivo", "ideal": "Y"}, {"prompt": "retrolfatto", "ideal": "Y"}, {"prompt": "riatletizzazione", "ideal": "Y"}, {"prompt": "rider", "ideal": "Y"}, {"prompt": "sbatti", "ideal": "Y"}, {"prompt": "selfie", "ideal": "Y"}, {"prompt": "settarsi", "ideal": "Y"}, {"prompt": "sextortion", "ideal": "Y"}, {"prompt": "sitografia", "ideal": "Y"}, {"prompt": "skillato", "ideal": "Y"}, {"prompt": "skincare", "ideal": "Y"}, {"prompt": "sovranismo", "ideal": "Y"}, {"prompt": "spid", "ideal": "Y"}, {"prompt": "spoilerare", "ideal": "Y"}, {"prompt": "stacchetto", "ideal": "Y"}, {"prompt": "STEM", "ideal": "Y"}, {"prompt": "streamer", "ideal": "Y"}, {"prompt": "svapare", "ideal": "Y"}, {"prompt": "tamponarsi", "ideal": "Y"}, {"prompt": "termoscanner", "ideal": "Y"}, {"prompt": "terrapiattismo", "ideal": "Y"}, {"prompt": "terrapiattista", "ideal": "Y"}, {"prompt": "token", "ideal": "Y"}, {"prompt": "tokenizzare", "ideal": "Y"}, {"prompt": "tokenizzazione", "ideal": "Y"}, {"prompt": "triggerare", "ideal": "Y"}, {"prompt": "twittare", "ideal": "Y"}, {"prompt": "unboxing", "ideal": "Y"}, {"prompt": "vamping", "ideal": "Y"}, {"prompt": "veg", "ideal": "Y"}, {"prompt": "veggie", "ideal": "Y"}, {"prompt": "videofonino", "ideal": "Y"}, {"prompt": "videoreporter", "ideal": "Y"}, {"prompt": "virale", "ideal": "Y"}, {"prompt": "webinar", "ideal": "Y"}, {"prompt": "webserie", "ideal": "Y"}, {"prompt": "whatsappare", "ideal": "Y"}], "columns": [{"key": "prompt", "header": "Prompt"}, {"key": "ideal", "header": "Ideal"}]}, "position": {"x": -16, "y": 160}, "selected": false, "positionAbsolute": {"x": -16, "y": 160}, "dragging": false}], "edges": [{"source": "prompt-italian-new-words", "sourceHandle": "prompt", "target": "eval-italian-new-words", "targetHandle": "responseBatch", "interactionWidth": 100, "markerEnd": {"type": "arrow", "width": "22px", "height": "22px"}, "id": "reactflow__edge-prompt-1686756357355prompt-eval-1686756357355responseBatch"}, {"source": "prompt-italian-new-words", "sourceHandle": "prompt", "target": "inspect-italian-new-words", "targetHandle": "input", "interactionWidth": 100, "markerEnd": {"type": "arrow", "width": "22px", "height": "22px"}, "id": "reactflow__edge-prompt-1686756357355prompt-inspect-1686756357355input"}, {"source": "eval-italian-new-words", "sourceHandle": "output", "target": "vis-italian-new-words", "targetHandle": "input", "interactionWidth": 100, "markerEnd": {"type": "arrow", "width": "22px", "height": "22px"}, "id": "reactflow__edge-eval-1686756357355output-vis-1686756357355input"}, {"source": "table-italian-new-words", "sourceHandle": "Prompt", "target": "prompt-italian-new-words", "targetHandle": "prompt", "interactionWidth": 100, "markerEnd": {"type": "arrow", "width": "22px", "height": "22px"}, "id": "reactflow__edge-table-1686756385002Prompt-prompt-1686756357355prompt"}], "viewport": {"x": 144, "y": 37, "zoom": 1}}, "cache": {"eval-1686756357355.json": {}, "inspect-1686756357355.json": {}, "prompt-1686756357355.json": {}, "table-1686756385002.json": {}, "vis-1686756357355.json": {}}}