Compare commits

..

9 commits

Author SHA1 Message Date
celeste
afbb3519f1 hehe 2025-03-19 22:53:10 -07:00
celeste
53ef92e076 bugfixes 2025-03-19 22:41:22 -07:00
celeste
518a90f587 Add Llama 3.1 405b (and remove cd2) autofill 2024-09-04 00:25:18 -07:00
celeste
93599ed192 Fix OpenRouter error reporting 2024-09-03 23:47:17 -07:00
celeste
788d91b2b1 Use cl100k for LLaMa 3.1 2024-09-03 21:23:25 -07:00
celeste
c624fd9282 Add HTTP-Referer/X-Title to OpenRouter 2024-09-03 20:10:38 -07:00
celeste
0aee3e1cff Add OpenRouter + other minor improvements 2024-09-03 20:07:46 -07:00
celeste
6dc19e3196 fix 405b 2024-08-28 20:18:45 -07:00
celeste
ba0fe89876 temporarily disable broken shift+click switch 2024-07-25 18:50:08 -07:00
5 changed files with 2079 additions and 1416 deletions

View file

@ -1,13 +1,24 @@
export const PROVIDERS = ["cohere", "textsynth", "ocp", "openai", "openai-chat", "azure", "azure-chat", "anthropic"];
export const PROVIDERS = [
"cohere",
"textsynth",
"openai-compat",
"openai",
"openai-chat",
"azure",
"azure-chat",
"anthropic",
"openrouter",
];
export type Provider = (typeof PROVIDERS)[number];
type ProviderProps = {
"openai": { organization: string };
openai: { organization: string };
"openai-chat": { organization: string };
"ocp": { url: string };
"azure": { url: string };
"openai-compat": { url: string };
azure: { url: string };
"azure-chat": { url: string };
"anthropic": { url: string };//, systemPrompt: string, userMessage: string };
anthropic: { url: string };
openrouter: { quantization: string };
};
type SharedPresetSettings = {
@ -18,7 +29,8 @@ 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;
@ -46,10 +58,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;

2296
main.ts

File diff suppressed because it is too large Load diff

View file

@ -1,7 +1,7 @@
{
"id": "loom",
"name": "Loom",
"version": "1.21.1",
"version": "1.22.6",
"minAppVersion": "0.15.0",
"description": "Loom in Obsidian",
"author": "celeste",

View file

@ -1,6 +1,6 @@
{
"name": "obsidian-loom",
"version": "1.21.1",
"version": "1.22.6",
"description": "Loom in Obsidian",
"main": "main.js",
"scripts": {

1167
views.ts

File diff suppressed because it is too large Load diff