Skip to content

Commit

Permalink
more config help
Browse files Browse the repository at this point in the history
  • Loading branch information
pelikhan committed Mar 22, 2024
1 parent 8512dd0 commit ed8b199
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 6 deletions.
Binary file added docs/src/assets/vscode-insiders.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/assets/vscode-select-llm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
80 changes: 74 additions & 6 deletions docs/src/content/docs/getting-started/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -147,19 +147,87 @@ OPENAI_API_KEY=http://localhost:...
Visual Studio Code Insiders provides an **experimental**
support to use the Copilot subscription to access a LLM.

#### Limitations
:::tip[Limitations]

- This feature is still a [proposed api](https://github.com/microsoft/vscode/blob/main/src/vscode-dts/vscode.proposed.languageModels.d.ts) and requires the **Insiders** editor.
- **This feature is still a [proposed api](https://github.com/microsoft/vscode/blob/main/src/vscode-dts/vscode.proposed.languageModels.d.ts) and requires the Insiders editor.**
- The API changes daily and may not be stable.
- Functions and Images are not supported.
- The model configuration, temperature, max tokens, may not be available depending on the language model provider.
- Some scripts may fail or behave differently due to internal alignment prompts from Copilot.

:::caution
:::

Requires running the Visual Studio Code Insiders edition and
installing the **genaiscript.insiders.vsix** extension.
<Steps>

:::
<ol>

<li>

Install [Visual Studio Code **Insiders**](https://code.visualstudio.com/insiders/).
It can be installed side-by-side with the stable version of Visual Studio Code.

</li>

<li>

Open your project in Visual Studio Code Insiders (green icon).

![Visual Studio Code Insiders Icon is green](../../../assets/vscode-insiders.png)

</li>

<li>

Download **genaiscript.insiders.vsix** from the [releases page](https://github.com/microsoft/genaiscript/releases/latest)
to your project folder.

<FileTree>

- ...
- **genaiscript.insiders.vsix**

</FileTree>

</li>

<li>

Right click on **genaiscript.insiders.vsix** and select **Install from VSIX**.

</li>

<li>

Add a `.vscode-insiders/argv.json` file to enables loading the proposed APIs for the GenAIScript extension.

```json title=".vscode-insiders/argv.json"
{
"enable-proposed-api": ["genaiscript.genaiscript-vscode"]
}
```

</li>

<li>

Restart Visual Studio Code Insiders to enable the extension.

</li>

<li>

When you try to run a script, you will be prompted to authorize the Copilot subscription.
After authorizing access, you will see a quick pick dialog to select one of the installed Language Model.

![Visual Studio Code Insiders Icon is green](../../../assets/vscode-select-llm.png)

Note that this dialog is not used once you have a populated `.env` file.

</li>

</ol>

</Steps>

## Next steps

Expand Down

0 comments on commit ed8b199

Please sign in to comment.