addedmore logic

This commit is contained in:
Priyan Vaithilingam 2023-05-03 11:16:03 -04:00
parent 4c59c8f257
commit fbc77e0b61
3 changed files with 8 additions and 4 deletions

View File

@ -29,7 +29,7 @@ const ScriptNode = ({ data, id }) => {
useEffect(() => {
if (!data.scriptFiles)
setDataPropsForNode(id, { scriptFiles: { f0: '' } });
}, []);
}, [data.scriptFiles, id, setDataPropsForNode]);
// Whenever 'data' changes, update the input fields to reflect the current state.
useEffect(() => {
@ -42,7 +42,7 @@ const ScriptNode = ({ data, id }) => {
</div>
)
}));
}, [data.scriptFiles]);
}, [data.scriptFiles, handleInputChange]);
// Add a field
const handleAddField = useCallback(() => {

View File

@ -270,6 +270,12 @@ def execute():
for script_path in data['script_paths']:
# get the folder of the script_path:
script_folder = os.path.dirname(script_path)
# check that the script_folder is valid, and it contains __init__.py
if not os.path.exists(script_folder):
print(script_folder, 'is not a valid script path.')
print(os.path.exists(script_folder))
continue
# add it to the path:
sys.path.append(script_folder)
print(f'added {script_folder} to sys.path')

View File

@ -8,8 +8,6 @@ DALAI_RESPONSE = None
openai.api_key = os.environ.get("OPENAI_API_KEY")
""" Supported LLM coding assistants """
class LLM(Enum):
ChatGPT = 0