ChainForge/chainforge/oaievals/simple_physics_engine.cforge

1 line
14 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-simple_physics_engine", "type": "prompt", "data": {"prompt": "{prompt}", "n": 1, "llms": [{"key": "aa3c0f03-22bd-416e-af4d-4bf5c4278c99", "settings": {"system_msg": "Below is a diagram of a small, simple physics simulator.\nHere's the ruleset for the physics engine:\nThe direction of up is the first line. The direction of down is represented by the last line.\nThe ball, represented by \u25e6 will fall down due to gravity. \nThe ball begins with only downward momentum.\nThe right ramp, represented by \u25e3 will cause the ball to roll 1) down to its own level and 2) an indefinite number of spaces to the right until it is stopped by another object.\nThe left ramp, represented by \u25e2 will cause the ball to roll 1) down to its own level and 2) an indefinite number of spaces to the left until it is stopped by another object.\nThe ball will continue rolling left or right even after it falls one or more levels.\nIf the ball should be both falling and traveling left or right, it will always fall downward though its horizontal momentum will be converted to the next level.\nIf a ball is traveling horizontally while it encounters a ramp, it will come to a stop. It will not roll up any ramp.\nThe block, represented by \u25a0, prevents the ball from falling further down, or from rolling further left or right.\nThe ball can fall off a block to a lower level.\nThe walls and floor are also represented by \u25a0 characters.\nAir is represented by the \u25af character. It has no effect on the movement of the ball.\nThe ball will always come to rest in an air space. It will not take the place of any other object.\nFriction and air resistance are not present in this simulator.\n\nTry reasoning through the movement of the ball step by step.\nProvide your answer by reproducing the full, final state of the simulation using the character key provided.\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": "Below is a diagram of a small, simple physics simulator.\nHere's the ruleset for the physics engine:\nThe direction of up is the first line. The direction of down is represented by the last line.\nThe ball, represented by \u25e6 will fall down due to gravity. \nThe ball begins with only downward momentum.\nThe right ramp, represented by \u25e3 will cause the ball to roll 1) down to its own level and 2) an indefinite number of spaces to the right until it is stopped by another object.\nThe left ramp, represented by \u25e2 will cause the ball to roll 1) down to its own level and 2) an indefinite number of spaces to the left until it is stopped by another object.\nThe ball will continue rolling left or right even after it falls one or more levels.\nIf the ball should be both falling and traveling left or right, it will always fall downward though its horizontal momentum will be converted to the next level.\nIf a ball is traveling horizontally while it encounters a ramp, it will come to a stop. It will not roll up any ramp.\nThe block, represented by \u25a0, prevents the ball from falling further down, or from rolling further left or right.\nThe ball can fall off a block to a lower level.\nThe walls and floor are also represented by \u25a0 characters.\nAir is represented by the \u25af character. It has no effect on the movement of the ball.\nThe ball will always come to rest in an air space. It will not take the place of any other object.\nFriction and air resistance are not present in this simulator.\n\nTry reasoning through the movement of the ball step by step.\nProvide your answer by reproducing the full, final state of the simulation using the character key provided.\n", "temperature": 1, "functions": "", "function_call": "", "top_p": 1, "stop": "", "presence_penalty": 0, "frequency_penalty": 0}}]}, "position": {"x"