add claude3 to free trial

This commit is contained in:
Nate Sesti 2024-03-17 23:51:02 -07:00
parent 601f23ce79
commit bde7f59d76
5 changed files with 40 additions and 19 deletions

View file

@ -27,6 +27,11 @@ export const defaultConfig: SerializedContinueConfig = {
provider: "free-trial",
model: "mistral-8x7b",
},
{
title: "Claude 3 Sonnet (Free Trial)",
provider: "free-trial",
model: "claude-3-sonnet-20240229",
},
],
slashCommands: [
{
@ -98,6 +103,11 @@ export const defaultConfigJetBrains: SerializedContinueConfig = {
provider: "free-trial",
model: "mistral-8x7b",
},
{
title: "Claude 3 Sonnet (Free Trial)",
provider: "free-trial",
model: "claude-3-sonnet-20240229",
},
],
slashCommands: [
{

27
core/index.d.ts vendored
View file

@ -16,7 +16,7 @@ declare global {
postIntellijMessage?: (
messageType: string,
data: any,
messageIde: string
messageIde: string,
) => void;
}
}
@ -73,17 +73,17 @@ export interface ILLM extends LLMOptions {
streamComplete(
prompt: string,
options?: LLMFullCompletionOptions
options?: LLMFullCompletionOptions,
): AsyncGenerator<string, LLMReturnValue>;
streamChat(
messages: ChatMessage[],
options?: LLMFullCompletionOptions
options?: LLMFullCompletionOptions,
): AsyncGenerator<ChatMessage, LLMReturnValue>;
chat(
messages: ChatMessage[],
options?: LLMFullCompletionOptions
options?: LLMFullCompletionOptions,
): Promise<ChatMessage>;
countTokens(text: string): number;
@ -123,10 +123,10 @@ export interface CustomContextProvider {
type?: ContextProviderType;
getContextItems(
query: string,
extras: ContextProviderExtras
extras: ContextProviderExtras,
): Promise<ContextItem[]>;
loadSubmenuItems?: (
args: LoadSubmenuItemsArgs
args: LoadSubmenuItemsArgs,
) => Promise<ContextSubmenuItem[]>;
}
@ -141,7 +141,7 @@ export interface IContextProvider {
getContextItems(
query: string,
extras: ContextProviderExtras
extras: ContextProviderExtras,
): Promise<ContextItem[]>;
loadSubmenuItems(args: LoadSubmenuItemsArgs): Promise<ContextSubmenuItem[]>;
@ -287,15 +287,15 @@ export interface CustomLLMWithOptionals {
streamCompletion?: (
prompt: string,
options: CompletionOptions,
fetch: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>
fetch: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>,
) => AsyncGenerator<string>;
streamChat?: (
messages: ChatMessage[],
options: CompletionOptions,
fetch: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>
fetch: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>,
) => AsyncGenerator<string>;
listModels?: (
fetch: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>
fetch: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>,
) => Promise<string[]>;
}
@ -348,7 +348,7 @@ export interface IDE {
getDebugLocals(threadIndex: number): Promise<string>;
getTopLevelCallStackSources(
threadIndex: number,
stackDepth: number
stackDepth: number,
): Promise<string[]>;
getAvailableThreads(): Promise<Thread[]>;
listWorkspaceContents(directory?: string): Promise<string[]>;
@ -366,12 +366,12 @@ export interface IDE {
showLines(
filepath: string,
startLine: number,
endLine: number
endLine: number,
): Promise<void>;
showDiff(
filepath: string,
newContents: string,
stepIndex: number
stepIndex: number,
): Promise<void>;
getOpenFiles(): Promise<string[]>;
getPinnedFiles(): Promise<string[]>;
@ -513,6 +513,7 @@ export type ModelName =
| "claude-2"
| "claude-3-opus-20240229"
| "claude-3-sonnet-20240229"
| "claude-3-haiku-20240307"
| "claude-2.1"
// Google PaLM
| "chat-bison-001"

View file

@ -151,8 +151,9 @@ function autodetectTemplateType(model: string): TemplateType | undefined {
return "zephyr";
}
// Claude requests always sent through Messages API, so formatting not necessary
if (lower.includes("claude")) {
return "anthropic";
return "none";
}
if (lower.includes("alpaca") || lower.includes("wizard")) {

View file

@ -427,6 +427,9 @@
"gpt-4-vision-preview",
"codellama-70b",
"mistral-8x7b",
"claude-3-opus-20240229",
"claude-3-sonnet-20240229",
"claude-3-haiku-20240307",
"AUTODETECT"
]
}
@ -514,6 +517,7 @@
"claude-instant-1",
"claude-3-opus-20240229",
"claude-3-sonnet-20240229",
"claude-3-haiku-20240307",
"claude-2.1"
]
},
@ -862,6 +866,7 @@
"claude-instant-1",
"claude-3-opus-20240229",
"claude-3-sonnet-20240229",
"claude-3-haiku-20240307",
"claude-2.1",
"chat-bison-001",
"gemini-pro",

View file

@ -562,7 +562,7 @@ const claude3Opus: ModelPackage = {
title: "Claude 3 Opus",
apiKey: "",
},
providerOptions: ["anthropic"],
providerOptions: ["anthropic", "freetrial"],
icon: "anthropic.png",
};
@ -576,7 +576,7 @@ const claude3Sonnet: ModelPackage = {
title: "Claude 3 Sonnet",
apiKey: "",
},
providerOptions: ["anthropic"],
providerOptions: ["anthropic", "freetrial"],
icon: "anthropic.png",
};
@ -585,12 +585,12 @@ const claude3Haiku: ModelPackage = {
description:
"The third most capable model in the Claude 3 series: fastest and most compact model for near-instant responsiveness",
params: {
model: "claude-2",
model: "claude-3-haiku-20240307",
contextLength: 200_000,
title: "Claude 3 Haiku",
apiKey: "",
},
providerOptions: ["anthropic"],
providerOptions: ["anthropic", "freetrial"],
icon: "anthropic.png",
};
@ -625,6 +625,7 @@ export const MODEL_INFO: ModelPackage[] = [
geminiPro,
claude3Opus,
claude3Sonnet,
claude3Haiku,
claude2,
deepseek,
mistral,
@ -693,7 +694,7 @@ export const PROVIDER_INFO: { [key: string]: ModelInfo } = {
defaultValue: 100_000,
},
],
packages: [claude3Opus, claude3Sonnet, claude2],
packages: [claude3Opus, claude3Sonnet, claude3Haiku, claude2],
},
ollama: {
title: "Ollama",
@ -929,6 +930,9 @@ After it's up and running, you can start using Continue.`,
packages: [
codellama70bTrial,
mixtralTrial,
{ ...claude3Opus, title: "Claude 3 Opus (trial)" },
{ ...claude3Sonnet, title: "Claude 3 Sonnet (trial)" },
{ ...claude3Haiku, title: "Claude 3 Haiku (trial)" },
{ ...geminiPro, title: "Gemini Pro (trial)" },
{ ...gpt4vision, title: "GPT-4 Vision (trial)" },
{ ...gpt35turbo, title: "GPT-3.5-Turbo (trial)" },