From 805984f0ad1a68470393f596c1fb98c82058b146 Mon Sep 17 00:00:00 2001 From: Nate Sesti <33237525+sestinj@users.noreply.github.com> Date: Tue, 23 Jul 2024 13:12:03 -0700 Subject: [PATCH] Improved walkDir performance (#1814) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Nate/control plane client (#1691) * docs: add docs and schema for "OS" provider (#1536) * ignore .env * fix(gui): ctx rendering w/ renderInlineAs: "" (#1541) * ✨ use and cache imports for autocomplete (#1456) * ✨ use and cache imports for autocomplete * fix tsc * fix codeqwen autocomplete leading space * add voyage rerank-1 * feat: `--noEmit` for tsc checks in CI (#1559) * docs: update CustomContextProvider docs (#1557) * add stop tokens to qwen prompt * update docs to reflect 3.5 sonnet being best * docs: comment out unused providers (#1561) * import Handlebars * feat: toast notification for config updates (#1560) * feat: toast notification for config updates * feat: only trigger toast on config.json save * displayRawMarkdown option * feat: open pane on install (#1564) * feat: open pane on activation * comment out testing code * update to reflect 16 stop words limit for deepseek * feat: only trigger config update toast in vscode (#1571) * docs(prompt-files): fix typos + clarify (#1575) * doc: prompt file typo + clarifications * fix: add back correct docs * chore: add telemetry for pageviews (#1576) * feat: update onboarding w/ embeddings model (#1570) * chore(gui): remove unused pages * feat: add embeddings step * feat: update styles * feat: copy button updates * fix: correct pull command for embed model * fix: remove commented code * fix: remove commented code * feat: simplify copy btn props * chore: rename onboarding selection event * feat: add provider config * fix: undo msg name * remove dead code * fix: invalid mode check * fix: remove testing logic * docs(telemetry): add pageviews to tracking list (#1581) * Add reranker configuration options to codebase embedding docs (#1584) - Introduce reranker concept - List available reranker options - Provide configuration instructions - Update keywords to include "reranker" * chore: update pr template with screenshots (#1590) * Refactor ConfirmationDialog to use SecondaryButton for cancel action (#1586) * Added instructions for running docs server locally (#1578) - Added NPM script method - Added VS Code task method - Update contributing guidelines * Update branch policy (#1577) - Change PR target to `dev` branch - Update `CONTRIBUTING.md` instructions * Consolidate example configurations into the main configuration guide (#1579) - Moved examples to configuration.md - Deleted the separate examples.md file - Updated sidebar order and links - Improved readability and structure in configuration.md * fix: fullscreen gui retains context when hidden, fixed fullscreen focusing (#1582) * Update completionProvider.ts (warning tab-autocomplete models) (#1566) * feat: enhanced IndexingProgressBar with blinking dot feature - Integrated BlinkingDot component - Added STATUS_COLORS for various states - Replaced CircleDiv with BlinkingDot in UI - Updated status messages and layout * small UI tweaks * feat(gui): enhance ModelCard, ModelProviderTag, and Toggle components (#1595) - add styling and adjustments to ModelCard - update ModelProviderTag font size - remove box shadow from Toggle component - tweak icon styles in ModelCard - improve alignment and spacing * media query * feat: add best experience onboarding * fix: file rename * stop movement on button hover by keeping same border thickness * fix mistake in setting cursor: pointer * fix when free trial option is shown * Support Node.js versions below 20 for streaming response handling (#1591) - Add fallback for Node < 20 - Implement toAsyncIterable for streaming - Use TextDecoder for manual decoding - Maintain existing streaming for Node 20+ * small fixes * feat: add free trial card to onboarding (#1600) * feat: add free trial card to onboarding * add import * fix hasPassedFTL * fix /edit cancellation from UI * feat: add `applyCodeBlock` experimental prop (#1601) * feat: add new model styling improvements (#1609) * feat: add new model styling improvements * better gap size * feat: update bug_report.yml (#1610) * chore: update bug_report.yml * typo fix * feat: add labels to "Add docs" dialog (#1612) * feat: add labels to "Add docs" dialog * remove autofocus * don't double load config * small fixes * speed up directory traversal, and use correct native path module * option not to show config update toast * merge air-gapped and recommended setup pages * chore: add telemetry for full screen toggle (#1618) * Fix headings in codebase-embeddings.md (#1617) * mention jetbrains * docs: update changie (#1619) * feat: updated changie config * hide toc and autogenerate * Update changelog.mdx * link to deeper explanation of embeddings models * ensure target="_blank" for all links in sidebar * fix gif links in intellij README.md * don't require rust in dependency installation * chore: fix padding on gh button (#1620) * chore: adjust button padding * Update tasks.json * escape colons in diff path * smoother lancedb indexing reporting * smooth progress updates for indexing * fix tsc err * rerank-lite-1 * remove doccs * basic tests for VS Code extension * improved testing of VS Code extension * docs: add docs and schema for "OS" provider (#1536) * ignore .env * 🚑 fix constant warnings when onboarding with Ollama * ✨ use and cache imports for autocomplete (#1456) * ✨ use and cache imports for autocomplete * fix tsc * team analytics * apply control plane settings * workos auth * ide protocol get session info * UI for auth * profile switching * small fixes * updates * refresh tokens * updates * fix tsc errs * model select in toolbar to make room for profile selector * prod client id * link to prod URL * internal beta option * profiles change listener --------- Co-authored-by: Patrick Erichsen Co-authored-by: Priyash <38959321+priyashpatil@users.noreply.github.com> Co-authored-by: Jonah Wagner Co-authored-by: YohannZe <99359799+YohannZe@users.noreply.github.com> Co-authored-by: Dan Dascalescu * temporary patch for type errs * Dev (#1689) * Fix an issue where CMD+K does not clear the terminal when the terminal has focus (#1671) On MacOS, ⌘+K is bound, by default, to Terminal:Clear. Without this change ⌘+K does not clear the terminal but instead iniates a chord sequence and waits for the next stroke of the chord. Co-authored-by: Rob Leidle * Change treeSitter to cache the Language objects it loads from wasm (#1672) Without this change, for a repository with 600 typescript files, the indexer would fail to finish correctly and there would be many of the following errors in the webview console log: 'Unable to load language for file ${path} RuntimeError: table index is out of bounds' The following bash will create a repo that reproduces the problem: current_path="." for ((i=1; i<=20; i++)); do new_folder="folder-$i" mkdir -p "$current_path/$new_folder" current_path="$current_path/$new_folder" for ((a=1; a<=30; a++)); do head -c 10000 /dev/urandom | base64 > "$current_path/file-$a.ts" done done Co-authored-by: Rob Leidle * acknowledge sourcemap flag in esbuild.js * don't run jetbrains-release.yaml on vscode releases * further testing for walkDir * chore: add telemetry to commands (#1673) * test: Add basic unit test to baseLLM (#1668) * update version * test: Add basic unit test to baseLLM --------- Co-authored-by: Nate Sesti Co-authored-by: inimaz * feat: add Quick Actions CodeLens feature (#1674) * docs: add docs and schema for "OS" provider (#1536) * ignore .env * ✨ use and cache imports for autocomplete (#1456) * ✨ use and cache imports for autocomplete * fix tsc * add voyage rerank-1 * import Handlebars * feat: open pane on install (#1564) * feat: open pane on activation * comment out testing code * chore: add telemetry for pageviews (#1576) * feat: update onboarding w/ embeddings model (#1570) * chore(gui): remove unused pages * feat: add embeddings step * feat: update styles * feat: copy button updates * fix: correct pull command for embed model * fix: remove commented code * fix: remove commented code * feat: simplify copy btn props * chore: rename onboarding selection event * feat: add provider config * fix: undo msg name * remove dead code * fix: invalid mode check * fix: remove testing logic * fix: fullscreen gui retains context when hidden, fixed fullscreen focusing (#1582) * small UI tweaks * media query * feat: add best experience onboarding * small fixes * feat: add free trial card to onboarding (#1600) * feat: add free trial card to onboarding * add import * chore: add telemetry for full screen toggle (#1618) * rerank-lite-1 * remove doccs * basic tests for VS Code extension * improved testing of VS Code extension * manually implement stop tokens for hf inference api * chore: onboarding metrics (#1626) * fix: pageview tracking * feat: add onboarding telemetry * create single `onboardingStatus` type * improved var naming * remove console logs * fix windows performance issue * rename vscodeExtension.ts * migration of onboarding variables * "stash" instead of "delete" in indexing progress * fix preview.yaml * also fix main.yaml * Update troubleshooting.md (#1637) * feat: add quick actions * Update index.d.ts * quick actions mvp * update docs * subscribe to vscode change settings * Update commands.ts * cleanup * Update quick-actions.md * Update VerticalPerLineCodeLensProvider.ts * resolve feedback --------- Co-authored-by: Nate Sesti Co-authored-by: Nate Sesti <33237525+sestinj@users.noreply.github.com> Co-authored-by: Jonah Wagner * chore: add `isCommandEvent` to command telemetry (#1675) * chore: add `isCommandEvent` to command telemetry * Update commands.ts * Nate/better retrieval (#1677) * deduplicatearray tests * break out separate retrieval pipelines * IConfigHandler * tests for codebase indexer * better .continueignore for continue * indexing fixes * ignore .gitignore and .continueignore when indexing * retrieval pipeline improvements * fix formatting err in out .continueignore * add necessary filter to lance_db_cache * update package.json version * skip unused tests * don't ignore .prompt files * update version * Update pull_request_template.md * don't use multi-media format when there are multiple text items * add free trial experience (#1685) * fix: add code range for quick actions/fixes (#1687) * fix: add code range for quick actions/fixes * Update test.js * add pathSep message type * docs improvements * jetbrains fix * update package.json version --------- Co-authored-by: Rob Leidle Co-authored-by: Rob Leidle Co-authored-by: Patrick Erichsen Co-authored-by: inimaz <49730431+inimaz@users.noreply.github.com> Co-authored-by: inimaz Co-authored-by: Jonah Wagner Co-authored-by: Priyash <38959321+priyashpatil@users.noreply.github.com> * update package.json version * skip extension tests * update package.json version * handlebars import * don't push package.json version change from CI * fix: scroll issues w/ code blocks (#1688) * fix: scroll issues w/ code blocks * chore: name offset * chore: remove docs start * chore: update headings on troubleshooting.md (#1696) * ignore .svn folder for indexing (#1699) * chore: clearer naming for `useSuffix` (#1702) * chore: clearer naming for `useSuffix` * schema updates * fix: cmd+shft+l closes sidebar if focused (#1638) * docs: add docs and schema for "OS" provider (#1536) * ignore .env * ✨ use and cache imports for autocomplete (#1456) * ✨ use and cache imports for autocomplete * fix tsc * add voyage rerank-1 * import Handlebars * feat: open pane on install (#1564) * feat: open pane on activation * comment out testing code * chore: add telemetry for pageviews (#1576) * feat: update onboarding w/ embeddings model (#1570) * chore(gui): remove unused pages * feat: add embeddings step * feat: update styles * feat: copy button updates * fix: correct pull command for embed model * fix: remove commented code * fix: remove commented code * feat: simplify copy btn props * chore: rename onboarding selection event * feat: add provider config * fix: undo msg name * remove dead code * fix: invalid mode check * fix: remove testing logic * fix: fullscreen gui retains context when hidden, fixed fullscreen focusing (#1582) * small UI tweaks * media query * feat: add best experience onboarding * small fixes * feat: add free trial card to onboarding (#1600) * feat: add free trial card to onboarding * add import * chore: add telemetry for full screen toggle (#1618) * rerank-lite-1 * remove doccs * basic tests for VS Code extension * improved testing of VS Code extension * manually implement stop tokens for hf inference api * chore: onboarding metrics (#1626) * fix: pageview tracking * feat: add onboarding telemetry * create single `onboardingStatus` type * improved var naming * remove console logs * fix windows performance issue * rename vscodeExtension.ts * migration of onboarding variables * "stash" instead of "delete" in indexing progress * fix preview.yaml * also fix main.yaml * Update troubleshooting.md (#1637) * feat: close panel if main input is focused * add skip param * Update TipTapEditor.tsx * merge dev * Update commands.ts --------- Co-authored-by: Nate Sesti Co-authored-by: Nate Sesti <33237525+sestinj@users.noreply.github.com> Co-authored-by: Jonah Wagner * bugfix: quick actions undefined array (#1704) * feat: add rich quick pick for quick edit (#1706) * feat: multistep quick pick * fix: multi step for context provider * Update test.js * Create deepseek.md (#1708) * style: add max height to model selector (#1712) * update styling * remove testing code * remove comments * feat: add tutorial card (#1716) * feat: create tutorial card * Update TutorialCard.tsx * feat: add file search to quick edit (#1714) * feat: multistep quick pick * fix: multi step for context provider * Update test.js * add file search * complete file search * remove unused import * add comments * Update utils.ts * update naming * chore: move quick pick instantiation (#1723) * Break out into NPM modules (#1726) * config.json types * export all schemas * break out request logic into packages * update openai adapters to export body types * update packaging of npm modules * update packages * continue proxy * mistral * Fix typo in documentation (#1722) In set-up-codestral.md "Trobleshooting" -> "Troubleshooting" * update package.json version * 🪄 model dropdown, control plane (#1692) * Nate/control plane client (#1691) * docs: add docs and schema for "OS" provider (#1536) * ignore .env * fix(gui): ctx rendering w/ renderInlineAs: "" (#1541) * ✨ use and cache imports for autocomplete (#1456) * ✨ use and cache imports for autocomplete * fix tsc * fix codeqwen autocomplete leading space * add voyage rerank-1 * feat: `--noEmit` for tsc checks in CI (#1559) * docs: update CustomContextProvider docs (#1557) * add stop tokens to qwen prompt * update docs to reflect 3.5 sonnet being best * docs: comment out unused providers (#1561) * import Handlebars * feat: toast notification for config updates (#1560) * feat: toast notification for config updates * feat: only trigger toast on config.json save * displayRawMarkdown option * feat: open pane on install (#1564) * feat: open pane on activation * comment out testing code * update to reflect 16 stop words limit for deepseek * feat: only trigger config update toast in vscode (#1571) * docs(prompt-files): fix typos + clarify (#1575) * doc: prompt file typo + clarifications * fix: add back correct docs * chore: add telemetry for pageviews (#1576) * feat: update onboarding w/ embeddings model (#1570) * chore(gui): remove unused pages * feat: add embeddings step * feat: update styles * feat: copy button updates * fix: correct pull command for embed model * fix: remove commented code * fix: remove commented code * feat: simplify copy btn props * chore: rename onboarding selection event * feat: add provider config * fix: undo msg name * remove dead code * fix: invalid mode check * fix: remove testing logic * docs(telemetry): add pageviews to tracking list (#1581) * Add reranker configuration options to codebase embedding docs (#1584) - Introduce reranker concept - List available reranker options - Provide configuration instructions - Update keywords to include "reranker" * chore: update pr template with screenshots (#1590) * Refactor ConfirmationDialog to use SecondaryButton for cancel action (#1586) * Added instructions for running docs server locally (#1578) - Added NPM script method - Added VS Code task method - Update contributing guidelines * Update branch policy (#1577) - Change PR target to `dev` branch - Update `CONTRIBUTING.md` instructions * Consolidate example configurations into the main configuration guide (#1579) - Moved examples to configuration.md - Deleted the separate examples.md file - Updated sidebar order and links - Improved readability and structure in configuration.md * fix: fullscreen gui retains context when hidden, fixed fullscreen focusing (#1582) * Update completionProvider.ts (warning tab-autocomplete models) (#1566) * feat: enhanced IndexingProgressBar with blinking dot feature - Integrated BlinkingDot component - Added STATUS_COLORS for various states - Replaced CircleDiv with BlinkingDot in UI - Updated status messages and layout * small UI tweaks * feat(gui): enhance ModelCard, ModelProviderTag, and Toggle components (#1595) - add styling and adjustments to ModelCard - update ModelProviderTag font size - remove box shadow from Toggle component - tweak icon styles in ModelCard - improve alignment and spacing * media query * feat: add best experience onboarding * fix: file rename * stop movement on button hover by keeping same border thickness * fix mistake in setting cursor: pointer * fix when free trial option is shown * Support Node.js versions below 20 for streaming response handling (#1591) - Add fallback for Node < 20 - Implement toAsyncIterable for streaming - Use TextDecoder for manual decoding - Maintain existing streaming for Node 20+ * small fixes * feat: add free trial card to onboarding (#1600) * feat: add free trial card to onboarding * add import * fix hasPassedFTL * fix /edit cancellation from UI * feat: add `applyCodeBlock` experimental prop (#1601) * feat: add new model styling improvements (#1609) * feat: add new model styling improvements * better gap size * feat: update bug_report.yml (#1610) * chore: update bug_report.yml * typo fix * feat: add labels to "Add docs" dialog (#1612) * feat: add labels to "Add docs" dialog * remove autofocus * don't double load config * small fixes * speed up directory traversal, and use correct native path module * option not to show config update toast * merge air-gapped and recommended setup pages * chore: add telemetry for full screen toggle (#1618) * Fix headings in codebase-embeddings.md (#1617) * mention jetbrains * docs: update changie (#1619) * feat: updated changie config * hide toc and autogenerate * Update changelog.mdx * link to deeper explanation of embeddings models * ensure target="_blank" for all links in sidebar * fix gif links in intellij README.md * don't require rust in dependency installation * chore: fix padding on gh button (#1620) * chore: adjust button padding * Update tasks.json * escape colons in diff path * smoother lancedb indexing reporting * smooth progress updates for indexing * fix tsc err * rerank-lite-1 * remove doccs * basic tests for VS Code extension * improved testing of VS Code extension * docs: add docs and schema for "OS" provider (#1536) * ignore .env * 🚑 fix constant warnings when onboarding with Ollama * ✨ use and cache imports for autocomplete (#1456) * ✨ use and cache imports for autocomplete * fix tsc * team analytics * apply control plane settings * workos auth * ide protocol get session info * UI for auth * profile switching * small fixes * updates * refresh tokens * updates * fix tsc errs * model select in toolbar to make room for profile selector * prod client id * link to prod URL * internal beta option * profiles change listener --------- Co-authored-by: Patrick Erichsen Co-authored-by: Priyash <38959321+priyashpatil@users.noreply.github.com> Co-authored-by: Jonah Wagner Co-authored-by: YohannZe <99359799+YohannZe@users.noreply.github.com> Co-authored-by: Dan Dascalescu * temporary patch for type errs --------- Co-authored-by: Patrick Erichsen Co-authored-by: Priyash <38959321+priyashpatil@users.noreply.github.com> Co-authored-by: Jonah Wagner Co-authored-by: YohannZe <99359799+YohannZe@users.noreply.github.com> Co-authored-by: Dan Dascalescu * skip extension tests * JetBrains status bar spinner for autocomplete * Remove unused images * partial accept jetbrains * fix double-rendering of jetbrains completions * fix offset of multi-line jetbrains completions * enable/disable actions * upgrade to version 0.0.54 * fix: wrap editor buttons when out of space (#1727) * Add .continuerc file to config directory on activation to prevent it's indexing. (#1733) * Updated the content links that were deprecated in the document (#1709) Co-authored-by: Ihe Fan * Nate/dev (#1739) * JetBrains status bar spinner for autocomplete * Remove unused images * partial accept jetbrains * fix double-rendering of jetbrains completions * fix offset of multi-line jetbrains completions * enable/disable actions * upgrade to version 0.0.54 * llm-info package * small profile switching improvements * instruct cmd+I not to leave placeholders * @ files in context-providers docs * onboarding fix * update jetbrains ci to build gui * feat: single default quick pick to edit (#1743) * feat: single default quick pick to edit * Update quick-actions.md * Update quick-actions.md * use defaultQuickAction * quick fixes * fix: handle line removal diff (#1744) * fix: handle line removal diff * remove comments * Configurable `maxChunkSize` for embedding providers (#1746) * Add `maxChunkSize` to `EmbeddingsProvider` * Add `maxChunkSize` to schema * add support for docs via config (#1594) * mistral mamba (#1748) * 🐍 mistral mamba * autoscale retrieval based on context length * autoscale retrieval based on context length * fix input box movement * update jetbrains build * test: add myers diff tests (#1754) * feat: enhance help center (#1755) * feat: enhance help center * Update help.tsx * feat: add azure provider config (#1764) * autocomplete reload fix * logout of control plane * Update QuickEditQuickPick.ts (#1772) * Update QuickEditQuickPick.ts * updates * Update QuickEditQuickPick.ts * pass refreshed access token to continue-proxy model * test: add dir read check for walkDir (#1773) * test: add dir read check for walkDir * Update ignore.ts * Update walkDir.test.ts * Update walkDir.test.ts * gpt-4o-mini * gpt-4o-mini * gpt4omini to ui selector * fix: layout alignment (#1779) * fix: delete old docs index on force re-index (#1778) * add "Codebase Force Re-Index" command (#1757) * Add `HuggingFaceTEIReranker` (#1711) * Add `HuggingFaceTEIReranker` * Add `huggingface-tei` to `config_schema.json` * update package.json version * update config schemas * skip test failing only due to type error * fix: convert `walkDir` to an async generator (#1783) * walkdir to async generator * add yields * handle ignore files * Update CodebaseIndexer.ts * Update walkDir.ts * chore: bump VS Code ext version * fix completions support in ContinueProxy * add test for walkDir * IAnalyticsProvider * feat: crawl `.mdx` docs * update workspaces on session info change * rename from profile to workspace (user-facing) * update config schema files * feat: improve chat thread ui for better readability (#1786) * add "language" template variable for autocomplete * Enable debug logs (#1800) * Add an enableDebugLogs flag * Send logs to VSCode * Refresh index fixes (#1795) * Use the resultType given to markComplete This fixes an issue where if there were multiple result types in itemToAction such as an update with UpdateNewVersion and UpdateOldVersion, only the UpdateOldVersion would be hit (which is a noop) and the UpdateNewVersion would never be fired, causing us to never update the timestamp of the tag_catalog. * Add a Compute and UpdateLastUpdated to refreshIndex Removes the ability to insert duplicate rows if we're just computing the result. Instead we replace the existing row instead. * Don't insert compute tags They are REPLACEd in markComplete now. * docs: change page heading to model providers (#1684) * feat: allow JetBrains users to index docs (#1797) * feat: allow JetBrains users to index docs * update docs service * update global context * throw error popup on jetbrains + transformers * update toast notifications * update typings * fix tsc errors * Index on file change (#1785) * Reload the submenu items when the context provider data is refreshed * update version * Just call refreshSubmenuItems * remove log statements * cleanup * Remove the Promise declaration * Copy currentFiles to a new dict since we're going to mutate it Don't mutate the caller's currentFiles unexpectedly * Remove reIndexFile and just call index/forceReIndex * We MUST await the refreshCodebaseIndex call * Expose send on core * remove unused import * Reindex the workspaces on save * Call core.send Ideally, we can implement externalRequest on the webview later so we don't have to expose messenger to the VSCode extension * Always refreshSubmenuItems in refreshCodebaseIndex * whitespace * Change messenger back to private * Add Pause Codebase On Start setting (#1788) * Add a skipInitialSync function * Add pauseInitialCodebaseIndex * docs * version bump * Rename to pauseCodebaseIndexOnStart * Un-shadow file context provider (#1801) * allow FileContextProvider to handle files * remove commented-out lines * chore: add telemetry to alt-enter (#1805) * Set the indexProgress indicator to paused on startup if pauseCodebaseIndexOnStart is set (#1804) * Fix Input Toolbar layout (#1792) * set to flex flex-column * Remove fixed height and always show the StyledDivs content to hold its size * Add a Delete Message button to the StepContainer (#1790) * Add a delete button * add a delete message action to the GUI * Fix off by one error * format * This index should be less than length * Update to trash icon * Simplify walkDir(...) and improve performance by roughly 10x in larger repos (#1806) The performance of WalkDir is improved by replacing the recursive DFS with a stack based implementation (less memory in-use during peak exploration). In addition, some unnecessary flags and options were removed which allowed the code to be overall simplified. Much less rule matching is occuring with the same files returned. Some performance results on my linux host: small repo: - 649 files returned by walkDir() - 9 .gitignore files - walkDir() old vs new duration: 918 ms to 143 ms medium sized repo: - 9271 returned by walkDir() - 35 .gitignore files - walkDir() old vs new duration: 10,886 ms to 970ms large sized repo: - 197,900 files returned by walkDir() - 929 .gitignore files - walkDir() old vs new duration: 498,151 ms to 37,353 ms Co-authored-by: Rob Leidle * modified assistant indicator in UI * update package.json version * feat: add Llama 3.1 8B to cloudflare provider options (#1811) Co-authored-by: jdelorey@cloudflare.com * increase gemini pro contextLength (#1809) * fix indentation (#1808) * Llama 3.1 405b model selection (#1813) * add support for llama3 405b * 3.1 * name mapping * updates to model setup * fix walkDir tests on windows --------- Co-authored-by: Patrick Erichsen Co-authored-by: Priyash <38959321+priyashpatil@users.noreply.github.com> Co-authored-by: Jonah Wagner Co-authored-by: YohannZe <99359799+YohannZe@users.noreply.github.com> Co-authored-by: Dan Dascalescu Co-authored-by: Rob Leidle Co-authored-by: Rob Leidle Co-authored-by: inimaz <49730431+inimaz@users.noreply.github.com> Co-authored-by: inimaz Co-authored-by: Anaël Bonnafous <71386173+AnaelBonnafous@users.noreply.github.com> Co-authored-by: Huy Tran <119860259+tranquochuy645@users.noreply.github.com> Co-authored-by: Gabriel Gordbegli Co-authored-by: Raven-1027 <83693755+Raven-1027@users.noreply.github.com> Co-authored-by: Ihe Fan Co-authored-by: Lukas Kreussel <65088241+LLukas22@users.noreply.github.com> Co-authored-by: Josh Vera Co-authored-by: Peter Zaback Co-authored-by: James Delorey Co-authored-by: jdelorey@cloudflare.com --- core/autocomplete/templates.ts | 5 - core/indexing/walkDir.ts | 9 +- core/llm/llms/Cloudflare.ts | 1 - core/llm/llms/FreeTrial.ts | 3 +- core/llm/llms/Groq.ts | 3 + core/llm/llms/Ollama.ts | 3 + core/llm/llms/Replicate.ts | 3 + core/llm/llms/Together.ts | 3 + core/test/walkDir.test.ts | 7 + docs/static/schemas/config.json | 25 +- .../src/main/resources/config_schema.json | 24 +- extensions/vscode/config_schema.json | 24 +- extensions/vscode/continue_rc_schema.json | 24 +- extensions/vscode/package-lock.json | 4 +- gui/src/components/mainInput/resolveInput.ts | 3 +- gui/src/pages/AddNewModel/AddNewModel.tsx | 264 +++++++++--------- gui/src/pages/AddNewModel/configs/models.ts | 231 ++++++++++----- .../pages/AddNewModel/configs/providers.ts | 10 +- 18 files changed, 421 insertions(+), 225 deletions(-) diff --git a/core/autocomplete/templates.ts b/core/autocomplete/templates.ts index 4de43739ab..c0177bb12f 100644 --- a/core/autocomplete/templates.ts +++ b/core/autocomplete/templates.ts @@ -155,11 +155,6 @@ const deepseekFimTemplate: AutocompleteTemplate = { }, }; -const deepseekFimTemplateWrongPipeChar: AutocompleteTemplate = { - template: "<|fim▁begin|>{{{prefix}}}<|fim▁hole|>{{{suffix}}}<|fim▁end|>", - completionOptions: { stop: ["<|fim▁begin|>", "<|fim▁hole|>", "<|fim▁end|>"] }, -}; - const gptAutocompleteTemplate: AutocompleteTemplate = { template: `\`\`\` {{{prefix}}}[BLANK]{{{suffix}}} diff --git a/core/indexing/walkDir.ts b/core/indexing/walkDir.ts index 45dc5d1c06..1c320f1816 100644 --- a/core/indexing/walkDir.ts +++ b/core/indexing/walkDir.ts @@ -220,12 +220,11 @@ export async function walkDir( for await (const e of dfsWalker.walk()) { relativePaths.push(e); } - if (options?.returnRelativePaths) { - return relativePaths; - } const pathSep = await ide.pathSep(); + const prefix = options.returnRelativePaths ? "" : path + pathSep; + if (pathSep === "/") { - return relativePaths.map((p) => path + pathSep + p); + return relativePaths.map((p) => prefix + p); } - return relativePaths.map((p) => path + pathSep + p.split("/").join(pathSep)); + return relativePaths.map((p) => prefix + p.split("/").join(pathSep)); } diff --git a/core/llm/llms/Cloudflare.ts b/core/llm/llms/Cloudflare.ts index dcaf333c4a..7f299c7edb 100644 --- a/core/llm/llms/Cloudflare.ts +++ b/core/llm/llms/Cloudflare.ts @@ -38,7 +38,6 @@ export default class Cloudflare extends BaseLLM { }); for await (const value of streamSse(resp)) { - console.log(value); if (value.choices?.[0]?.delta?.content) { yield value.choices[0].delta; } diff --git a/core/llm/llms/FreeTrial.ts b/core/llm/llms/FreeTrial.ts index b2db6a5a17..e4c1674e63 100644 --- a/core/llm/llms/FreeTrial.ts +++ b/core/llm/llms/FreeTrial.ts @@ -165,7 +165,8 @@ class FreeTrial extends BaseLLM { return [ "codestral-latest", "claude-3-5-sonnet-20240620", - "llama3-70b", + "llama3.1-405b", + "llama3.1-70b", "gpt-4o", "gpt-3.5-turbo", "claude-3-haiku-20240307", diff --git a/core/llm/llms/Groq.ts b/core/llm/llms/Groq.ts index 0aa5b56365..27c51e1e33 100644 --- a/core/llm/llms/Groq.ts +++ b/core/llm/llms/Groq.ts @@ -14,6 +14,9 @@ class Groq extends OpenAI { gemma: "gemma-7b-it", "llama3-8b": "llama3-8b-8192", "llama3-70b": "llama3-70b-8192", + "llama3.1-8b": "llama-3.1-8b-instant", + "llama3.1-70b": "llama-3.1-70b-versatile", + "llama3.1-405b": "llama-3.1-405b-reasoning", }; protected _convertModelName(model: string): string { return Groq.modelConversion[model] ?? model; diff --git a/core/llm/llms/Ollama.ts b/core/llm/llms/Ollama.ts index e24a489f0c..8da67a14e9 100644 --- a/core/llm/llms/Ollama.ts +++ b/core/llm/llms/Ollama.ts @@ -88,6 +88,9 @@ class Ollama extends BaseLLM { "codellama-70b": "codellama:70b", "llama3-8b": "llama3:8b", "llama3-70b": "llama3:70b", + "llama3.1-8b": "llama3.1:8b", + "llama3.1-70b": "llama3.1:70b", + "llama3.1-405b": "llama3.1:405b", "phi-2": "phi:2.7b", "phind-codellama-34b": "phind-codellama:34b-v2", "wizardcoder-7b": "wizardcoder:7b-python", diff --git a/core/llm/llms/Replicate.ts b/core/llm/llms/Replicate.ts index 7cfa6e8901..5dde240148 100644 --- a/core/llm/llms/Replicate.ts +++ b/core/llm/llms/Replicate.ts @@ -18,6 +18,9 @@ class Replicate extends BaseLLM { "llama2-13b": "meta/llama-2-13b-chat" as any, "llama3-8b": "meta/meta-llama-3-8b-instruct" as any, "llama3-70b": "meta/meta-llama-3-70b-instruct" as any, + "llama3.1-8b": "meta/meta-llama-3.1-8b-instruct" as any, + "llama3.1-70b": "meta/meta-llama-3.1-70b-instruct" as any, + "llama3.1-405b": "meta/meta-llama-3.1-405b-instruct" as any, "zephyr-7b": "nateraw/zephyr-7b-beta:b79f33de5c6c4e34087d44eaea4a9d98ce5d3f3a09522f7328eea0685003a931", "mistral-7b": diff --git a/core/llm/llms/Together.ts b/core/llm/llms/Together.ts index 277389c770..eaa1442771 100644 --- a/core/llm/llms/Together.ts +++ b/core/llm/llms/Together.ts @@ -19,6 +19,9 @@ class Together extends OpenAI { "codellama-70b": "codellama/CodeLlama-70b-Instruct-hf", "llama3-8b": "meta-llama/Llama-3-8b-chat-hf", "llama3-70b": "meta-llama/Llama-3-70b-chat-hf", + "llama3.1-8b": "meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo", + "llama3.1-70b": "meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo", + "llama3.1-405b": "meta-llama/Meta-Llama-3.1-405B-Instruct-Turbo", "llama2-7b": "togethercomputer/llama-2-7b-chat", "llama2-13b": "togethercomputer/llama-2-13b-chat", "llama2-70b": "togethercomputer/llama-2-70b-chat", diff --git a/core/test/walkDir.test.ts b/core/test/walkDir.test.ts index c3f40128aa..87f643f4eb 100644 --- a/core/test/walkDir.test.ts +++ b/core/test/walkDir.test.ts @@ -24,6 +24,13 @@ async function expectPaths( toNotExist: string[], options?: WalkerOptions, ) { + // Convert to Windows paths + const pathSep = await ide.pathSep(); + if (pathSep === "\\") { + toExist = toExist.map((p) => p.replace(/\//g, "\\")); + toNotExist = toNotExist.map((p) => p.replace(/\//g, "\\")); + } + const result = await walkTestDir(options); for (const p of toExist) { diff --git a/docs/static/schemas/config.json b/docs/static/schemas/config.json index ac7461d8fd..3cc82db368 100644 --- a/docs/static/schemas/config.json +++ b/docs/static/schemas/config.json @@ -423,6 +423,7 @@ "anyOf": [ { "enum": [ + "@cf/meta/llama-3.1-8b-instruct", "@cf/meta/llama-3-8b-instruct", "@hf/thebloke/deepseek-coder-6.7b-instruct-awq", "@cf/deepseek-ai/deepseek-math-7b-instruct", @@ -513,6 +514,9 @@ "anyOf": [ { "enum": [ + "llama3.1-8b", + "llama3.1-70b", + "llama3.1-405b", "llama3-8b", "llama3-70b", "codellama-7b", @@ -546,7 +550,8 @@ "enum": [ "gpt-4o", "codestral-latest", - "llama3-70b", + "llama3.1-70b", + "llama3.1-405b", "gpt-3.5-turbo", "phind-codellama-34b", "gemini-pro", @@ -598,6 +603,9 @@ "codellama-70b", "llama3-8b", "llama3-70b", + "llama3.1-8b", + "llama3.1-70b", + "llama3.1-405b", "phind-codellama-34b", "wizardcoder-7b", "wizardcoder-13b", @@ -748,6 +756,9 @@ "llama2-13b", "llama3-8b", "llama3-70b", + "llama3.1-8b", + "llama3.1-70b", + "llama3.1-405b", "codellama-7b", "codellama-13b", "codellama-34b", @@ -812,6 +823,9 @@ "codellama-70b", "llama3-8b", "llama3-70b", + "llama3.1-8b", + "llama3.1-70b", + "llama3.1-405b", "phind-codellama-34b", "wizardcoder-7b", "wizardcoder-13b", @@ -860,6 +874,9 @@ "codellama-70b", "llama3-8b", "llama3-70b", + "llama3.1-8b", + "llama3.1-70b", + "llama3.1-405b", "phi-2", "phind-codellama-34b", "wizardcoder-7b", @@ -947,6 +964,9 @@ "gemma", "llama3-8b", "llama3-70b", + "llama3.1-8b", + "llama3.1-70b", + "llama3.1-405b", "AUTODETECT" ] } @@ -1113,6 +1133,9 @@ "codellama-70b", "llama3-8b", "llama3-70b", + "llama3.1-8b", + "llama3.1-70b", + "llama3.1-405b", "phind-codellama-34b", "wizardcoder-7b", "wizardcoder-13b", diff --git a/extensions/intellij/src/main/resources/config_schema.json b/extensions/intellij/src/main/resources/config_schema.json index ac7461d8fd..0512f8ac0d 100644 --- a/extensions/intellij/src/main/resources/config_schema.json +++ b/extensions/intellij/src/main/resources/config_schema.json @@ -513,6 +513,9 @@ "anyOf": [ { "enum": [ + "llama3.1-8b", + "llama3.1-70b", + "llama3.1-405b", "llama3-8b", "llama3-70b", "codellama-7b", @@ -546,7 +549,8 @@ "enum": [ "gpt-4o", "codestral-latest", - "llama3-70b", + "llama3.1-70b", + "llama3.1-405b", "gpt-3.5-turbo", "phind-codellama-34b", "gemini-pro", @@ -598,6 +602,9 @@ "codellama-70b", "llama3-8b", "llama3-70b", + "llama3.1-8b", + "llama3.1-70b", + "llama3.1-405b", "phind-codellama-34b", "wizardcoder-7b", "wizardcoder-13b", @@ -748,6 +755,9 @@ "llama2-13b", "llama3-8b", "llama3-70b", + "llama3.1-8b", + "llama3.1-70b", + "llama3.1-405b", "codellama-7b", "codellama-13b", "codellama-34b", @@ -812,6 +822,9 @@ "codellama-70b", "llama3-8b", "llama3-70b", + "llama3.1-8b", + "llama3.1-70b", + "llama3.1-405b", "phind-codellama-34b", "wizardcoder-7b", "wizardcoder-13b", @@ -860,6 +873,9 @@ "codellama-70b", "llama3-8b", "llama3-70b", + "llama3.1-8b", + "llama3.1-70b", + "llama3.1-405b", "phi-2", "phind-codellama-34b", "wizardcoder-7b", @@ -947,6 +963,9 @@ "gemma", "llama3-8b", "llama3-70b", + "llama3.1-8b", + "llama3.1-70b", + "llama3.1-405b", "AUTODETECT" ] } @@ -1113,6 +1132,9 @@ "codellama-70b", "llama3-8b", "llama3-70b", + "llama3.1-8b", + "llama3.1-70b", + "llama3.1-405b", "phind-codellama-34b", "wizardcoder-7b", "wizardcoder-13b", diff --git a/extensions/vscode/config_schema.json b/extensions/vscode/config_schema.json index ac7461d8fd..0512f8ac0d 100644 --- a/extensions/vscode/config_schema.json +++ b/extensions/vscode/config_schema.json @@ -513,6 +513,9 @@ "anyOf": [ { "enum": [ + "llama3.1-8b", + "llama3.1-70b", + "llama3.1-405b", "llama3-8b", "llama3-70b", "codellama-7b", @@ -546,7 +549,8 @@ "enum": [ "gpt-4o", "codestral-latest", - "llama3-70b", + "llama3.1-70b", + "llama3.1-405b", "gpt-3.5-turbo", "phind-codellama-34b", "gemini-pro", @@ -598,6 +602,9 @@ "codellama-70b", "llama3-8b", "llama3-70b", + "llama3.1-8b", + "llama3.1-70b", + "llama3.1-405b", "phind-codellama-34b", "wizardcoder-7b", "wizardcoder-13b", @@ -748,6 +755,9 @@ "llama2-13b", "llama3-8b", "llama3-70b", + "llama3.1-8b", + "llama3.1-70b", + "llama3.1-405b", "codellama-7b", "codellama-13b", "codellama-34b", @@ -812,6 +822,9 @@ "codellama-70b", "llama3-8b", "llama3-70b", + "llama3.1-8b", + "llama3.1-70b", + "llama3.1-405b", "phind-codellama-34b", "wizardcoder-7b", "wizardcoder-13b", @@ -860,6 +873,9 @@ "codellama-70b", "llama3-8b", "llama3-70b", + "llama3.1-8b", + "llama3.1-70b", + "llama3.1-405b", "phi-2", "phind-codellama-34b", "wizardcoder-7b", @@ -947,6 +963,9 @@ "gemma", "llama3-8b", "llama3-70b", + "llama3.1-8b", + "llama3.1-70b", + "llama3.1-405b", "AUTODETECT" ] } @@ -1113,6 +1132,9 @@ "codellama-70b", "llama3-8b", "llama3-70b", + "llama3.1-8b", + "llama3.1-70b", + "llama3.1-405b", "phind-codellama-34b", "wizardcoder-7b", "wizardcoder-13b", diff --git a/extensions/vscode/continue_rc_schema.json b/extensions/vscode/continue_rc_schema.json index 2c67ce0c19..8e0e499198 100644 --- a/extensions/vscode/continue_rc_schema.json +++ b/extensions/vscode/continue_rc_schema.json @@ -552,6 +552,9 @@ "anyOf": [ { "enum": [ + "llama3.1-8b", + "llama3.1-70b", + "llama3.1-405b", "llama3-8b", "llama3-70b", "codellama-7b", @@ -589,7 +592,8 @@ "enum": [ "gpt-4o", "codestral-latest", - "llama3-70b", + "llama3.1-70b", + "llama3.1-405b", "gpt-3.5-turbo", "phind-codellama-34b", "gemini-pro", @@ -645,6 +649,9 @@ "codellama-70b", "llama3-8b", "llama3-70b", + "llama3.1-8b", + "llama3.1-70b", + "llama3.1-405b", "phind-codellama-34b", "wizardcoder-7b", "wizardcoder-13b", @@ -818,6 +825,9 @@ "llama2-13b", "llama3-8b", "llama3-70b", + "llama3.1-8b", + "llama3.1-70b", + "llama3.1-405b", "codellama-7b", "codellama-13b", "codellama-34b", @@ -888,6 +898,9 @@ "codellama-70b", "llama3-8b", "llama3-70b", + "llama3.1-8b", + "llama3.1-70b", + "llama3.1-405b", "phind-codellama-34b", "wizardcoder-7b", "wizardcoder-13b", @@ -940,6 +953,9 @@ "codellama-70b", "llama3-8b", "llama3-70b", + "llama3.1-8b", + "llama3.1-70b", + "llama3.1-405b", "phi-2", "phind-codellama-34b", "wizardcoder-7b", @@ -1042,6 +1058,9 @@ "gemma", "llama3-8b", "llama3-70b", + "llama3.1-8b", + "llama3.1-70b", + "llama3.1-405b", "AUTODETECT" ] } @@ -1240,6 +1259,9 @@ "codellama-70b", "llama3-8b", "llama3-70b", + "llama3.1-8b", + "llama3.1-70b", + "llama3.1-405b", "phind-codellama-34b", "wizardcoder-7b", "wizardcoder-13b", diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 118fd459de..e4cf812f76 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "0.9.189", + "version": "0.9.187", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "0.9.189", + "version": "0.9.187", "license": "Apache-2.0", "dependencies": { "@electron/rebuild": "^3.2.10", diff --git a/gui/src/components/mainInput/resolveInput.ts b/gui/src/components/mainInput/resolveInput.ts index 508627b7f6..a067243da6 100644 --- a/gui/src/components/mainInput/resolveInput.ts +++ b/gui/src/components/mainInput/resolveInput.ts @@ -7,7 +7,6 @@ import { RangeInFile, } from "core"; import { stripImages } from "core/llm/countTokens"; -import { getBasename, getRelativePath } from "core/util"; import { IIdeMessenger } from "../../context/IdeMessenger"; interface MentionAttrs { @@ -99,7 +98,7 @@ async function resolveEditorContent( let contextItemsText = ""; let contextItems: ContextItemWithId[] = []; for (const item of contextItemAttrs) { - const data = { + const data = { name: item.itemType === "contextProvider" ? item.id : item.itemType, query: item.query, fullInput: stripImages(parts), diff --git a/gui/src/pages/AddNewModel/AddNewModel.tsx b/gui/src/pages/AddNewModel/AddNewModel.tsx index e08cec157f..ddf947fc26 100644 --- a/gui/src/pages/AddNewModel/AddNewModel.tsx +++ b/gui/src/pages/AddNewModel/AddNewModel.tsx @@ -62,7 +62,7 @@ function AddNewModel() { const [providersSelected, setProvidersSelected] = React.useState(true); return ( -
+
Add a new model

- - To add a new model you can either: -
    -
  • - Start by selecting and configuring a provider, then choosing your - model -
  • -
  • Select a specific model directly
  • -
- - Visit our setup overview docs - {" "} - to learn more. -
- -
- { - setProvidersSelected((prev) => !prev); - }} - > -
+
+ + To add a new model you can either: +
    +
  • + Start by selecting and configuring a provider, then choosing your + model +
  • +
  • Select a specific model directly
  • +
+ + Visit our setup overview docs + {" "} + to learn more. +
- {providersSelected ? ( - <> -
-

Providers

-

- Select a provider below, or configure your own in{" "} - config.json -

-
+
+ { + setProvidersSelected((prev) => !prev); + }} + > +
- - {Object.entries(providers).map(([providerName, modelInfo], i) => ( - { - console.log(`/addModel/provider/${providerName}`); - navigate(`/addModel/provider/${providerName}`); - }} - /> - ))} - - - ) : ( - <> -
-

Models

-

- Select a model from the most popular options below, or configure - your own in config.json -

-
+ {providersSelected ? ( + <> +
+

Providers

+

+ Select a provider below, or configure your own in{" "} + config.json +

+
- {Object.entries(modelsByProvider).map( - ([providerTitle, modelConfigsByProviderTitle]) => ( -
-
-

{providerTitle}

-
-
+ + {Object.entries(providers).map(([providerName, modelInfo], i) => ( + { + console.log(`/addModel/provider/${providerName}`); + navigate(`/addModel/provider/${providerName}`); + }} + /> + ))} + + + ) : ( + <> +
+

Models

+

+ Select a model from the most popular options below, or configure + your own in config.json +

+
- - {modelConfigsByProviderTitle.map((config) => ( - { - const model = { - ...config.params, - ..._.merge( - {}, - ...(config.dimensions?.map((dimension, i) => { - if (!dimensionChoices?.[i]) return {}; - return { - ...dimension.options[dimensionChoices[i]], - }; - }) || []), - ), - provider: providers[selectedProvider].provider, - }; - ideMessenger.post("config/addModel", { model }); - dispatch( - setDefaultModel({ - title: model.title, - force: true, - }), - ); - navigate("/"); + {Object.entries(modelsByProvider).map( + ([providerTitle, modelConfigsByProviderTitle]) => ( +
+
+

{providerTitle}

+
- ))} - -
- ), - )} - - )} +
- { - ideMessenger.post("openConfigJson", undefined); - }} - > -

- - Open config.json -

-
+ + {modelConfigsByProviderTitle.map((config) => ( + { + const model = { + ...config.params, + ..._.merge( + {}, + ...(config.dimensions?.map((dimension, i) => { + if (!dimensionChoices?.[i]) return {}; + return { + ...dimension.options[dimensionChoices[i]], + }; + }) || []), + ), + provider: providers[selectedProvider].provider, + }; + ideMessenger.post("config/addModel", { model }); + dispatch( + setDefaultModel({ + title: model.title, + force: true, + }), + ); + navigate("/"); + }} + /> + ))} + +
+ ), + )} + + )} + + { + ideMessenger.post("openConfigJson", undefined); + }} + > +

+ + Open config.json +

+
+
); } diff --git a/gui/src/pages/AddNewModel/configs/models.ts b/gui/src/pages/AddNewModel/configs/models.ts index 62fa6bb9ec..e3ed6f286b 100644 --- a/gui/src/pages/AddNewModel/configs/models.ts +++ b/gui/src/pages/AddNewModel/configs/models.ts @@ -32,6 +32,113 @@ export interface ModelPackage { } export const models: { [key: string]: ModelPackage } = { + llama31Chat: { + title: "Llama3.1 Chat", + description: "The latest model from Meta, fine-tuned for chat", + refUrl: "", + params: { + title: "Llama3.1-8b", + model: "llama3.1-8b", + contextLength: 8192, + }, + icon: "meta.png", + dimensions: [ + { + name: "Parameter Count", + description: "The number of parameters in the model", + options: { + "8b": { + model: "llama3.1-8b", + title: "Llama3.1-8b", + }, + "70b": { + model: "llama3.1-70b", + title: "Llama3.1-70b", + }, + "405b": { + model: "llama3.1-405b", + title: "Llama3.1-405b", + }, + }, + }, + ], + providerOptions: [ + "ollama", + "lmstudio", + "together", + "llama.cpp", + "replicate", + ], + isOpenSource: true, + }, + deepseek: { + title: "DeepSeek-Coder", + description: + "A model pre-trained on 2 trillion tokens including 80+ programming languages and a repo-level corpus.", + params: { + title: "DeepSeek-7b", + model: "deepseek-7b", + contextLength: 4096, + }, + icon: "deepseek.png", + dimensions: [ + { + name: "Parameter Count", + description: "The number of parameters in the model", + options: { + "1b": { + model: "deepseek-1b", + title: "DeepSeek-1b", + }, + "7b": { + model: "deepseek-7b", + title: "DeepSeek-7b", + }, + "33b": { + model: "deepseek-33b", + title: "DeepSeek-33b", + }, + }, + }, + ], + providerOptions: ["ollama", "lmstudio", "llama.cpp"], + isOpenSource: true, + }, + mistralOs: { + title: "Mistral", + description: + "A series of open-weight models created by Mistral AI, highly competent for code generation and other tasks", + params: { + title: "Mistral", + model: "mistral-7b", + contextLength: 4096, + }, + dimensions: [ + { + name: "Parameter Count", + description: "The number of parameters in the model", + options: { + "7b": { + model: "mistral-7b", + title: "Mistral-7b", + }, + "8x7b (MoE)": { + model: "mistral-8x7b", + title: "Mixtral", + }, + }, + }, + ], + icon: "mistral.png", + providerOptions: [ + "ollama", + "lmstudio", + "together", + "llama.cpp", + "replicate", + ], + isOpenSource: true, + }, codeLlamaInstruct: { title: "CodeLlama Instruct", description: @@ -76,7 +183,7 @@ export const models: { [key: string]: ModelPackage } = { ], isOpenSource: true, }, - codellama70bTrial: { + llama3170bTrial: { title: "Codellama 70b (Free Trial)", description: "The best code model from Meta, fine-tuned for code generation and conversation", @@ -90,6 +197,19 @@ export const models: { [key: string]: ModelPackage } = { providerOptions: ["free-trial"], isOpenSource: false, }, + llama31405bTrial: { + title: "Llama3.1 405b (Free Trial)", + description: "The latest Llama model from Meta, fine-tuned for chat", + refUrl: "", + params: { + title: "Llama3.1-405b", + model: "llama3.1-405b", + contextLength: 8192, + }, + icon: "meta.png", + providerOptions: ["free-trial"], + isOpenSource: false, + }, mixtralTrial: { title: "Mixtral (Free Trial)", description: @@ -130,6 +250,45 @@ export const models: { [key: string]: ModelPackage } = { providerOptions: ["groq"], isOpenSource: false, }, + llama318bChat: { + title: "Llama3.1 8b Chat", + description: "The latest Llama model from Meta, fine-tuned for chat", + refUrl: "", + params: { + title: "Llama3.1-8b", + model: "llama3.1-8b", + contextLength: 8192, + }, + icon: "meta.png", + providerOptions: ["groq"], + isOpenSource: false, + }, + llama3170bChat: { + title: "Llama3.1 70b Chat", + description: "The latest Llama model from Meta, fine-tuned for chat", + refUrl: "", + params: { + title: "Llama3.1-70b", + model: "llama3.1-70b", + contextLength: 8192, + }, + icon: "meta.png", + providerOptions: ["groq"], + isOpenSource: false, + }, + llama31405bChat: { + title: "Llama3.1 405b Chat", + description: "The latest Llama model from Meta, fine-tuned for chat", + refUrl: "", + params: { + title: "Llama3.1-405b", + model: "llama3.1-405b", + contextLength: 8192, + }, + icon: "meta.png", + providerOptions: ["groq"], + isOpenSource: false, + }, llama270bChat: { title: "Llama2 70b Chat", description: "The latest Llama model from Meta, fine-tuned for chat", @@ -230,41 +389,6 @@ export const models: { [key: string]: ModelPackage } = { ], isOpenSource: true, }, - mistralOs: { - title: "Mistral", - description: - "A series of open-weight models created by Mistral AI, highly competent for code generation and other tasks", - params: { - title: "Mistral", - model: "mistral-7b", - contextLength: 4096, - }, - dimensions: [ - { - name: "Parameter Count", - description: "The number of parameters in the model", - options: { - "7b": { - model: "mistral-7b", - title: "Mistral-7b", - }, - "8x7b (MoE)": { - model: "mistral-8x7b", - title: "Mixtral", - }, - }, - }, - ], - icon: "mistral.png", - providerOptions: [ - "ollama", - "lmstudio", - "together", - "llama.cpp", - "replicate", - ], - isOpenSource: true, - }, codestral: { title: "Codestral", description: @@ -374,7 +498,7 @@ export const models: { [key: string]: ModelPackage } = { params: { title: "Gemini 1.5 Pro", model: "gemini-1.5-pro-latest", - contextLength: 1_000_000, + contextLength: 2_000_000, apiKey: "", }, icon: "gemini.png", @@ -395,39 +519,6 @@ export const models: { [key: string]: ModelPackage } = { providerOptions: ["gemini"], isOpenSource: false, }, - deepseek: { - title: "DeepSeek-Coder", - description: - "A model pre-trained on 2 trillion tokens including 80+ programming languages and a repo-level corpus.", - params: { - title: "DeepSeek-7b", - model: "deepseek-7b", - contextLength: 4096, - }, - icon: "deepseek.png", - dimensions: [ - { - name: "Parameter Count", - description: "The number of parameters in the model", - options: { - "1b": { - model: "deepseek-1b", - title: "DeepSeek-1b", - }, - "7b": { - model: "deepseek-7b", - title: "DeepSeek-7b", - }, - "33b": { - model: "deepseek-33b", - title: "DeepSeek-33b", - }, - }, - }, - ], - providerOptions: ["ollama", "lmstudio", "llama.cpp"], - isOpenSource: true, - }, commandR: { title: "Command R", description: diff --git a/gui/src/pages/AddNewModel/configs/providers.ts b/gui/src/pages/AddNewModel/configs/providers.ts index 975170f98b..630b5de786 100644 --- a/gui/src/pages/AddNewModel/configs/providers.ts +++ b/gui/src/pages/AddNewModel/configs/providers.ts @@ -262,8 +262,9 @@ Select the \`GPT-4o\` model below to complete your provider configuration, but n }, ], packages: [ - models.llama370bChat, - models.llama38bChat, + models.llama31405bChat, + models.llama3170bChat, + models.llama318bChat, { ...models.mixtralTrial, title: "Mixtral" }, models.llama270bChat, { @@ -300,7 +301,7 @@ Select the \`GPT-4o\` model below to complete your provider configuration, but n ...completionParamsInputsConfigs, ], packages: [ - models.llama3Chat, + models.llama31Chat, models.codeLlamaInstruct, models.mistralOs, ].map((p) => { @@ -464,7 +465,8 @@ After it's up and running, you can start using Continue.`, icon: "openai.png", tags: [ModelProviderTags.Free], packages: [ - models.codellama70bTrial, + models.llama31405bTrial, + models.llama3170bTrial, { ...models.claude35Sonnet, title: "Claude 3.5 Sonnet (trial)" }, { ...models.gpt4o, title: "GPT-4o (trial)" }, { ...models.gpt35turbo, title: "GPT-3.5-Turbo (trial)" },