From e1ce1fefee6a3f4c17ac568ba87cb7a4bcf65795 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Mon, 25 Sep 2023 00:30:00 -0700 Subject: feat: :memo: embeddings experimental walkthrough --- continuedev/pyproject.toml | 2 +- docs/docs/walkthroughs/codebase-embeddings.md | 44 +++++++++++++++++++++++++++ docs/sidebars.js | 1 + 3 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 docs/docs/walkthroughs/codebase-embeddings.md 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 "] 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="" + ) + ], + ... + slash_commands=[ + ... + SlashCommand( + name="codebase", + description="Answer question after embeddings-based retrieval", + step=AnswerQuestionChroma, + params={ + "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 ' 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", -- cgit v1.2.3-70-g09d2