mirror of
https://github.com/ianarawjo/ChainForge.git
synced 2025-03-14 16:26:45 +00:00
* 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
1 line
15 KiB
Plaintext
1 line
15 KiB
Plaintext
{"flow": {"nodes": [{"width": 312, "height": 311, "id": "prompt-rhetorical-devices", "type": "prompt", "data": {"prompt": "{prompt}", "n": 1, "llms": [{"key": "aa3c0f03-22bd-416e-af4d-4bf5c4278c99", "settings": {"system_msg": "Which of the following rhetorical devices was added to the original sentence? Choose the most specific of the following (a) Alliteration, (b) Assonance, (c) Consonance, (d) Cacophony, (e) Onomatopoeia, (f) Anadiplosis, (g) Conduplicatio, (h) Anaphora, (i) Epistrophe, (j) Symploce, (k) Epanalepsis, (l) Epizeuxis, (m) Antanaclasis, (n) Diacope, (o) Antithesis, (p) Antimetabole, (q) Chiasmus, (r) Asyndeton, (s) Polysyndeton, (t) Catacosmesis, (u) Oxymoron, (v) Zeugma", "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": "Which of the following rhetorical devices was added to the original sentence? Choose the most specific of the following (a) Alliteration, (b) Assonance, (c) Consonance, (d) Cacophony, (e) Onomatopoeia, (f) Anadiplosis, (g) Conduplicatio, (h) Anaphora, (i) Epistrophe, (j) Symploce, (k) Epanalepsis, (l) Epizeuxis, (m) Antanaclasis, (n) Diacope, (o) Antithesis, (p) Antimetabole, (q) Chiasmus, (r) Asyndeton, (s) Polysyndeton, (t) Catacosmesis, (u) Oxymoron, (v) Zeugma", "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-rhetorical-devices", "type": "evaluator", "data": {"code": "function evaluate(response) {\n\tlet ideal = response.meta['Ideal'];\n\treturn response.text.includes(ideal);\n}", "language": "javascript"}, "position": {"x": 820, "y": 150}, "positionAbsolute": {"x": 820, "y": 150}}, {"width": 228, "height": 196, "id": "vis-rhetorical-devices", "type": "vis", "data": {"input": "eval-rhetorical-devices"}, "position": {"x": 1200, "y": 250}, "positionAbsolute": {"x": 1200, "y": 250}}, {"width": 302, "height": 260, "id": "inspect-rhetorical-devices", "type": "inspect", "data": {"input": "prompt-rhetorical-devices"}, "position": {"x": 820, "y": 400}, "positionAbsolute": {"x": 820, "y": 400}}, {"width": 423, "height": 417, "id": "table-rhetorical-devices", "type": "table", "data": {"rows": [{"prompt": "ORIGINAL She likes to listen to the winds. MODIFIED She swoons at such sweet gales. Reason step by step and provide your answer in the format (x) Rhetorical", "ideal": "Alliteration"}, {"prompt": "ORIGINAL The rock was very large. MODIFIED The rock was remarkably raised. Reason step by step and provide your answer in the format (x) Rhetorical", "ideal": "(a) Alliteration"}, {"prompt": "ORIGINAL Visionary dreams elevate me at night. MODIFIED Visionary reminitions elevate self resting in lightlessness. Reason step by step and provide your answer in the format (x) Rhetorical", "ideal": "(b) Assonance"}, {"prompt": "ORIGINAL Once, I thought I had lost her pet. MODIFIED Once, dunce \u2014 thought I lost Juliet's pet. Reason step by step and provide your answer in the format (x) Rhetorical", "ideal": "(b) Assonance"}, {"prompt": "ORIGINAL Do you want to understand research on artificial general intelligence? MODIFIED Don't you want to investigate artifacts of artificial general intelligence? Reason step by step and provide your answer in the format (x) Rhetorical", "ideal": "(c) Consonance"}, {"prompt": "ORIGINAL To wander makes me want a home. MODIFIED Land wander makes me fonder for some home. Reason step by step and provide your answer in the format (x) Rhetorical", "ideal": "(c) Consonance"}, {"prompt": "ORIGINAL I don't like mosquito bites at all. MODIFIED I dread to suffer mosquitoes' piercing shrill. Reason step by step and provide your answer in the format (x) Rhetorical", "ideal": "(d) Cacophony"}, {"prompt": "ORIGINAL Why did you leave me? MODIFIED Why did you slither thence? Reason step by step and provide your answer in the format (x) Rhetorical", "ideal": "(d) Cacophony"}, {"prompt": "ORIGINAL I like the sounds in ASMR videos. MODIFIED I relax in tickles and soothing hushes of A. S. M. R. Reason step by step and provide your answer in the format (x) Rhetorical", "ideal": "(e) Onomatopoeia"}, {"prompt": "ORIGINAL The turkey make a loud sound in the forest. MODIFIED The turkey's gobble echoed through the underbrush. Reason step by step and provide your answer in the format (x) Rhetorical", "ideal": "(e) Onomatopoeia"}, {"prompt": "ORIGINAL I like her coffee. She offers three flavors of it. MODIFIED I like her coffee. Coffee offered in three flavors. Reason step by step and provide your answer in the format (x) Rhetorical", "ideal": "(f) Anadiplosis"}, {"prompt": "ORIGINAL Science and technology advance human nature. You may not understand human nature even if you are a human. MODIFIED Science and technology advance human nature. Nature, even if your own, you may not understand. Reason step by step and provide your answer in the format (x) Rhetorical", "ideal": "(f) Anadiplosis"}, {"prompt": "ORIGINAL The birds are singing songs. It is very exciting to listen to them. MODIFIED Go forth. To tread the many paths, go forth. Free to wander forth. Reason step by step and provide your answer in the format (x) Rhetorical", "ideal": "(g) Conduplicatio"}, {"prompt": "ORIGINAL I love you. What about it? Your hair, smile, and emotions. MODIFIED I love you. What about you do I love? I love your hair. I love your smile. I love your emotions. Reason step by step and provide your answer in the format (x) Rhetorical", "ideal": "(h) Anaphora"}, {"prompt": "ORIGINAL Go forth. Explore the many paths. Be free to wander. MODIFIED Go forth. To tread the many paths, go forth. Free to wander forth. Reason step by step and provide your answer in the format (x) Rhetorical", "ideal": "(g) Conduplicatio"}, {"prompt": "ORIGINAL The robot looked at a pebble. It was not very impressive. The robot walked away, stepping on it. MODIFIED The robot looked at a pebble. It was not a very impressive pebble. The robot walked away, stepping on the pebble. Reason step by step and provide your answer in the format (x) Rhetorical", "ideal": "(i) Epistrophe"}, {"prompt": "ORIGINAL The town was running out of water. Everyone was worried about it. The riverbed was dry. The sky was cloudless. MODIFIED The town was running out of water. Everyone was worried about water. The riverbed had no water. The sky had no water. Reason step by step and provide your answer in the format (x) Rhetorical", "ideal": "(i) Epistrophe"}, {"prompt": "ORIGINAL Let the students go to recess to play. The children will be happy at recess. MODIFIED Let the students go to recess to play. Let Billy go to run. Let Sally go to jump rope. Let the children go to recess to be children. Reason step by step and provide your answer in the format (x) Rhetorical", "ideal": "(j) Symploce"}, {"prompt": "ORIGINAL There is no spoon, it's not there anymore. There is not a spoon in reality anymore. MODIFIED There is no spoon, there never was. There is no reality, only mind is. Reason step by step and provide your answer in the format (x) Rhetorical", "ideal": "(j) Symploce"}, {"prompt": "ORIGINAL Transhumanism allows people to live further in the future. MODIFIED The future is transhumanism, and transhumanists live in the future. Reason step by step and provide your answer in the format (x) Rhetorical", "ideal": "(k) Epanalepsis"}, {"prompt": "ORIGINAL \"Fear the Jolly Roger,\" the man whispered, trembling. MODIFIED \"Fear the Jolly Roger,\" the man whispered, trembling in fear. Reason step by step and provide your answer in the format (x) Rhetorical", "ideal": "(k) Epanalepsis"}, {"prompt": "ORIGINAL Never give up. MODIFIED Don't give up. Don't give up. Why are you quitting there? Just try a little harder. No, no, no! Don't give up. Reason step by step and provide your answer in the format (x) Rhetorical", "ideal": "(l) Epizeuxis"}, {"prompt": "ORIGINAL Please take a shower. MODIFIED Please, please, please take a shower. Reason step by step and provide your answer in the format (x) Rhetorical", "ideal": "(l) Epizeuxis"}, {"prompt": "ORIGINAL I tried to purchase a mouse online, but I wasn't able to use my computer. MODIFIED I would purchase a mouse online, but you see, I don't have a mouse. Reason step by step and provide your answer in the format (x) Rhetorical", "ideal": "(m) Antanaclasis"}, {"prompt": "ORIGINAL I don't want to be rude, but this school system does not even have the resources to teach us statistics. MODIFIED I don't mean to be mean, but this school system does not even have the means to teach us how to find means. Reason step by step and provide your answer in the format (x) Rhetorical", "ideal": "(m) Antanaclasis"}, {"prompt": "ORIGINAL Sir. Spare some change? MODIFIED Sir. Good sir. Spare some change? Reason step by step and provide your answer in the format (x) Rhetorical", "ideal": "(n) Diacope"}, {"prompt": "ORIGINAL Land ahoy! MODIFIED Ahoy! Land ahoy! Reason step by step and provide your answer in the format (x) Rhetorical", "ideal": "(n) Diacope"}, {"prompt": "ORIGINAL Nobody knows how to solve AI alignment. It is important for human safety that AI alignment is solved. MODIFIED Solving AI alignment is impossible, it must be solved quickly. Reason step by step and provide your answer in the format (x) Rhetorical", "ideal": "(o) Antithesis"}, {"prompt": "ORIGINAL I hate him. I don't care about him. MODIFIED I hate him. Yet still, I love. Reason step by step and provide your answer in the format (x) Rhetorical", "ideal": "(o) Antithesis"}, {"prompt": "ORIGINAL After everything I did, I was tired. I was actually tired. MODIFIED After all that, I was tired. I was tired after all. Reason step by step and provide your answer in the format (x) Rhetorical", "ideal": "(p) Antimetabole"}, {"prompt": "ORIGINAL I went around the world. The world is round. MODIFIED Around the world I went, the world around. Reason step by step and provide your answer in the format (x) Rhetorical", "ideal": "(p) Antimetabole"}, {"prompt": "ORIGINAL The sun rises in the morning and sets in the evening. MODIFIED The sun rises in the morning, and in the evening, it sets. Reason step by step and provide your answer in the format (x) Rhetorical", "ideal": "(q) Chiasmus"}, {"prompt": "ORIGINAL I gaze at the brewing coffee with anticipation: waiting for energy. MODIFIED Brewing coffee, I gaze at it in anticipation: awaiting energy. Reason step by step and provide your answer in the format (x) Rhetorical", "ideal": "(q) Chiasmus"}, {"prompt": "ORIGINAL Deliberately and methodologically the first seastead was launched. MODIFIED Deliberately, methodologically, the first seastead was launched. Reason step by step and provide your answer in the format (x) Rhetorical", "ideal": "(r) Asyndeton"}, {"prompt": "ORIGINAL To grow the three sisters plant corn on a mound, then squash between, and finally beans near the corn. MODIFIED To grow the three sisters plant corn high, squash low, beans to climb. Reason step by step and provide your answer in the format (x) Rhetorical", "ideal": "(r) Asyndeton"}, {"prompt": "ORIGINAL My favorite book is The Jungle by Upton Sinclair; A Fire Upon the Deep by Vernor Vinge; or PiHKAL: A Chemical Love Story by Dr. Alexander Shulgin and Ann Shulgin. MODIFIED My favorite book is The Jungle by Upton Sinclair; or A Fire Upon the Deep by Vernor Vinge; or PiHKAL: A Chemical Love Story by Dr. Alexander Shulgin and Ann Shulgin. Reason step by step and provide your answer in the format (x) Rhetorical", "ideal": "(s) Polysyndeton"}, {"prompt": "ORIGINAL I want to create AGI, build a spaceship, and live on Mars. MODIFIED I want to create AGI, and to build a spaceship, and to live on Mars. Reason step by step and provide your answer in the format (x) Rhetorical", "ideal": "(s) Polysyndeton"}, {"prompt": "ORIGINAL There are many reasons to play video games. MODIFIED Playing video games to transcend mortality, to play, and to procrastinate. Reason step by step and provide your answer in the format (x) Rhetorical", "ideal": "(t) Catacosmesis"}, {"prompt": "ORIGINAL I am always forgetting things. MODIFIED I forget my body, language, family, friends, and car keys. Reason step by step and provide your answer in the format (x) Rhetorical", "ideal": "(t) Catacosmesis"}, {"prompt": "ORIGINAL The vacuum of space is not empty. MODIFIED The vacuum of space is full of hydrogen. Reason step by step and provide your answer in the format (x) Rhetorical", "ideal": "(u) Oxymoron"}, {"prompt": "ORIGINAL Welding involves using high heat to melt parts together, causing fusion. MODIFIED Cold welding involves bringing two materials together under a vacuum, adhering them with Van der Waals forces. Reason step by step and provide your answer in the format (x) Rhetorical", "ideal": "(u) Oxymoron"}, {"prompt": "ORIGINAL In the end, our decisions earn money and form ourselves. MODIFIED In the end, we make money and ourselves. Reason step by step and provide your answer in the format (x) Rhetorical", "ideal": "(v) Zeugma"}, {"prompt": "ORIGINAL I rose to meet him. I improved myself to take on the challenge. MODIFIED I rose to meet him, and to the challenge. Reason step by step and provide your answer in the format (x) Rhetorical", "ideal": "(v) Zeugma"}], "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-rhetorical-devices", "sourceHandle": "prompt", "target": "eval-rhetorical-devices", "targetHandle": "responseBatch", "interactionWidth": 100, "markerEnd": {"type": "arrow", "width": "22px", "height": "22px"}, "id": "reactflow__edge-prompt-1686756357355prompt-eval-1686756357355responseBatch"}, {"source": "prompt-rhetorical-devices", "sourceHandle": "prompt", "target": "inspect-rhetorical-devices", "targetHandle": "input", "interactionWidth": 100, "markerEnd": {"type": "arrow", "width": "22px", "height": "22px"}, "id": "reactflow__edge-prompt-1686756357355prompt-inspect-1686756357355input"}, {"source": "eval-rhetorical-devices", "sourceHandle": "output", "target": "vis-rhetorical-devices", "targetHandle": "input", "interactionWidth": 100, "markerEnd": {"type": "arrow", "width": "22px", "height": "22px"}, "id": "reactflow__edge-eval-1686756357355output-vis-1686756357355input"}, {"source": "table-rhetorical-devices", "sourceHandle": "Prompt", "target": "prompt-rhetorical-devices", "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": {}}} |