✨ deepseek-coder support
This commit is contained in:
parent
eb7d2c6172
commit
086bf1afe6
20 changed files with 281 additions and 59 deletions
|
|
@ -106,7 +106,8 @@
|
|||
"llama.cpp",
|
||||
"replicate",
|
||||
"text-gen-webui",
|
||||
"google-palm"
|
||||
"google-palm",
|
||||
"lmstudio"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
|
|
@ -140,7 +141,8 @@
|
|||
"zephyr",
|
||||
"phind",
|
||||
"anthropic",
|
||||
"chatml"
|
||||
"chatml",
|
||||
"deepseek"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
|
|
@ -218,7 +220,10 @@
|
|||
"wizardcoder-13b",
|
||||
"wizardcoder-34b",
|
||||
"zephyr-7b",
|
||||
"codeup-13b"
|
||||
"codeup-13b",
|
||||
"deepseek-1b",
|
||||
"deepseek-7b",
|
||||
"deepseek-33b"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -379,7 +384,10 @@
|
|||
"wizardcoder-13b",
|
||||
"wizardcoder-34b",
|
||||
"zephyr-7b",
|
||||
"codeup-13b"
|
||||
"codeup-13b",
|
||||
"deepseek-1b",
|
||||
"deepseek-7b",
|
||||
"deepseek-33b"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -448,7 +456,6 @@
|
|||
"properties": {
|
||||
"provider": {
|
||||
"enum": [
|
||||
"ollama",
|
||||
"huggingface-tgi",
|
||||
"huggingface-inference-api",
|
||||
"llama.cpp",
|
||||
|
|
@ -458,6 +465,39 @@
|
|||
},
|
||||
"required": ["provider"]
|
||||
},
|
||||
"then": {
|
||||
"properties": {
|
||||
"model": {
|
||||
"enum": [
|
||||
"mistral-7b",
|
||||
"llama2-7b",
|
||||
"llama2-13b",
|
||||
"codellama-7b",
|
||||
"codellama-13b",
|
||||
"codellama-34b",
|
||||
"phind-codellama-34b",
|
||||
"wizardcoder-7b",
|
||||
"wizardcoder-13b",
|
||||
"wizardcoder-34b",
|
||||
"zephyr-7b",
|
||||
"codeup-13b",
|
||||
"deepseek-1b",
|
||||
"deepseek-7b",
|
||||
"deepseek-33b"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"properties": {
|
||||
"provider": {
|
||||
"enum": ["ollama"]
|
||||
}
|
||||
},
|
||||
"required": ["provider"]
|
||||
},
|
||||
"then": {
|
||||
"properties": {
|
||||
"model": {
|
||||
|
|
|
|||
5
extensions/vscode/schema/ContinueConfig.d.ts
vendored
5
extensions/vscode/schema/ContinueConfig.d.ts
vendored
|
|
@ -146,7 +146,8 @@ export type Step1 =
|
|||
| "ClearHistoryStep"
|
||||
| "StackOverflowStep"
|
||||
| "OpenConfigStep"
|
||||
);
|
||||
)
|
||||
| string;
|
||||
/**
|
||||
* An array of slash commands that let you map custom Steps to a shortcut.
|
||||
*/
|
||||
|
|
@ -291,7 +292,7 @@ export interface ChatMessage {
|
|||
role: Role;
|
||||
content?: Content;
|
||||
name?: Name1;
|
||||
summary: Summary;
|
||||
summary?: Summary;
|
||||
function_call?: FunctionCall;
|
||||
[k: string]: unknown;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ export type ContextLength = number;
|
|||
/**
|
||||
* The chat template used to format messages. This is auto-detected for most models, but can be overridden here.
|
||||
*/
|
||||
export type Template = "llama2" | "alpaca" | "zephyr" | "phind" | "anthropic" | "chatml";
|
||||
export type Template = "llama2" | "alpaca" | "zephyr" | "phind" | "anthropic" | "chatml" | "deepseek";
|
||||
/**
|
||||
* Options for the completion endpoint. Read more about the completion options in the documentation.
|
||||
*/
|
||||
|
|
|
|||
3
extensions/vscode/schema/ModelName.d.ts
vendored
3
extensions/vscode/schema/ModelName.d.ts
vendored
|
|
@ -24,5 +24,8 @@ export type ModelName =
|
|||
| "wizardcoder-34b"
|
||||
| "zephyr-7b"
|
||||
| "codeup-13b"
|
||||
| "deepseek-1b"
|
||||
| "deepseek-7b"
|
||||
| "deepseek-33b"
|
||||
| "claude-2"
|
||||
| "chat-bison-001";
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ export type ContextLength = number;
|
|||
/**
|
||||
* The chat template used to format messages. This is auto-detected for most models, but can be overridden here.
|
||||
*/
|
||||
export type Template = "llama2" | "alpaca" | "zephyr" | "phind" | "anthropic" | "chatml";
|
||||
export type Template = "llama2" | "alpaca" | "zephyr" | "phind" | "anthropic" | "chatml" | "deepseek";
|
||||
/**
|
||||
* Options for the completion endpoint. Read more about the completion options in the documentation.
|
||||
*/
|
||||
|
|
@ -153,7 +153,8 @@ export type Step =
|
|||
| "ClearHistoryStep"
|
||||
| "StackOverflowStep"
|
||||
| "OpenConfigStep"
|
||||
);
|
||||
)
|
||||
| string;
|
||||
/**
|
||||
* An array of slash commands that let you map custom Steps to a shortcut.
|
||||
*/
|
||||
|
|
|
|||
5
gui/src/schema/ContinueConfig.d.ts
vendored
5
gui/src/schema/ContinueConfig.d.ts
vendored
|
|
@ -146,7 +146,8 @@ export type Step1 =
|
|||
| "ClearHistoryStep"
|
||||
| "StackOverflowStep"
|
||||
| "OpenConfigStep"
|
||||
);
|
||||
)
|
||||
| string;
|
||||
/**
|
||||
* An array of slash commands that let you map custom Steps to a shortcut.
|
||||
*/
|
||||
|
|
@ -291,7 +292,7 @@ export interface ChatMessage {
|
|||
role: Role;
|
||||
content?: Content;
|
||||
name?: Name1;
|
||||
summary: Summary;
|
||||
summary?: Summary;
|
||||
function_call?: FunctionCall;
|
||||
[k: string]: unknown;
|
||||
}
|
||||
|
|
|
|||
2
gui/src/schema/ModelDescription.d.ts
vendored
2
gui/src/schema/ModelDescription.d.ts
vendored
|
|
@ -46,7 +46,7 @@ export type ContextLength = number;
|
|||
/**
|
||||
* The chat template used to format messages. This is auto-detected for most models, but can be overridden here.
|
||||
*/
|
||||
export type Template = "llama2" | "alpaca" | "zephyr" | "phind" | "anthropic" | "chatml";
|
||||
export type Template = "llama2" | "alpaca" | "zephyr" | "phind" | "anthropic" | "chatml" | "deepseek";
|
||||
/**
|
||||
* Options for the completion endpoint. Read more about the completion options in the documentation.
|
||||
*/
|
||||
|
|
|
|||
3
gui/src/schema/ModelName.d.ts
vendored
3
gui/src/schema/ModelName.d.ts
vendored
|
|
@ -24,5 +24,8 @@ export type ModelName =
|
|||
| "wizardcoder-34b"
|
||||
| "zephyr-7b"
|
||||
| "codeup-13b"
|
||||
| "deepseek-1b"
|
||||
| "deepseek-7b"
|
||||
| "deepseek-33b"
|
||||
| "claude-2"
|
||||
| "chat-bison-001";
|
||||
|
|
|
|||
5
gui/src/schema/SerializedContinueConfig.d.ts
vendored
5
gui/src/schema/SerializedContinueConfig.d.ts
vendored
|
|
@ -54,7 +54,7 @@ export type ContextLength = number;
|
|||
/**
|
||||
* The chat template used to format messages. This is auto-detected for most models, but can be overridden here.
|
||||
*/
|
||||
export type Template = "llama2" | "alpaca" | "zephyr" | "phind" | "anthropic" | "chatml";
|
||||
export type Template = "llama2" | "alpaca" | "zephyr" | "phind" | "anthropic" | "chatml" | "deepseek";
|
||||
/**
|
||||
* Options for the completion endpoint. Read more about the completion options in the documentation.
|
||||
*/
|
||||
|
|
@ -153,7 +153,8 @@ export type Step =
|
|||
| "ClearHistoryStep"
|
||||
| "StackOverflowStep"
|
||||
| "OpenConfigStep"
|
||||
);
|
||||
)
|
||||
| string;
|
||||
/**
|
||||
* An array of slash commands that let you map custom Steps to a shortcut.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -299,18 +299,17 @@ const zephyr: ModelPackage = {
|
|||
providerOptions: ["ollama", "lmstudio", "llamacpp", "replicate"],
|
||||
};
|
||||
|
||||
// const deepseek: ModelPackage = {
|
||||
// title: "DeepSeek-Coder",
|
||||
// description:
|
||||
// "A fine-tune of Mistral, trained on publicly available and synthetic datasets.",
|
||||
// params: {
|
||||
// title: "DeepSeek",
|
||||
// model: "deepseek-7b",
|
||||
// context_length: 2048,
|
||||
// },
|
||||
// icon: "mistral.png",
|
||||
// providerOptions: ["ollama", "lmstudio", "llamacpp", "replicate"],
|
||||
// };
|
||||
const deepseek: ModelPackage = {
|
||||
title: "DeepSeek-Coder",
|
||||
description:
|
||||
"A model pre-trained on 2 trillion tokens including 80+ programming languages and a repo-level corpus.",
|
||||
params: {
|
||||
title: "DeepSeek",
|
||||
model: "deepseek-7b",
|
||||
context_length: 2048,
|
||||
},
|
||||
providerOptions: ["lmstudio", "llamacpp"],
|
||||
};
|
||||
|
||||
const codeup: ModelPackage = {
|
||||
title: "CodeUp (13b)",
|
||||
|
|
@ -414,6 +413,7 @@ export const MODEL_INFO: ModelPackage[] = [
|
|||
codeup,
|
||||
chatBison,
|
||||
zephyr,
|
||||
deepseek,
|
||||
];
|
||||
|
||||
export const PROVIDER_INFO: { [key: string]: ModelInfo } = {
|
||||
|
|
@ -528,7 +528,7 @@ export const PROVIDER_INFO: { [key: string]: ModelInfo } = {
|
|||
params: {
|
||||
server_url: "http://localhost:1234",
|
||||
},
|
||||
packages: osModels,
|
||||
packages: [...osModels, deepseek],
|
||||
collectInputFor: [...completionParamsInputs],
|
||||
},
|
||||
replicate: {
|
||||
|
|
@ -574,7 +574,7 @@ export const PROVIDER_INFO: { [key: string]: ModelInfo } = {
|
|||
After it's up and running, you can start using Continue.`,
|
||||
icon: "llamacpp.png",
|
||||
tags: [ModelProviderTag.Local, ModelProviderTag["Open-Source"]],
|
||||
packages: osModels,
|
||||
packages: [...osModels, deepseek],
|
||||
collectInputFor: [...completionParamsInputs],
|
||||
},
|
||||
textgenwebui: {
|
||||
|
|
@ -595,7 +595,7 @@ After it's up and running, you can start using Continue.`,
|
|||
6. Once the model is loaded, you can start using Continue`,
|
||||
icon: undefined,
|
||||
tags: [ModelProviderTag.Local, ModelProviderTag["Open-Source"]],
|
||||
packages: osModels,
|
||||
packages: [...osModels, deepseek],
|
||||
collectInputFor: [...completionParamsInputs],
|
||||
},
|
||||
palm: {
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@
|
|||
},
|
||||
"content": {
|
||||
"title": "Content",
|
||||
"default": "",
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
|
|
@ -51,8 +52,7 @@
|
|||
}
|
||||
},
|
||||
"required": [
|
||||
"role",
|
||||
"summary"
|
||||
"role"
|
||||
]
|
||||
},
|
||||
"Step": {
|
||||
|
|
@ -137,7 +137,7 @@
|
|||
"max_tokens": {
|
||||
"title": "Max Tokens",
|
||||
"description": "The maximum number of tokens to generate.",
|
||||
"default": 600,
|
||||
"default": 1023,
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
|
|
@ -217,7 +217,7 @@
|
|||
"presence_penalty": null,
|
||||
"frequency_penalty": null,
|
||||
"stop": null,
|
||||
"max_tokens": 600
|
||||
"max_tokens": 1023
|
||||
},
|
||||
"allOf": [
|
||||
{
|
||||
|
|
@ -351,6 +351,9 @@
|
|||
"OpenConfigStep"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
@ -602,7 +605,7 @@
|
|||
"presence_penalty": null,
|
||||
"frequency_penalty": null,
|
||||
"stop": null,
|
||||
"max_tokens": 600
|
||||
"max_tokens": 1023
|
||||
},
|
||||
"request_options": {
|
||||
"timeout": 300,
|
||||
|
|
@ -615,7 +618,33 @@
|
|||
"template_messages": null,
|
||||
"api_key": null,
|
||||
"api_base": null,
|
||||
"llm": null,
|
||||
"llm": {
|
||||
"title": null,
|
||||
"model": "gpt-4",
|
||||
"system_message": null,
|
||||
"context_length": 2048,
|
||||
"completion_options": {
|
||||
"temperature": null,
|
||||
"top_p": null,
|
||||
"top_k": null,
|
||||
"presence_penalty": null,
|
||||
"frequency_penalty": null,
|
||||
"stop": null,
|
||||
"max_tokens": 1023
|
||||
},
|
||||
"request_options": {
|
||||
"timeout": 300,
|
||||
"verify_ssl": null,
|
||||
"ca_bundle_path": null,
|
||||
"proxy": null,
|
||||
"headers": null
|
||||
},
|
||||
"prompt_templates": {},
|
||||
"template_messages": null,
|
||||
"api_key": null,
|
||||
"api_base": null,
|
||||
"class_name": "ProxyServer"
|
||||
},
|
||||
"class_name": "OpenAIFreeTrial"
|
||||
},
|
||||
"summarize": {
|
||||
|
|
@ -630,7 +659,7 @@
|
|||
"presence_penalty": null,
|
||||
"frequency_penalty": null,
|
||||
"stop": null,
|
||||
"max_tokens": 600
|
||||
"max_tokens": 1023
|
||||
},
|
||||
"request_options": {
|
||||
"timeout": 300,
|
||||
|
|
@ -643,7 +672,33 @@
|
|||
"template_messages": null,
|
||||
"api_key": null,
|
||||
"api_base": null,
|
||||
"llm": null,
|
||||
"llm": {
|
||||
"title": null,
|
||||
"model": "gpt-3.5-turbo",
|
||||
"system_message": null,
|
||||
"context_length": 2048,
|
||||
"completion_options": {
|
||||
"temperature": null,
|
||||
"top_p": null,
|
||||
"top_k": null,
|
||||
"presence_penalty": null,
|
||||
"frequency_penalty": null,
|
||||
"stop": null,
|
||||
"max_tokens": 1023
|
||||
},
|
||||
"request_options": {
|
||||
"timeout": 300,
|
||||
"verify_ssl": null,
|
||||
"ca_bundle_path": null,
|
||||
"proxy": null,
|
||||
"headers": null
|
||||
},
|
||||
"prompt_templates": {},
|
||||
"template_messages": null,
|
||||
"api_key": null,
|
||||
"api_base": null,
|
||||
"class_name": "ProxyServer"
|
||||
},
|
||||
"class_name": "OpenAIFreeTrial"
|
||||
},
|
||||
"edit": {
|
||||
|
|
@ -658,7 +713,7 @@
|
|||
"presence_penalty": null,
|
||||
"frequency_penalty": null,
|
||||
"stop": null,
|
||||
"max_tokens": 600
|
||||
"max_tokens": 1023
|
||||
},
|
||||
"request_options": {
|
||||
"timeout": 300,
|
||||
|
|
@ -671,7 +726,33 @@
|
|||
"template_messages": null,
|
||||
"api_key": null,
|
||||
"api_base": null,
|
||||
"llm": null,
|
||||
"llm": {
|
||||
"title": null,
|
||||
"model": "gpt-4",
|
||||
"system_message": null,
|
||||
"context_length": 2048,
|
||||
"completion_options": {
|
||||
"temperature": null,
|
||||
"top_p": null,
|
||||
"top_k": null,
|
||||
"presence_penalty": null,
|
||||
"frequency_penalty": null,
|
||||
"stop": null,
|
||||
"max_tokens": 1023
|
||||
},
|
||||
"request_options": {
|
||||
"timeout": 300,
|
||||
"verify_ssl": null,
|
||||
"ca_bundle_path": null,
|
||||
"proxy": null,
|
||||
"headers": null
|
||||
},
|
||||
"prompt_templates": {},
|
||||
"template_messages": null,
|
||||
"api_key": null,
|
||||
"api_base": null,
|
||||
"class_name": "ProxyServer"
|
||||
},
|
||||
"class_name": "OpenAIFreeTrial"
|
||||
},
|
||||
"chat": {
|
||||
|
|
@ -686,7 +767,7 @@
|
|||
"presence_penalty": null,
|
||||
"frequency_penalty": null,
|
||||
"stop": null,
|
||||
"max_tokens": 600
|
||||
"max_tokens": 1023
|
||||
},
|
||||
"request_options": {
|
||||
"timeout": 300,
|
||||
|
|
@ -699,7 +780,33 @@
|
|||
"template_messages": null,
|
||||
"api_key": null,
|
||||
"api_base": null,
|
||||
"llm": null,
|
||||
"llm": {
|
||||
"title": null,
|
||||
"model": "gpt-4",
|
||||
"system_message": null,
|
||||
"context_length": 2048,
|
||||
"completion_options": {
|
||||
"temperature": null,
|
||||
"top_p": null,
|
||||
"top_k": null,
|
||||
"presence_penalty": null,
|
||||
"frequency_penalty": null,
|
||||
"stop": null,
|
||||
"max_tokens": 1023
|
||||
},
|
||||
"request_options": {
|
||||
"timeout": 300,
|
||||
"verify_ssl": null,
|
||||
"ca_bundle_path": null,
|
||||
"proxy": null,
|
||||
"headers": null
|
||||
},
|
||||
"prompt_templates": {},
|
||||
"template_messages": null,
|
||||
"api_key": null,
|
||||
"api_base": null,
|
||||
"class_name": "ProxyServer"
|
||||
},
|
||||
"class_name": "OpenAIFreeTrial"
|
||||
},
|
||||
"saved": [],
|
||||
|
|
@ -727,7 +834,7 @@
|
|||
"presence_penalty": null,
|
||||
"frequency_penalty": null,
|
||||
"stop": null,
|
||||
"max_tokens": 600
|
||||
"max_tokens": 1023
|
||||
},
|
||||
"allOf": [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
"max_tokens": {
|
||||
"title": "Max Tokens",
|
||||
"description": "The maximum number of tokens to generate.",
|
||||
"default": 600,
|
||||
"default": 1023,
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
|
|
@ -122,7 +122,7 @@
|
|||
"presence_penalty": null,
|
||||
"frequency_penalty": null,
|
||||
"stop": null,
|
||||
"max_tokens": 600
|
||||
"max_tokens": 1023
|
||||
},
|
||||
"allOf": [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
"max_tokens": {
|
||||
"title": "Max Tokens",
|
||||
"description": "The maximum number of tokens to generate.",
|
||||
"default": 600,
|
||||
"default": 1023,
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
|
|
@ -141,7 +141,8 @@
|
|||
"zephyr",
|
||||
"phind",
|
||||
"anthropic",
|
||||
"chatml"
|
||||
"chatml",
|
||||
"deepseek"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
|
|
@ -155,7 +156,7 @@
|
|||
"presence_penalty": null,
|
||||
"frequency_penalty": null,
|
||||
"stop": null,
|
||||
"max_tokens": 600
|
||||
"max_tokens": 1023
|
||||
},
|
||||
"allOf": [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -19,6 +19,9 @@
|
|||
"wizardcoder-34b",
|
||||
"zephyr-7b",
|
||||
"codeup-13b",
|
||||
"deepseek-1b",
|
||||
"deepseek-7b",
|
||||
"deepseek-33b",
|
||||
"claude-2",
|
||||
"chat-bison-001"
|
||||
],
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
"max_tokens": {
|
||||
"title": "Max Tokens",
|
||||
"description": "The maximum number of tokens to generate.",
|
||||
"default": 600,
|
||||
"default": 1023,
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
|
|
@ -122,7 +122,7 @@
|
|||
"presence_penalty": null,
|
||||
"frequency_penalty": null,
|
||||
"stop": null,
|
||||
"max_tokens": 600
|
||||
"max_tokens": 1023
|
||||
},
|
||||
"allOf": [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
"max_tokens": {
|
||||
"title": "Max Tokens",
|
||||
"description": "The maximum number of tokens to generate.",
|
||||
"default": 600,
|
||||
"default": 1023,
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
|
|
@ -141,7 +141,8 @@
|
|||
"zephyr",
|
||||
"phind",
|
||||
"anthropic",
|
||||
"chatml"
|
||||
"chatml",
|
||||
"deepseek"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
|
|
@ -155,7 +156,7 @@
|
|||
"presence_penalty": null,
|
||||
"frequency_penalty": null,
|
||||
"stop": null,
|
||||
"max_tokens": 600
|
||||
"max_tokens": 1023
|
||||
},
|
||||
"allOf": [
|
||||
{
|
||||
|
|
@ -248,6 +249,9 @@
|
|||
"OpenConfigStep"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
@ -404,7 +408,27 @@
|
|||
"title": "GPT-4 (trial)",
|
||||
"provider": "openai-free-trial",
|
||||
"model": "gpt-4",
|
||||
"api_key": ""
|
||||
"api_key": "",
|
||||
"api_base": null,
|
||||
"context_length": 2048,
|
||||
"template": null,
|
||||
"completion_options": {
|
||||
"temperature": null,
|
||||
"top_p": null,
|
||||
"top_k": null,
|
||||
"presence_penalty": null,
|
||||
"frequency_penalty": null,
|
||||
"stop": null,
|
||||
"max_tokens": 1023
|
||||
},
|
||||
"system_message": null,
|
||||
"request_options": {
|
||||
"timeout": 300,
|
||||
"verify_ssl": null,
|
||||
"ca_bundle_path": null,
|
||||
"proxy": null,
|
||||
"headers": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"type": "array",
|
||||
|
|
@ -442,7 +466,7 @@
|
|||
"presence_penalty": null,
|
||||
"frequency_penalty": null,
|
||||
"stop": null,
|
||||
"max_tokens": 600
|
||||
"max_tokens": 1023
|
||||
},
|
||||
"allOf": [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -329,9 +329,7 @@ class Autopilot:
|
|||
if self.sdk.config.disable_summaries:
|
||||
return "New Session"
|
||||
else:
|
||||
chat_history = list(
|
||||
map(lambda x: x.dict(), await self.sdk.get_chat_context())
|
||||
)
|
||||
chat_history = await self.sdk.get_chat_context()
|
||||
chat_history_str = template_alpaca_messages(chat_history)
|
||||
if self.sdk.models.summarize is None:
|
||||
return "New Session"
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ from typing import Any, Dict, Literal, Optional
|
|||
from ...libs.llm.prompts.chat import (
|
||||
anthropic_template_messages,
|
||||
chatml_template_messages,
|
||||
deepseek_template_messages,
|
||||
llama2_template_messages,
|
||||
phind_template_messages,
|
||||
template_alpaca_messages,
|
||||
|
|
@ -11,6 +12,7 @@ from ...libs.llm.prompts.chat import (
|
|||
from ...libs.llm.prompts.edit import (
|
||||
alpaca_edit_prompt,
|
||||
codellama_edit_prompt,
|
||||
deepseek_edit_prompt,
|
||||
phind_edit_prompt,
|
||||
simplest_edit_prompt,
|
||||
zephyr_edit_prompt,
|
||||
|
|
@ -28,7 +30,9 @@ StepName = Literal[
|
|||
"GenerateShellCommandStep",
|
||||
]
|
||||
|
||||
TemplateType = Literal["llama2", "alpaca", "zephyr", "phind", "anthropic", "chatml"]
|
||||
TemplateType = Literal[
|
||||
"llama2", "alpaca", "zephyr", "phind", "anthropic", "chatml", "deepseek"
|
||||
]
|
||||
|
||||
|
||||
def autodetect_template_type(model: str) -> Optional[TemplateType]:
|
||||
|
|
@ -54,6 +58,9 @@ def autodetect_template_type(model: str) -> Optional[TemplateType]:
|
|||
if "mistral" in lower:
|
||||
return "llama2"
|
||||
|
||||
if "deepseek" in lower:
|
||||
return "deepseek"
|
||||
|
||||
return "chatml"
|
||||
|
||||
|
||||
|
|
@ -66,6 +73,7 @@ def autodetect_template_function(model: str):
|
|||
"zephyr": zephyr_template_messages,
|
||||
"anthropic": anthropic_template_messages,
|
||||
"chatml": chatml_template_messages,
|
||||
"deepseek": deepseek_template_messages,
|
||||
}
|
||||
return mapping[template_type]
|
||||
return None
|
||||
|
|
@ -85,6 +93,8 @@ def autodetect_prompt_templates(model: str):
|
|||
edit_template = codellama_edit_prompt
|
||||
elif template_type == "alpaca":
|
||||
edit_template = alpaca_edit_prompt
|
||||
elif template_type == "deepseek":
|
||||
edit_template = deepseek_edit_prompt
|
||||
elif template_type is not None:
|
||||
edit_template = simplest_edit_prompt
|
||||
|
||||
|
|
@ -162,6 +172,9 @@ MODELS = [
|
|||
"wizardcoder-34b",
|
||||
"zephyr-7b",
|
||||
"codeup-13b",
|
||||
"deepseek-1b",
|
||||
"deepseek-7b",
|
||||
"deepseek-33b",
|
||||
# Anthropic
|
||||
"claude-2",
|
||||
# Google PaLM
|
||||
|
|
@ -189,6 +202,9 @@ ModelName = Literal[
|
|||
"wizardcoder-34b",
|
||||
"zephyr-7b",
|
||||
"codeup-13b",
|
||||
"deepseek-1b",
|
||||
"deepseek-7b",
|
||||
"deepseek-33b",
|
||||
# Anthropic
|
||||
"claude-2",
|
||||
# Google PaLM
|
||||
|
|
|
|||
|
|
@ -79,6 +79,23 @@ _phind_edit_prompt = dedent(
|
|||
"""
|
||||
)
|
||||
|
||||
_deepseek_edit_prompt = dedent(
|
||||
"""\
|
||||
### System Prompt
|
||||
You are an AI programming assistant, utilizing the DeepSeek Coder model, developed by DeepSeek Company, and you only answer questions related to computer science. For politically sensitive questions, security and privacy issues, and other non-computer science questions, you will refuse to answer.
|
||||
### Instruction:
|
||||
Rewrite the code to satisfy this request: "{{{user_input}}}"
|
||||
|
||||
```
|
||||
{{{code_to_edit}}}
|
||||
```<|EOT|>
|
||||
### Response:
|
||||
Sure! Here's the code you requested:
|
||||
|
||||
```
|
||||
"""
|
||||
)
|
||||
|
||||
_zephyr_edit_prompt = dedent(
|
||||
"""\
|
||||
<|system|>
|
||||
|
|
@ -103,3 +120,6 @@ codellama_edit_prompt = PromptTemplate(
|
|||
alpaca_edit_prompt = PromptTemplate(prompt=_alpaca_edit_prompt, raw=True, stop=["```"])
|
||||
phind_edit_prompt = PromptTemplate(prompt=_phind_edit_prompt, raw=True, stop=["```"])
|
||||
zephyr_edit_prompt = PromptTemplate(prompt=_zephyr_edit_prompt, raw=True, stop=["```"])
|
||||
deepseek_edit_prompt = PromptTemplate(
|
||||
prompt=_deepseek_edit_prompt, raw=True, stop=["```"]
|
||||
)
|
||||
|
|
|
|||
|
|
@ -60,6 +60,9 @@ class URLContextProvider(ContextProvider):
|
|||
)
|
||||
|
||||
def _get_url_text_contents_and_title(self, url: str) -> Tuple[str, str]:
|
||||
if not url.startswith("http"):
|
||||
url = "https://" + url
|
||||
|
||||
response = requests.get(url)
|
||||
soup = BeautifulSoup(response.text, "html.parser")
|
||||
title = url.replace("https://", "").replace("http://", "").replace("www.", "")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue