This commit is contained in:
Nate Sesti 2023-07-03 22:18:43 -07:00
commit ce36d1e516
5 changed files with 42 additions and 0 deletions

View file

@ -44,6 +44,17 @@ Let Continue build the scaffolding of Python scripts, React components, and more
### [Download for VS Code](https://marketplace.visualstudio.com/items?itemName=Continue.continue)
## OpenAI API Key
New users can try out Continue with GPT-4 using a proxy server that securely makes calls to OpenAI using our API key. Continue should just work the first time you install the extension in VS Code.
Once you are using Continue regularly though, you will need to add an OpenAI API key that has access to GPT-4 by following these steps:
1. Copy your API key from https://platform.openai.com/account/api-keys
2. Use the `cmd`+`,` (Mac) / `ctrl`+`,` (Windows) to open your VS Code settings
3. Type "Continue" in the search bar
4. Click `Edit in settings.json` under **Continue: OpenAI_API_KEY" section**
5. Paste your API key as the value for "continue.OPENAI_API_KEY" in `settings.json`
## License
[Apache 2.0 © 2023 Continue Dev, Inc.](./LICENSE)

View file

@ -49,6 +49,11 @@ class ContinueConfig(BaseModel):
description="Reply to instructions or a question with previous steps and the highlighted code or current file as context",
step_name="SimpleChatStep",
),
SlashCommand(
name="config",
description="Open the config file to create new and edit existing slash commands",
step_name="OpenConfigStep",
),
SlashCommand(
name="comment",
description="Write comments for the current file or highlighted code",

View file

@ -12,6 +12,7 @@ from ...recipes.DDtoBQRecipe.main import DDtoBQRecipe
from ...recipes.DeployPipelineAirflowRecipe.main import DeployPipelineAirflowRecipe
from ...steps.on_traceback import DefaultOnTracebackStep
from ...steps.clear_history import ClearHistoryStep
from ...steps.open_config import OpenConfigStep
# This mapping is used to convert from string in ContinueConfig json to corresponding Step class.
# Used for example in slash_commands and steps_on_startup
@ -27,6 +28,7 @@ step_name_to_step_class = {
"DeployPipelineAirflowRecipe": DeployPipelineAirflowRecipe,
"DefaultOnTracebackStep": DefaultOnTracebackStep,
"ClearHistoryStep": ClearHistoryStep,
"OpenConfigStep": OpenConfigStep
}

View file

@ -0,0 +1,13 @@
from ..core.main import Step
from ..core.sdk import ContinueSDK
import os
class OpenConfigStep(Step):
name: str = "Open config"
async def run(self, sdk: ContinueSDK):
global_dir = os.path.expanduser('~/.continue')
config_path = os.path.join(global_dir, 'config.json')
print(config_path)
await sdk.ide.setFileOpen(config_path)

View file

@ -25,6 +25,17 @@ Let Continue build the scaffolding of Python scripts, React components, and more
- `Write Python in a new file to get Posthog events`
- `Add a React component for syntax highlighted code`
## OpenAI API Key
New users can try out Continue with GPT-4 using a proxy server that securely makes calls to OpenAI using our API key. Continue should just work the first time you install the extension in VS Code.
Once you are using Continue regularly though, you will need to add an OpenAI API key that has access to GPT-4 by following these steps:
1. Copy your API key from https://platform.openai.com/account/api-keys
2. Use the `cmd`+`,` (Mac) / `ctrl`+`,` (Windows) to open your VS Code settings
3. Type "Continue" in the search bar
4. Click `Edit in settings.json` under **Continue: OpenAI_API_KEY" section**
5. Paste your API key as the value for "continue.OPENAI_API_KEY" in `settings.json`
## License
[Apache 2.0 © 2023 Continue Dev, Inc.](./LICENSE)