Skip to content

Commit 25a7677

Browse files
committed
Add OpenAI API configuration example to README and clarify getting started instructions
1 parent d30fefe commit 25a7677

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,22 @@ current features implemented:
1313
## Getting Started
1414
Visit [vscode-scalajs-hello](https://github.com/doofin/vscode-scalajs-hello) to understand how to play with scala.js for VSCode extension development. Basically, sbt is used to build the project and run the extension.
1515

16+
Before loading the extension, you need to add options to vscode user settings, and provide your OpenAI compatible API key and URL. Here is an example:
17+
18+
```json
19+
"functorcoder": {
20+
"apiKey": "somekey",
21+
"apiUrl": "https://api.openai.com/v1/chat/completions",
22+
"maxTokens": 512,
23+
"model": "gpt-4o-mini",
24+
}
25+
```
26+
1627
## Project Structure
1728
The project is divided into two main parts: the core module and the VSCode extension module under /src/main/scala/functorcoder and /src/main/scala/vscextension respectively.
1829

30+
**To get started**, read the file `extensionMain.scala` in the VSCode extension module. It is the main entry point for the extension.
31+
1932
The first part is the core module, containing the main logic of the AI coding assistant:
2033
- Large Language Model (LLM) integration
2134
- sending propmt to LLM and getting the response

src/main/scala/vscextension/extensionMain.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import scala.scalajs.js.annotation.JSExportTopLevel
55

66
import typings.vscode.mod as vscode
77

8-
98
object extensionMain {
109

1110
/** The main entry for the extension, called when activated first time.

0 commit comments

Comments
 (0)