ChainForge/chainforge/oaievals/first-letters.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
20 KiB
Plaintext

{"flow": {"nodes": [{"width": 312, "height": 311, "id": "prompt-first-letters", "type": "prompt", "data": {"prompt": "{prompt}", "n": 1, "llms": [{"key": "aa3c0f03-22bd-416e-af4d-4bf5c4278c99", "settings": {"system_msg": "You are a helpful assistant. Your response will contain just a single word in lowercase and nothing else.", "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 are a helpful assistant. Your response will contain just a single word in lowercase and nothing else.", "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-first-letters", "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-first-letters", "type": "vis", "data": {"input": "eval-first-letters"}, "position": {"x": 1200, "y": 250}, "positionAbsolute": {"x": 1200, "y": 250}}, {"width": 302, "height": 260, "id": "inspect-first-letters", "type": "inspect", "data": {"input": "prompt-first-letters"}, "position": {"x": 820, "y": 400}, "positionAbsolute": {"x": 820, "y": 400}}, {"width": 423, "height": 417, "id": "table-first-letters", "type": "table", "data": {"rows": [{"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"The red acrobat closed the orange raft.\"?", "ideal": "tractor"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Honey your daring rationale asserts typical ignorance or neglect.\"?", "ideal": "hydration"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Rare obnoxiousness searches elevation.\"?", "ideal": "rose"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Late into geometry he theorised.\"?", "ideal": "light"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Just under my pillow.\"?", "ideal": "jump"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Dear Elena find irregular new energies.\"?", "ideal": "define"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Bring roses on a doorstep.\"?", "ideal": "broad"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Long unto my bright eerie rose.\"?", "ideal": "lumber"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Tim realised Isabelle did enter new territory.\"?", "ideal": "trident"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Colonel Owen incidently neglected cruel ideas - does Ellie Night care emphatically?\"?", "ideal": "coincidence"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Chloe loves an unpredictable sensual enigma.\"?", "ideal": "clause"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Brian likes a chess knight mingled among its liasons.\"?", "ideal": "blackmail"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Brightly lit entryway and clear halls.\"?", "ideal": "bleach"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Draw a winning name.\"?", "ideal": "dawn"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Dream right Erol Adams Morris.\"?", "ideal": "dream"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Doctor Riley advised Ginny on neuroscience.\"?", "ideal": "dragon"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Flying little yacht.\"?", "ideal": "fly"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Micky and Roger taught Issy about linguistics.\"?", "ideal": "martial"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Brie ends night drinking.\"?", "ideal": "bend"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Fiddling on xylophone.\"?", "ideal": "fox"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Knight Norris eats eel.\"?", "ideal": "knee"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Reaching over crystal kites ends tomorrow.\"?", "ideal": "rocket"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Right after Claude kissed.\"?", "ideal": "rack"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Bring on new events.\"?", "ideal": "bone"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Bright and new decoration.\"?", "ideal": "band"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Gary accused Rory - did everyone notice?\"?", "ideal": "garden"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Realising one's being evolves.\"?", "ideal": "robe"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Rick and Nick donated on Monday.\"?", "ideal": "random"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Every lucky user sees intrusive virtual emotions.\"?", "ideal": "elusive"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Vick installed new year's lights.\"?", "ideal": "vinyl"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Try her enchiladas.\"?", "ideal": "the"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"As Patty properly lays eggs.\"?", "ideal": "apple"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Peter even asked Katie.\"?", "ideal": "peak"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Populate random objects.\"?", "ideal": "pro"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Pick and choose - tarts!\"?", "ideal": "pact"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Slight waiver in Mars.\"?", "ideal": "swim"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Clear evening lights - even Ray yearns.\"?", "ideal": "celery"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Who owns Lake Fields?\"?", "ideal": "wolf"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"My energy ends tonight.\"?", "ideal": "meet"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Mother ordered red emeralds.\"?", "ideal": "more"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Very eager guns and noses.\"?", "ideal": "vegan"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Enter new dimensions under restrictive ends.\"?", "ideal": "endure"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Burn old lights so these evenings rot.\"?", "ideal": "bolster"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Bob ran in Great Hill Tavern.\"?", "ideal": "bright"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Begin reaching evening and choose hunting.\"?", "ideal": "breach"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Bullets run in doses greater ever.\"?", "ideal": "bridge"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"But Reese agrees not disagrees.\"?", "ideal": "brand"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Captain Leonard eats a raspberry.\"?", "ideal": "clear"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Claude liked Ophelia's chess kit.\"?", "ideal": "clock"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Remember every choice keeps on nudging.\"?", "ideal": "reckon"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Best rhubarb over west Netherlands.\"?", "ideal": "brown"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Below lies eternal nightly dream.\"?", "ideal": "blend"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Buckle up Lindsay Leigh.\"?", "ideal": "bull"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Go right on Kingsway.\"?", "ideal": "grok"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Cold light in my alcove towards evening.\"?", "ideal": "climate"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Grow real insects mainly and create energy.\"?", "ideal": "grimace"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Big and crowded Oregon nights.\"?", "ideal": "bacon"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Bring our youth.\"?", "ideal": "boy"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Harvest a zucchini elsewhere love.\"?", "ideal": "hazel"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Hide under no tree.\"?", "ideal": "hunt"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"How our union saw Ed?\"?", "ideal": "house"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Hungry otters savored eels.\"?", "ideal": "hose"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Ferocious lions attacked trees.\"?", "ideal": "flat"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Pandas idly pickled eggplants.\"?", "ideal": "pipe"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Proud Lilly accused you.\"?", "ideal": "play"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Peter observer slight tingling.\"?", "ideal": "post"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Feature a cat tonight.\"?", "ideal": "fact"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Feathers right in Clark's truck ignite our noise.\"?", "ideal": "friction"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Vikings on international drive.\"?", "ideal": "void"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Did uncle Mitch believe Betty even laid low?\"?", "ideal": "dumbbell"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Zone E already lost.\"?", "ideal": "zeal"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Zebras often nibble eucalyptus.\"?", "ideal": "zone"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Wide entry truck.\"?", "ideal": "wet"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Which image does Ted hold?\"?", "ideal": "width"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"How easy is getting happy tonight?\"?", "ideal": "height"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Where is the house?\"?", "ideal": "with"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Ingmar gathered Nick's infinite track equipement.\"?", "ideal": "ignite"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Bats unexpectedly roost nearby.\"?", "ideal": "burn"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Snails lazily observe watermelons.\"?", "ideal": "slow"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Squirrels leap across neighboring gardens.\"?", "ideal": "slang"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Sleepy lions avoid yawning.\"?", "ideal": "slay"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Voracious elephants lumber over city intersections terrifying youngsters.\"?", "ideal": "velocity"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Vampires invited lunar eclipses.\"?", "ideal": "vile"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Lemurs often vocalize enthusiastically.\"?", "ideal": "love"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Cats routinely observe capybaras having eaten tarts.\"?", "ideal": "crochet"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Owls linger in void environments.\"?", "ideal": "olive"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Bumblebees eagerly approach radiant daffodils.\"?", "ideal": "beard"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Bears enjoy evening relaxation.\"?", "ideal": "beer"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Quails usually inhabit temperate environments.\"?", "ideal": "quite"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Queens usually inspire extraordinary trust.\"?", "ideal": "quiet"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Elephants never dream.\"?", "ideal": "end"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Cats adore relaxing enjoying soft sunlight.\"?", "ideal": "caress"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Sloths typically relax on knobby eucalyptus.\"?", "ideal": "stroke"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Send Ellie dice under crucial environment.\"?", "ideal": "seduce"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Kangaroos inhabit lush territories.\"?", "ideal": "kilt"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Can Lucy offer any kites?\"?", "ideal": "cloak"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Please remember I need courteous etiquette.\"?", "ideal": "prince"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Fragrant lilacs overgrow with every rain.\"?", "ideal": "flower"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Big umbrellas look kooky.\"?", "ideal": "bulk"}, {"prompt": "What is the word obtained from concatenating the first letters of the words in the following sentence: \"Just over budget.\"?", "ideal": "job"}], "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-first-letters", "sourceHandle": "prompt", "target": "eval-first-letters", "targetHandle": "responseBatch", "interactionWidth": 100, "markerEnd": {"type": "arrow", "width": "22px", "height": "22px"}, "id": "reactflow__edge-prompt-1686756357355prompt-eval-1686756357355responseBatch"}, {"source": "prompt-first-letters", "sourceHandle": "prompt", "target": "inspect-first-letters", "targetHandle": "input", "interactionWidth": 100, "markerEnd": {"type": "arrow", "width": "22px", "height": "22px"}, "id": "reactflow__edge-prompt-1686756357355prompt-inspect-1686756357355input"}, {"source": "eval-first-letters", "sourceHandle": "output", "target": "vis-first-letters", "targetHandle": "input", "interactionWidth": 100, "markerEnd": {"type": "arrow", "width": "22px", "height": "22px"}, "id": "reactflow__edge-eval-1686756357355output-vis-1686756357355input"}, {"source": "table-first-letters", "sourceHandle": "Prompt", "target": "prompt-first-letters", "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": {}}}