diff options
author | Nate Sesti <sestinj@gmail.com> | 2023-09-25 00:30:00 -0700 |
---|---|---|
committer | Nate Sesti <sestinj@gmail.com> | 2023-09-25 00:30:00 -0700 |
commit | e1ce1fefee6a3f4c17ac568ba87cb7a4bcf65795 (patch) | |
tree | 43045a73a8a818abccaa16dd522ff20432fd4954 | |
parent | 043d695198caed305fa6651918c3bbb2de87db36 (diff) | |
download | sncontinue-e1ce1fefee6a3f4c17ac568ba87cb7a4bcf65795.tar.gz sncontinue-e1ce1fefee6a3f4c17ac568ba87cb7a4bcf65795.tar.bz2 sncontinue-e1ce1fefee6a3f4c17ac568ba87cb7a4bcf65795.zip |
feat: :memo: embeddings experimental walkthrough
-rw-r--r-- | continuedev/pyproject.toml | 2 | ||||
-rw-r--r-- | docs/docs/walkthroughs/codebase-embeddings.md | 44 | ||||
-rw-r--r-- | docs/sidebars.js | 1 |
3 files changed, 46 insertions, 1 deletions
diff --git a/continuedev/pyproject.toml b/continuedev/pyproject.toml index 552d8c9a..a66cb542 100644 --- a/continuedev/pyproject.toml +++ b/continuedev/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "continuedev" -version = "0.1.38" +version = "0.1.39" description = "" authors = ["Nate Sesti <sestinj@gmail.com>"] readme = "README.md" diff --git a/docs/docs/walkthroughs/codebase-embeddings.md b/docs/docs/walkthroughs/codebase-embeddings.md new file mode 100644 index 00000000..b181565b --- /dev/null +++ b/docs/docs/walkthroughs/codebase-embeddings.md @@ -0,0 +1,44 @@ +# Codebase Embeddings (Experimental) + +We're sharing an early look at an experimental plugin: codebase embeddings. By using the /codebase slash command, you will be able to ask a question and Continue will use similarity search to find the most relevant files to answer the question. + +While it is experimental, codebase embeddings will only be available through the PyPI package. Here are the steps to get started: + +1. In VS Code settings (cmd+,), search for "continue" and check the box that says "Manually Running Server" +2. `pip install --upgrade continuedev` to install the Continue PyPI package +3. `python -m continuedev` to start the Continue server +4. Open `~/.continue/config.py` and add the following, filling in your OpenAI API key: + +```python +from continuedev.plugins.steps.chroma import ( + AnswerQuestionChroma, + CreateCodebaseIndexChroma, +) +... + +config=ContinueConfig( + steps_on_startup=[ + CreateCodebaseIndexChroma( + openai_api_key="<OPENAI_API_KEY>" + ) + ], + ... + slash_commands=[ + ... + SlashCommand( + name="codebase", + description="Answer question after embeddings-based retrieval", + step=AnswerQuestionChroma, + params={ + "openai_api_key": "<OPENAI_API_KEY>" + }, + ), + ] +) +``` + +5. Reload the VS Code window to connect to the server you are running manually and allow the config changes to take effect +6. When you open a workspace, Continue will generate the embeddings. You can then enter '/codebase <QUESTION>' to ask a question with embeddings-based retrieval. +7. Please share feedback in [Discord](https://discord.gg/NWtdYexhMs)! + +> Note: There is a known bug that requires different imports for the PyPI package. If you encounter "No module named 'continuedev.src', you should replace all instances of 'continuedev.src.continuedev' in `config.py` with just 'continuedev'. diff --git a/docs/sidebars.js b/docs/sidebars.js index d7e0ceda..f5a8fdc8 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -41,6 +41,7 @@ const sidebars = { "walkthroughs/manually-run-continue", "walkthroughs/running-continue-without-internet", "walkthroughs/headless-mode", + "walkthroughs/codebase-embeddings", ], }, "development-data", |