From 7cecbccceab94a1dbc23da6812fc5f9070726ffa Mon Sep 17 00:00:00 2001 From: sam <1211977+sambarnes@users.noreply.github.com> Date: Mon, 20 May 2024 14:57:12 -0600 Subject: [PATCH 1/3] docs: add setup guide for OpenRouter (#1284) --- .../reference/Model Providers/openrouter.md | 40 +++++++++++++++++++ docs/docs/setup/select-provider.md | 3 ++ 2 files changed, 43 insertions(+) create mode 100644 docs/docs/reference/Model Providers/openrouter.md diff --git a/docs/docs/reference/Model Providers/openrouter.md b/docs/docs/reference/Model Providers/openrouter.md new file mode 100644 index 000000000..5f2558399 --- /dev/null +++ b/docs/docs/reference/Model Providers/openrouter.md @@ -0,0 +1,40 @@ +# OpenRouter + +OpenRouter is a unified interface for commercial and open-source models, giving you access to the best models at the best prices. You can sign up [here](https://openrouter.ai/signup), create your API key on the [keys page](https://openrouter.ai/keys), and then choose a model from the [list of supported models](https://openrouter.ai/models). + +Change `~/.continue/config.json` to look like the following. Since OpenRouter is fully API compatible with OpenAI, it is recommended to stick with `"provider": "openai"`, even if they aren't necessarily the upstream provider. + +```json title="~/.continue/config.json" +{ + "models": [ + { + "title": "OpenRouter LLaMA 70 8B", + "provider": "openai", + "model": "meta-llama/llama-3-70b-instruct", + "apiBase": "https://openrouter.ai/api/v1", + "apiKey": "..." + } + ] +} +``` + +To utilize features such as provider preferences or model routing configuration, include these parameters inside the `models[].requestsOptions.extraBodyProperties` field of your plugin config. + +For example, to prevent extra long prompts from being compressed, you can explicitly turn off the feature like so: + +```json title="~/.continue/config.json" +{ + "models": [ + { + ... + "requestOptions": { + "extraBodyProperties": { + "transforms": [] + } + } + } + ] +} +``` + +Learn more about available settings [here](https://openrouter.ai/docs). diff --git a/docs/docs/setup/select-provider.md b/docs/docs/setup/select-provider.md index 949606aed..3fb5c00c3 100644 --- a/docs/docs/setup/select-provider.md +++ b/docs/docs/setup/select-provider.md @@ -38,6 +38,9 @@ You can deploy a model in your [AWS](https://github.com/continuedev/deploy-os-co ## SaaS +You can access both open-source and commercial LLMs via: +* [OpenRouter](../reference/Model%20Providers/openrouter.md) + ### Open-source models You can deploy open-source LLMs on a service using: From ebc02fe093f323bf90901b6aec6421bf0a575d4b Mon Sep 17 00:00:00 2001 From: Jose Vega Date: Mon, 20 May 2024 14:58:15 -0600 Subject: [PATCH 2/3] Update preIndexedDocs.ts (#1292) Add Bootstrap and Alpine.js as pre indexed docs. --- core/indexing/docs/preIndexedDocs.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/core/indexing/docs/preIndexedDocs.ts b/core/indexing/docs/preIndexedDocs.ts index 1a1d9ecbb..a713c363d 100644 --- a/core/indexing/docs/preIndexedDocs.ts +++ b/core/indexing/docs/preIndexedDocs.ts @@ -231,6 +231,16 @@ const configs: SiteIndexingConfig[] = [ startUrl: "https://doc.qt.io/qtforpython-6/quickstart.html", rootUrl: "https://doc.qt.io/qtforpython-6/api.html", }, + { + title: "Bootstrap", + startUrl: "https://getbootstrap.com/docs/5.3/getting-started/introduction/", + rootUrl: "https://getbootstrap.com/docs/5.3/", + }, + { + title: "Alpine.js", + startUrl: "https://alpinejs.dev/start-here", + rootUrl: "https://alpinejs.dev/", + }, ]; export default configs; From 25d9e37ffadb713c218761764e9b16390d7bc431 Mon Sep 17 00:00:00 2001 From: Justin Milner <42585006+justinmilner1@users.noreply.github.com> Date: Mon, 20 May 2024 17:08:22 -0400 Subject: [PATCH 3/3] add toString (#1324) * add toString * Fix indentation --------- Co-authored-by: Justin Milner --- core/context/providers/DocsContextProvider.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/context/providers/DocsContextProvider.ts b/core/context/providers/DocsContextProvider.ts index 21b5b8a55..133acde12 100644 --- a/core/context/providers/DocsContextProvider.ts +++ b/core/context/providers/DocsContextProvider.ts @@ -114,7 +114,7 @@ class DocsContextProvider extends BaseContextProvider { return 1; } else { // Secondary criterion: Alphabetical order when both items are in the same category - return a.title.localeCompare(b.title); + return a.title.toString().localeCompare(b.title.toString()); } });