From e5353640f44c7ac22078a6611b10212f4983c4e2 Mon Sep 17 00:00:00 2001 From: bhaktatejas922 Date: Wed, 23 Apr 2025 16:29:37 -0700 Subject: [PATCH] adding morph --- .../customize/model-providers/more/morph.mdx | 44 +++++++++++++++++++ docs/docs/customize/model-roles/apply.mdx | 28 +++++++----- extensions/vscode/config_schema.json | 6 ++- 3 files changed, 65 insertions(+), 13 deletions(-) create mode 100644 docs/docs/customize/model-providers/more/morph.mdx diff --git a/docs/docs/customize/model-providers/more/morph.mdx b/docs/docs/customize/model-providers/more/morph.mdx new file mode 100644 index 000000000..2175e8fd0 --- /dev/null +++ b/docs/docs/customize/model-providers/more/morph.mdx @@ -0,0 +1,44 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +# Morph + +Morph provides a fast apply model that helps you quickly and accurately apply code changes from chat suggestions to your files. It's optimized for speed and precision when integrating generated code into your existing codebase. You can sign up for Morph's generous free tier [here](https://morphllm.com/dashboard). Then, update your configuration file as follows: + + + + ```yaml title="config.yaml" + models: + - name: Morph Fast Apply + provider: openai + model: morph-v0 + apiKey: + apiBase: https://api.morphllm.com/v1/ + roles: + - apply + - chat + promptTemplates: + apply: "{{{ original_code }}}\n{{{ new_code }}}" + ``` + + + ```json title="config.json" + { + "models": [ + { + "title": "Morph Fast Apply", + "provider": "openai", + "model": "morph-v0", + "apiKey": "", + "apiBase": "https://api.morphllm.com/v1/", + "roles": ["apply", "chat"], + "promptTemplates": { + "apply": "{{{ original_code }}}\n{{{ new_code }}}" + } + } + ] + } + ``` + + + diff --git a/docs/docs/customize/model-roles/apply.mdx b/docs/docs/customize/model-roles/apply.mdx index 040cdaa2e..883353a01 100644 --- a/docs/docs/customize/model-roles/apply.mdx +++ b/docs/docs/customize/model-roles/apply.mdx @@ -1,18 +1,8 @@ ---- -title: Apply Role -description: Apply model role -keywords: [apply, model, role] -sidebar_position: 4 ---- - -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - When editing code, Chat and Edit model output often doesn't clearly align with existing code. A model with the `apply` role is used to generate a more precise diff to apply changes to a file. ## Recommended Apply models -We recommend [Relace's Instant Apply model](https://hub.continue.dev/relace/instant-apply) for the fastest Apply experience. You can get an API key [here](https://app.relace.ai/settings/api-keys). +We recommend [Morph Fast Apply](https://morphllm.com) or [Relace's Instant Apply model](https://hub.continue.dev/relace/instant-apply) for the fastest Apply experience. You can sign up for Morph's generous free tier [here](https://morphllm.com/dashboard) or get a Relace API key [here](https://app.relace.ai/settings/api-keys). However, most Chat models can also be used for applying code changes. We recommend smaller/cheaper models for the task, such as Claude 3.5 Haiku. @@ -43,3 +33,19 @@ models: Please generate the final code without any markers or explanations. ``` + +### Morph Fast Apply Configuration + +```yaml +models: + - name: Morph Fast Apply + provider: openai + model: morph-v0 + apiKey: sk-test-123 + apiBase: https://api.morphllm.com/v1/ + roles: + - apply + - chat + promptTemplates: + apply: "{{{ original_code }}}\n{{{ new_code }}}" +``` diff --git a/extensions/vscode/config_schema.json b/extensions/vscode/config_schema.json index 48f6e2aaa..d76f67389 100644 --- a/extensions/vscode/config_schema.json +++ b/extensions/vscode/config_schema.json @@ -216,7 +216,8 @@ "siliconflow", "function-network", "scaleway", - "relace" + "relace", + "morph" ], "markdownEnumDescriptions": [ "### OpenAI\nUse gpt-4, gpt-3.5-turbo, or any other OpenAI model. See [here](https://openai.com/product#made-for-developers) to obtain an API key.\n\n> [Reference](https://docs.continue.dev/reference/Model%20Providers/openai)", @@ -263,7 +264,8 @@ "### SiliconFlow\nTo get started with SiliconFlow, obtain your API key from [SiliconCloud](https://cloud.siliconflow.cn/account/ak). SiliconCloud provides cost-effective GenAI services based on excellent open source basic models.\n> [Models](https://siliconflow.cn/zh-cn/models)", "### Function Network offers private, affordable user-owned AI\nTo get started with Function Network, obtain your API key from [Function Network](https://www.function.network/join-waitlist). Function Network provides a variety of models for chat, completion, and embeddings.", "### Scaleway\n Generative APIs are serverless endpoints for the most popular AI models.\nHosted in European data centers and priced competitively per million tokens used, models served by Scaleway are ideal for users requiring low latency, full data privacy, and 100% compliance with EU AI Act. To get access to the Scaleway Generative APIs, read the [Quickstart guide](https://www.scaleway.com/en/docs/ai-data/generative-apis/quickstart/) and get a [valid API key](https://www.scaleway.com/en/docs/identity-and-access-management/iam/how-to/create-api-keys/).", - "### Relace\n Relace provides a fast apply model. To get started, obtain an API key from [here](https://app.relace.ai/settings/api-keys)." + "### Relace\n Relace provides a fast apply model. To get started, obtain an API key from [here](https://app.relace.ai/settings/api-keys).", + "### Morph\nMorph provides a fast apply model. To get started, obtain an API key from [here](https://morphllm.com/dashboard)." ], "type": "string" },