Fix getUniqueLLMMetavarKey bug + remove unnecessary deps

This commit is contained in:
Ian Arawjo 2023-07-20 15:40:15 -04:00
parent e8dc5d3d37
commit 69f52e7df9
7 changed files with 11 additions and 14 deletions

View File

@ -1,15 +1,15 @@
{
"files": {
"main.css": "/static/css/main.d97bf957.css",
"main.js": "/static/js/main.d8754033.js",
"main.js": "/static/js/main.690672fa.js",
"static/js/787.4c72bb55.chunk.js": "/static/js/787.4c72bb55.chunk.js",
"index.html": "/index.html",
"main.d97bf957.css.map": "/static/css/main.d97bf957.css.map",
"main.d8754033.js.map": "/static/js/main.d8754033.js.map",
"main.690672fa.js.map": "/static/js/main.690672fa.js.map",
"787.4c72bb55.chunk.js.map": "/static/js/787.4c72bb55.chunk.js.map"
},
"entrypoints": [
"static/css/main.d97bf957.css",
"static/js/main.d8754033.js"
"static/js/main.690672fa.js"
]
}

View File

@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><script async src="https://www.googletagmanager.com/gtag/js?id=G-RN3FDBLMCR"></script><script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","G-RN3FDBLMCR")</script><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="A visual programming environment for prompt engineering"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>ChainForge</title><script defer="defer" src="/static/js/main.d8754033.js"></script><link href="/static/css/main.d97bf957.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><script async src="https://www.googletagmanager.com/gtag/js?id=G-RN3FDBLMCR"></script><script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","G-RN3FDBLMCR")</script><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="A visual programming environment for prompt engineering"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>ChainForge</title><script defer="defer" src="/static/js/main.690672fa.js"></script><link href="/static/css/main.d97bf957.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>

View File

@ -38,9 +38,9 @@ const ensureUniqueName = (_name, _prev_names) => {
return new_name;
};
const getUniqueLLMMetavarKey = (responses) => {
const metakeys = new Set(responses.map(resp_obj => Object.keys(resp_obj.metavars)));
const metakeys = new Set(responses.map(resp_obj => Object.keys(resp_obj.metavars)).flat());
let i = 0;
while (`LLM_${i}` in metakeys)
while (metakeys.has(`LLM_${i}`))
i += 1;
return `LLM_${i}`;
};

View File

@ -6,7 +6,7 @@ def readme():
setup(
name='chainforge',
version='0.2.1.3',
version='0.2.1.4',
packages=find_packages(),
author="Ian Arawjo",
description="A Visual Programming Environment for Prompt Engineering",
@ -20,10 +20,7 @@ setup(
"flask>=2.2.3",
"flask[async]",
"flask_cors",
"flask_socketio",
"requests",
"python-socketio",
"gevent-websocket",
"urllib3==1.26.6",
"openai",
"anthropic",