mirror of
https://github.com/ianarawjo/ChainForge.git
synced 2025-03-22 20:05:18 +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
9.3 KiB
Plaintext
1 line
9.3 KiB
Plaintext
{"flow": {"nodes": [{"width": 312, "height": 311, "id": "prompt-seating_arrangements", "type": "prompt", "data": {"prompt": "{prompt}", "n": 1, "llms": [{"key": "aa3c0f03-22bd-416e-af4d-4bf5c4278c99", "settings": {"system_msg": "You are a helpful assistant who creates seating arrangements for people in a single row at a long table. Loners want to sit at one end of the table, friends need to be seated next to each other, and enemies should not be seated next to each other. You will print seating arrangements in the form of person names separated by the | character like so Tim | Jeremey | Ana.", "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 who creates seating arrangements for people in a single row at a long table. Loners want to sit at one end of the table, friends need to be seated next to each other, and enemies should not be seated next to each other. You will print seating arrangements in the form of person names separated by the | character like so Tim | Jeremey | Ana.", "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-seating_arrangements", "type": "evaluator", "data": {"code": "function evaluate(response) {\n\tlet ideals = JSON.parse(response.meta['Ideal']);\n\treturn ideals.some(i => response.text.includes(i));\n}", "language": "javascript"}, "position": {"x": 820, "y": 150}, "positionAbsolute": {"x": 820, "y": 150}}, {"width": 228, "height": 196, "id": "vis-seating_arrangements", "type": "vis", "data": {"input": "eval-seating_arrangements"}, "position": {"x": 1200, "y": 250}, "positionAbsolute": {"x": 1200, "y": 250}}, {"width": 302, "height": 260, "id": "inspect-seating_arrangements", "type": "inspect", "data": {"input": "prompt-seating_arrangements"}, "position": {"x": 820, "y": 400}, "positionAbsolute": {"x": 820, "y": 400}}, {"width": 423, "height": 417, "id": "table-seating_arrangements", "type": "table", "data": {"rows": [{"prompt": "Please provide a valid seating arragement for the following requirements: Daniel and Sophia are enemies, Sophia and Charlotte are enemies, Olivia and Daniel are friends, Daniel and Benjamin are friends, Benjamin and Charlotte are friends.", "ideal": "[\"Charlotte | Benjamin | Daniel | Olivia | Sophia\", \"Sophia | Olivia | Daniel | Benjamin | Charlotte\"]"}, {"prompt": "Please provide a valid seating arragement for the following requirements: Eleanor is a loner, Samuel and Christopher are enemies, Emma is a loner, Samuel and Eleanor are enemies.", "ideal": "[\"Eleanor | Christopher | Scarlett | Samuel | Emma\", \"Emma | Samuel | Scarlett | Christopher | Eleanor\"]"}, {"prompt": "Please provide a valid seating arragement for the following requirements: Nathan and Samuel are enemies, David and Samuel are friends, Olivia and Samuel are friends, Olivia is a loner, David and Victoria are friends.", "ideal": "[\"Nathan | Victoria | David | Samuel | Olivia\", \"Olivia | Samuel | David | Victoria | Nathan\"]"}, {"prompt": "Please provide a valid seating arragement for the following requirements: Olivia and Eleanor are enemies, Grace and Olivia are friends, Eleanor and Alexander are enemies, Scarlett and Olivia are friends, Grace and Eleanor are enemies.", "ideal": "[\"Eleanor | Scarlett | Olivia | Grace | Alexander\", \"Alexander | Grace | Olivia | Scarlett | Eleanor\"]"}, {"prompt": "Please provide a valid seating arragement for the following requirements: Ava and Christopher are friends, Isaac and Benjamin are enemies, David and Ava are friends, Christopher and Benjamin are enemies.", "ideal": "[\"Benjamin | David | Ava | Christopher | Isaac\", \"Isaac | Christopher | Ava | David | Benjamin\"]"}, {"prompt": "Please provide a valid seating arragement for the following requirements: Sophia and Ethan are friends, Matthew and Ethan are enemies, Sophia and Ava are friends, Daniel is a loner, Matthew and Daniel are enemies.", "ideal": "[\"Daniel | Ethan | Sophia | Ava | Matthew\", \"Matthew | Ava | Sophia | Ethan | Daniel\"]"}, {"prompt": "Please provide a valid seating arragement for the following requirements: Benjamin and Isaac are enemies, Isaac and Scarlett are friends, Scarlett and Benjamin are friends, Benjamin and Charlotte are friends, Matthew and Isaac are friends.", "ideal": "[\"Matthew | Isaac | Scarlett | Benjamin | Charlotte\", \"Charlotte | Benjamin | Scarlett | Isaac | Matthew\"]"}, {"prompt": "Please provide a valid seating arragement for the following requirements: Isaac and Samuel are friends, Olivia and David are enemies, David and Samuel are friends, Olivia and Isaac are enemies, David and Ava are enemies.", "ideal": "[\"Olivia | Ava | Isaac | Samuel | David\", \"David | Samuel | Isaac | Ava | Olivia\"]"}, {"prompt": "Please provide a valid seating arragement for the following requirements: Benjamin and Matthew are friends, Charlotte and Isaac are enemies, Grace and Benjamin are friends, Matthew and Isaac are friends.", "ideal": "[\"Charlotte | Grace | Benjamin | Matthew | Isaac\", \"Isaac | Matthew | Benjamin | Grace | Charlotte\"]"}, {"prompt": "Please provide a valid seating arragement for the following requirements: Scarlett and Nathan are friends, Charlotte and Benjamin are enemies, Benjamin and Nathan are friends, Charlotte and Olivia are friends, Benjamin and Olivia are friends.", "ideal": "[\"Charlotte | Olivia | Benjamin | Nathan | Scarlett\", \"Scarlett | Nathan | Benjamin | Olivia | Charlotte\"]"}, {"prompt": "Please provide a valid seating arragement for the following requirements: David and Daniel are friends, Victoria and Daniel are enemies, Victoria and Alexander are enemies, Daniel and Alexander are friends, Victoria and Samuel are friends, Victoria and David are friends.", "ideal": "[\"Samuel | Victoria | David | Daniel | Alexander\", \"Alexander | Daniel | David | Victoria | Samuel\"]"}, {"prompt": "Please provide a valid seating arragement for the following requirements: Ethan and Sophia are enemies, Eleanor and Sophia are friends, Matthew and Eleanor are enemies, Daniel and Ethan are enemies, Ethan and Eleanor are enemies, Eleanor and Daniel are friends, Sophia and Matthew are friends.", "ideal": "[\"Daniel | Eleanor | Sophia | Matthew | Ethan\", \"Ethan | Matthew | Sophia | Eleanor | Daniel\"]"}, {"prompt": "Please provide a valid seating arragement for the following requirements: Victoria and Charlotte are enemies, Olivia and Charlotte are friends, Charlotte and Sophia are friends, Scarlett and Victoria are enemies, Scarlett and Sophia are friends.", "ideal": "[\"Scarlett | Sophia | Charlotte | Olivia | Victoria\", \"Victoria | Olivia | Charlotte | Sophia | Scarlett\"]"}, {"prompt": "Please provide a valid seating arragement for the following requirements: Matthew is a loner, Matthew and Nathan are friends, Nathan and Grace are enemies, Nathan and Victoria are friends, David and Victoria are friends.", "ideal": "[\"Matthew | Nathan | Victoria | David | Grace\", \"Grace | David | Victoria | Nathan | Matthew\"]"}, {"prompt": "Please provide a valid seating arragement for the following requirements: Charlotte and Scarlett are enemies, Scarlett and Nathan are enemies, Benjamin and Charlotte are enemies, Benjamin and Scarlett are friends, Scarlett is a loner, Nathan is a loner.", "ideal": "[\"Scarlett | Benjamin | Lily | Charlotte | Nathan\", \"Nathan | Charlotte | Lily | Benjamin | Scarlett\"]"}], "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-seating_arrangements", "sourceHandle": "prompt", "target": "eval-seating_arrangements", "targetHandle": "responseBatch", "interactionWidth": 100, "markerEnd": {"type": "arrow", "width": "22px", "height": "22px"}, "id": "reactflow__edge-prompt-1686756357355prompt-eval-1686756357355responseBatch"}, {"source": "prompt-seating_arrangements", "sourceHandle": "prompt", "target": "inspect-seating_arrangements", "targetHandle": "input", "interactionWidth": 100, "markerEnd": {"type": "arrow", "width": "22px", "height": "22px"}, "id": "reactflow__edge-prompt-1686756357355prompt-inspect-1686756357355input"}, {"source": "eval-seating_arrangements", "sourceHandle": "output", "target": "vis-seating_arrangements", "targetHandle": "input", "interactionWidth": 100, "markerEnd": {"type": "arrow", "width": "22px", "height": "22px"}, "id": "reactflow__edge-eval-1686756357355output-vis-1686756357355input"}, {"source": "table-seating_arrangements", "sourceHandle": "Prompt", "target": "prompt-seating_arrangements", "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": {}}} |