mirror of
https://github.com/OMGeeky/gpt-pilot.git
synced 2026-01-22 01:58:10 +01:00
Add arguments for extension
This commit is contained in:
@@ -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=
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user