mirror of
https://github.com/cosmicoptima/loom.git
synced 2026-07-22 07:40:25 +00:00
Compare commits
No commits in common. "master" and "1.21.1" have entirely different histories.
5 changed files with 1416 additions and 2079 deletions
28
common.ts
28
common.ts
|
|
@ -1,24 +1,13 @@
|
|||
export const PROVIDERS = [
|
||||
"cohere",
|
||||
"textsynth",
|
||||
"openai-compat",
|
||||
"openai",
|
||||
"openai-chat",
|
||||
"azure",
|
||||
"azure-chat",
|
||||
"anthropic",
|
||||
"openrouter",
|
||||
];
|
||||
export const PROVIDERS = ["cohere", "textsynth", "ocp", "openai", "openai-chat", "azure", "azure-chat", "anthropic"];
|
||||
export type Provider = (typeof PROVIDERS)[number];
|
||||
|
||||
type ProviderProps = {
|
||||
openai: { organization: string };
|
||||
"openai": { organization: string };
|
||||
"openai-chat": { organization: string };
|
||||
"openai-compat": { url: string };
|
||||
azure: { url: string };
|
||||
"ocp": { url: string };
|
||||
"azure": { url: string };
|
||||
"azure-chat": { url: string };
|
||||
anthropic: { url: string };
|
||||
openrouter: { quantization: string };
|
||||
"anthropic": { url: string };//, systemPrompt: string, userMessage: string };
|
||||
};
|
||||
|
||||
type SharedPresetSettings = {
|
||||
|
|
@ -29,8 +18,7 @@ type SharedPresetSettings = {
|
|||
apiKey: string;
|
||||
};
|
||||
|
||||
export type ModelPreset<P extends Provider> = SharedPresetSettings &
|
||||
(P extends keyof ProviderProps ? ProviderProps[P] : {}) & { provider: P };
|
||||
export type ModelPreset<P extends Provider> = SharedPresetSettings & (P extends keyof ProviderProps ? ProviderProps[P] : {}) & { provider: P };
|
||||
|
||||
export interface LoomSettings {
|
||||
passageFolder: string;
|
||||
|
|
@ -58,10 +46,10 @@ export interface LoomSettings {
|
|||
showSearchBar: boolean;
|
||||
showNodeBorders: boolean;
|
||||
showExport: boolean;
|
||||
|
||||
}
|
||||
|
||||
export const getPreset = (settings: LoomSettings) =>
|
||||
settings.modelPresets[settings.modelPreset];
|
||||
export const getPreset = (settings: LoomSettings) => settings.modelPresets[settings.modelPreset];
|
||||
|
||||
export type SearchResultState = "result" | "ancestor" | "none" | null;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "loom",
|
||||
"name": "Loom",
|
||||
"version": "1.22.6",
|
||||
"version": "1.21.1",
|
||||
"minAppVersion": "0.15.0",
|
||||
"description": "Loom in Obsidian",
|
||||
"author": "celeste",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "obsidian-loom",
|
||||
"version": "1.22.6",
|
||||
"version": "1.21.1",
|
||||
"description": "Loom in Obsidian",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
|
|
|
|||
Loading…
Reference in a new issue