-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c5dbd16
commit a29275c
Showing
13 changed files
with
161 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
import { version } from "."; | ||
import { getDebug, getReleaseHash } from "./_macro" with { type: "macro" }; | ||
// import { getDebug, getReleaseHash } from "./_macro" with { type: "macro" }; | ||
|
||
export const DEBUG = getDebug(); | ||
const hash = await getReleaseHash(); | ||
export const VERSION = `${version}-${hash}`; | ||
// export const DEBUG = getDebug(); | ||
// const hash = await getReleaseHash(); | ||
// export const VERSION = `${version}-${hash}`; | ||
|
||
export const DEBUG = false; | ||
export const VERSION = version; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
import { Literal, Union } from "runtypes"; | ||
|
||
export function withIds<T extends string>(items: T[] | readonly T[]) { | ||
return items.map((name) => ({ | ||
id: name, | ||
name, | ||
})); | ||
} | ||
export const providerTypes = ["anthropic", "mistral", "openai"] as const; | ||
export type ProviderType = (typeof providerTypes)[number]; | ||
export const providers = withIds(providerTypes); | ||
export const providerLabels = { | ||
anthropic: "Anthropic", | ||
mistral: "Mistral", | ||
openai: "OpenAI", | ||
} satisfies { [K in ProviderType]: string }; | ||
|
||
export const OpenAIModel = Union( | ||
Literal("gpt-4o"), | ||
Literal("gpt-4o-mini"), | ||
Literal("gpt-4"), | ||
Literal("gpt-4-turbo"), | ||
Literal("o1"), | ||
Literal("o1-preview"), | ||
Literal("o1-mini"), | ||
); | ||
export const AnthropicModel = Union( | ||
Literal("claude-3-5-sonnet-latest"), | ||
Literal("claude-3-5-haiku-latest"), | ||
Literal("claude-3-opus-latest"), | ||
); | ||
export const MistralModel = Union( | ||
Literal("mistral-large-latest"), | ||
Literal("mistral-medium-latest"), | ||
Literal("mistral-small-latest"), | ||
); | ||
|
||
export const modelOptions = { | ||
openai: OpenAIModel.alternatives.map((model) => model.value), | ||
anthropic: AnthropicModel.alternatives.map((model) => model.value), | ||
mistral: MistralModel.alternatives.map((model) => model.value), | ||
}; | ||
export const modelLabels = { | ||
openai: { | ||
"gpt-4o": "GPT-4o", | ||
"gpt-4o-mini": "GPT-4o Mini", | ||
"gpt-4": "GPT-4", | ||
"gpt-4-turbo": "GPT-4 Turbo", | ||
"o1": "O1", | ||
"o1-preview": "O1 Preview", | ||
"o1-mini": "O1 Mini", | ||
}, | ||
anthropic: { | ||
"claude-3-5-sonnet-latest": "Claude 3.5 Sonnet", | ||
"claude-3-5-haiku-latest": "Claude 3.5 Haiku", | ||
"claude-3-opus-latest": "Claude 3 Opus", | ||
}, | ||
mistral: { | ||
"mistral-large-latest": "Mistral Large", | ||
"mistral-medium-latest": "Mistral Medium", | ||
"mistral-small-latest": "Mistral Small", | ||
}, | ||
} as const; |
Oops, something went wrong.