Add arguments for extension

This commit is contained in:
pavel-pythagora
2023-09-28 13:29:21 +03:00
parent d300e9980a
commit 103b920cb7
3 changed files with 5 additions and 2 deletions

View File

@@ -1,7 +1,7 @@
# OPENAI or AZURE or OPENROUTER
ENDPOINT=OPENAI
OPENAI_ENDPOINT=
OPENAI_ENDPOINT=https://api.openai.com/v1/chat/completions
OPENAI_API_KEY=
AZURE_API_KEY=

View File

@@ -2,6 +2,7 @@
from __future__ import print_function, unicode_literals
import builtins
import json
import os
import sys
import traceback
@@ -76,6 +77,8 @@ if __name__ == "__main__":
try:
args = init()
builtins.print, ipc_client_instance = get_custom_print(args)
if '--api-key' in args:
os.environ["OPENAI_API_KEY"] = args['--api-key']
if '--get-created-apps-with-steps' in args:
print({ 'db_data': get_created_apps_with_steps() }, type='info')
else:

View File

@@ -20,7 +20,7 @@ def setup_workspace(args):
return args['workspace']
root = get_parent_folder('pilot')
root = args['root'] or get_parent_folder('pilot')
create_directory(root, 'workspace')
project_path = create_directory(os.path.join(root, 'workspace'), args['name'])
create_directory(project_path, 'tests')