noosphere 0.4.1 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +227 -19
- package/dist/index.cjs +1083 -33
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +149 -4
- package/dist/index.d.ts +149 -4
- package/dist/index.js +1077 -32
- package/dist/index.js.map +1 -1
- package/package.json +1 -2
- package/assets/logos/png/ai21.png +0 -0
- package/assets/logos/png/amazon.png +0 -0
- package/assets/logos/png/anthropic.png +0 -0
- package/assets/logos/png/baidu.png +0 -0
- package/assets/logos/png/bytedance.png +0 -0
- package/assets/logos/png/cerebras.png +0 -0
- package/assets/logos/png/cohere.png +0 -0
- package/assets/logos/png/comfyui.png +0 -0
- package/assets/logos/png/deepseek.png +0 -0
- package/assets/logos/png/fal.png +0 -0
- package/assets/logos/png/fireworks-ai.png +0 -0
- package/assets/logos/png/google.png +0 -0
- package/assets/logos/png/groq.png +0 -0
- package/assets/logos/png/huggingface.png +0 -0
- package/assets/logos/png/ibm.png +0 -0
- package/assets/logos/png/inflection.png +0 -0
- package/assets/logos/png/kokoro.png +0 -0
- package/assets/logos/png/meta.png +0 -0
- package/assets/logos/png/microsoft.png +0 -0
- package/assets/logos/png/minimax.png +0 -0
- package/assets/logos/png/mistral.png +0 -0
- package/assets/logos/png/nebius.png +0 -0
- package/assets/logos/png/novita.png +0 -0
- package/assets/logos/png/nvidia.png +0 -0
- package/assets/logos/png/ollama.png +0 -0
- package/assets/logos/png/openai.png +0 -0
- package/assets/logos/png/openrouter.png +0 -0
- package/assets/logos/png/perplexity.png +0 -0
- package/assets/logos/png/pi-ai.png +0 -0
- package/assets/logos/png/piper.png +0 -0
- package/assets/logos/png/qwen.png +0 -0
- package/assets/logos/png/replicate.png +0 -0
- package/assets/logos/png/sambanova.png +0 -0
- package/assets/logos/png/tencent.png +0 -0
- package/assets/logos/png/together.png +0 -0
- package/assets/logos/png/upstage.png +0 -0
- package/assets/logos/png/xai.png +0 -0
- package/assets/logos/png/xiaomi.png +0 -0
- package/assets/logos/png/zai.png +0 -0
- package/assets/logos/svg/amazon.svg +0 -1
- package/assets/logos/svg/anthropic.svg +0 -1
- package/assets/logos/svg/baidu.svg +0 -1
- package/assets/logos/svg/cerebras.svg +0 -1
- package/assets/logos/svg/cohere.svg +0 -1
- package/assets/logos/svg/deepseek.svg +0 -1
- package/assets/logos/svg/fireworks-ai.svg +0 -9
- package/assets/logos/svg/google.svg +0 -1
- package/assets/logos/svg/groq.svg +0 -1
- package/assets/logos/svg/huggingface.svg +0 -67
- package/assets/logos/svg/meta.svg +0 -1
- package/assets/logos/svg/microsoft.svg +0 -1
- package/assets/logos/svg/mistral.svg +0 -1
- package/assets/logos/svg/nebius.svg +0 -4
- package/assets/logos/svg/novita.svg +0 -11
- package/assets/logos/svg/nvidia.svg +0 -1
- package/assets/logos/svg/ollama.svg +0 -7
- package/assets/logos/svg/openai.svg +0 -1
- package/assets/logos/svg/openrouter.svg +0 -21
- package/assets/logos/svg/perplexity.svg +0 -24
- package/assets/logos/svg/qwen.svg +0 -1
- package/assets/logos/svg/replicate.svg +0 -12
- package/assets/logos/svg/together.svg +0 -1
- package/assets/logos/svg/xai.svg +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,18 @@
|
|
|
1
|
-
type Modality = 'llm' | 'image' | 'video' | 'tts';
|
|
1
|
+
type Modality = 'llm' | 'image' | 'video' | 'tts' | 'stt' | 'music' | 'embedding';
|
|
2
|
+
type ModelStatus = 'installed' | 'available' | 'downloading' | 'running' | 'error';
|
|
3
|
+
interface LocalModelInfo {
|
|
4
|
+
sizeBytes: number;
|
|
5
|
+
family?: string;
|
|
6
|
+
parameterSize?: string;
|
|
7
|
+
quantization?: string;
|
|
8
|
+
format?: string;
|
|
9
|
+
digest?: string;
|
|
10
|
+
modifiedAt?: string;
|
|
11
|
+
running?: boolean;
|
|
12
|
+
vramRequired?: number;
|
|
13
|
+
diskPath?: string;
|
|
14
|
+
runtime: string;
|
|
15
|
+
}
|
|
2
16
|
interface BaseOptions {
|
|
3
17
|
provider?: string;
|
|
4
18
|
model?: string;
|
|
@@ -85,6 +99,8 @@ interface ModelInfo {
|
|
|
85
99
|
unit: string;
|
|
86
100
|
};
|
|
87
101
|
logo?: ProviderLogo$1;
|
|
102
|
+
status?: ModelStatus;
|
|
103
|
+
localInfo?: LocalModelInfo;
|
|
88
104
|
capabilities?: {
|
|
89
105
|
contextWindow?: number;
|
|
90
106
|
maxTokens?: number;
|
|
@@ -202,6 +218,25 @@ interface NoosphereConfig {
|
|
|
202
218
|
};
|
|
203
219
|
onUsage?: (usage: UsageEvent) => void | Promise<void>;
|
|
204
220
|
}
|
|
221
|
+
interface TranscriptionOptions extends BaseOptions {
|
|
222
|
+
audio: string;
|
|
223
|
+
language?: string;
|
|
224
|
+
task?: 'transcribe' | 'translate';
|
|
225
|
+
}
|
|
226
|
+
interface TranscriptionResult {
|
|
227
|
+
text: string;
|
|
228
|
+
language: string;
|
|
229
|
+
duration: number;
|
|
230
|
+
segments?: Array<{
|
|
231
|
+
start: number;
|
|
232
|
+
end: number;
|
|
233
|
+
text: string;
|
|
234
|
+
}>;
|
|
235
|
+
}
|
|
236
|
+
interface MusicOptions extends BaseOptions {
|
|
237
|
+
prompt: string;
|
|
238
|
+
duration?: number;
|
|
239
|
+
}
|
|
205
240
|
|
|
206
241
|
interface NoosphereProvider {
|
|
207
242
|
readonly id: string;
|
|
@@ -218,6 +253,54 @@ interface NoosphereProvider {
|
|
|
218
253
|
dispose?(): Promise<void>;
|
|
219
254
|
}
|
|
220
255
|
|
|
256
|
+
interface OllamaPullProgress {
|
|
257
|
+
status: string;
|
|
258
|
+
digest?: string;
|
|
259
|
+
total?: number;
|
|
260
|
+
completed?: number;
|
|
261
|
+
}
|
|
262
|
+
interface OllamaModelDetail {
|
|
263
|
+
modelfile: string;
|
|
264
|
+
parameters: string;
|
|
265
|
+
template: string;
|
|
266
|
+
details: {
|
|
267
|
+
parent_model: string;
|
|
268
|
+
format: string;
|
|
269
|
+
family: string;
|
|
270
|
+
families: string[];
|
|
271
|
+
parameter_size: string;
|
|
272
|
+
quantization_level: string;
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
interface OllamaRunningModel {
|
|
276
|
+
name: string;
|
|
277
|
+
model: string;
|
|
278
|
+
size: number;
|
|
279
|
+
digest: string;
|
|
280
|
+
expires_at: string;
|
|
281
|
+
size_vram: number;
|
|
282
|
+
}
|
|
283
|
+
declare class OllamaProvider implements NoosphereProvider {
|
|
284
|
+
readonly id = "ollama";
|
|
285
|
+
readonly name = "Ollama (Local)";
|
|
286
|
+
readonly modalities: Modality[];
|
|
287
|
+
readonly isLocal = true;
|
|
288
|
+
private baseUrl;
|
|
289
|
+
constructor(config?: {
|
|
290
|
+
host?: string;
|
|
291
|
+
port?: number;
|
|
292
|
+
});
|
|
293
|
+
ping(): Promise<boolean>;
|
|
294
|
+
listModels(_modality?: Modality): Promise<ModelInfo[]>;
|
|
295
|
+
private toModelInfo;
|
|
296
|
+
chat(options: ChatOptions): Promise<NoosphereResult>;
|
|
297
|
+
stream(options: ChatOptions): NoosphereStream;
|
|
298
|
+
pullModel(name: string): AsyncGenerator<OllamaPullProgress>;
|
|
299
|
+
deleteModel(name: string): Promise<void>;
|
|
300
|
+
showModel(name: string): Promise<OllamaModelDetail>;
|
|
301
|
+
getRunningModels(): Promise<OllamaRunningModel[]>;
|
|
302
|
+
}
|
|
303
|
+
|
|
221
304
|
declare class Noosphere {
|
|
222
305
|
private config;
|
|
223
306
|
private registry;
|
|
@@ -236,6 +319,12 @@ declare class Noosphere {
|
|
|
236
319
|
getModel(provider: string, modelId: string): Promise<ModelInfo | null>;
|
|
237
320
|
syncModels(): Promise<SyncResult>;
|
|
238
321
|
getUsage(options?: UsageQueryOptions): UsageSummary;
|
|
322
|
+
installModel(name: string): Promise<AsyncGenerator<OllamaPullProgress>>;
|
|
323
|
+
uninstallModel(name: string): Promise<void>;
|
|
324
|
+
getHardware(): Promise<{
|
|
325
|
+
ollama: boolean;
|
|
326
|
+
runningModels: OllamaRunningModel[];
|
|
327
|
+
}>;
|
|
239
328
|
dispose(): Promise<void>;
|
|
240
329
|
private init;
|
|
241
330
|
private resolveProviderForModality;
|
|
@@ -260,6 +349,63 @@ declare class NoosphereError extends Error {
|
|
|
260
349
|
isRetryable(): boolean;
|
|
261
350
|
}
|
|
262
351
|
|
|
352
|
+
declare class HfLocalProvider implements NoosphereProvider {
|
|
353
|
+
readonly id = "hf-local";
|
|
354
|
+
readonly name = "HuggingFace Local Models";
|
|
355
|
+
readonly modalities: Modality[];
|
|
356
|
+
readonly isLocal = true;
|
|
357
|
+
private cachedModels;
|
|
358
|
+
ping(): Promise<boolean>;
|
|
359
|
+
listModels(modality?: Modality): Promise<ModelInfo[]>;
|
|
360
|
+
private fetchCatalog;
|
|
361
|
+
private scanLocalCache;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
declare class WhisperLocalProvider implements NoosphereProvider {
|
|
365
|
+
readonly id = "whisper-local";
|
|
366
|
+
readonly name = "Whisper (Local)";
|
|
367
|
+
readonly modalities: Modality[];
|
|
368
|
+
readonly isLocal = true;
|
|
369
|
+
private runtime;
|
|
370
|
+
ping(): Promise<boolean>;
|
|
371
|
+
private detectRuntime;
|
|
372
|
+
listModels(_modality?: Modality): Promise<ModelInfo[]>;
|
|
373
|
+
private isModelCached;
|
|
374
|
+
transcribe(options: TranscriptionOptions): Promise<TranscriptionResult>;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
declare class AudioCraftProvider implements NoosphereProvider {
|
|
378
|
+
readonly id = "audiocraft";
|
|
379
|
+
readonly name = "AudioCraft (Local)";
|
|
380
|
+
readonly modalities: Modality[];
|
|
381
|
+
readonly isLocal = true;
|
|
382
|
+
private detected;
|
|
383
|
+
ping(): Promise<boolean>;
|
|
384
|
+
listModels(_modality?: Modality): Promise<ModelInfo[]>;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
interface OpenAICompatConfig {
|
|
388
|
+
baseUrl: string;
|
|
389
|
+
apiKey?: string;
|
|
390
|
+
name?: string;
|
|
391
|
+
id?: string;
|
|
392
|
+
}
|
|
393
|
+
declare class OpenAICompatProvider implements NoosphereProvider {
|
|
394
|
+
readonly id: string;
|
|
395
|
+
readonly name: string;
|
|
396
|
+
readonly modalities: Modality[];
|
|
397
|
+
readonly isLocal = true;
|
|
398
|
+
private baseUrl;
|
|
399
|
+
private headers;
|
|
400
|
+
constructor(config: OpenAICompatConfig);
|
|
401
|
+
ping(): Promise<boolean>;
|
|
402
|
+
listModels(_modality?: Modality): Promise<ModelInfo[]>;
|
|
403
|
+
chat(options: ChatOptions): Promise<NoosphereResult>;
|
|
404
|
+
stream(options: ChatOptions): NoosphereStream;
|
|
405
|
+
}
|
|
406
|
+
/** Auto-detect running OpenAI-compatible servers on common ports */
|
|
407
|
+
declare function detectOpenAICompatServers(): Promise<OpenAICompatProvider[]>;
|
|
408
|
+
|
|
263
409
|
interface ProviderLogo {
|
|
264
410
|
svg?: string;
|
|
265
411
|
png?: string;
|
|
@@ -269,8 +415,7 @@ interface ProviderLogo {
|
|
|
269
415
|
*/
|
|
270
416
|
declare const PROVIDER_IDS: readonly ["openai", "anthropic", "google", "groq", "mistral", "xai", "openrouter", "cerebras", "pi-ai", "fal", "huggingface", "comfyui", "piper", "kokoro", "ollama", "meta", "deepseek", "microsoft", "nvidia", "qwen", "cohere", "perplexity", "amazon", "zai", "minimax", "baidu", "bytedance", "tencent", "xiaomi", "ibm", "ai21", "inflection", "upstage", "sambanova", "together", "fireworks-ai", "replicate", "nebius", "novita"];
|
|
271
417
|
/**
|
|
272
|
-
* Get
|
|
273
|
-
* Returns absolute paths to SVG and/or PNG files in assets/logos/.
|
|
418
|
+
* Get CDN URLs for a provider's logo.
|
|
274
419
|
*/
|
|
275
420
|
declare function getProviderLogo(providerId: string | undefined | null): ProviderLogo | undefined;
|
|
276
421
|
/**
|
|
@@ -279,4 +424,4 @@ declare function getProviderLogo(providerId: string | undefined | null): Provide
|
|
|
279
424
|
declare function getAllProviderLogos(): Record<string, ProviderLogo>;
|
|
280
425
|
declare const PROVIDER_LOGOS: Record<string, ProviderLogo>;
|
|
281
426
|
|
|
282
|
-
export { type BaseOptions, type ChatOptions, type ImageOptions, type LocalServiceConfig, type Modality, type ModelInfo, Noosphere, type NoosphereConfig, NoosphereError, type NoosphereErrorCode, type NoosphereProvider, type NoosphereResult, type NoosphereStream, PROVIDER_IDS, PROVIDER_LOGOS, type ProviderInfo, type ProviderLogo$1 as ProviderLogo, type SpeakOptions, type StreamEvent, type SyncResult, type UsageEvent, type UsageQueryOptions, type UsageSummary, type VideoOptions, getAllProviderLogos, getProviderLogo };
|
|
427
|
+
export { AudioCraftProvider, type BaseOptions, type ChatOptions, HfLocalProvider, type ImageOptions, type LocalModelInfo, type LocalServiceConfig, type Modality, type ModelInfo, type ModelStatus, type MusicOptions, Noosphere, type NoosphereConfig, NoosphereError, type NoosphereErrorCode, type NoosphereProvider, type NoosphereResult, type NoosphereStream, type OllamaModelDetail, OllamaProvider, type OllamaPullProgress, type OllamaRunningModel, type OpenAICompatConfig, OpenAICompatProvider, PROVIDER_IDS, PROVIDER_LOGOS, type ProviderInfo, type ProviderLogo$1 as ProviderLogo, type SpeakOptions, type StreamEvent, type SyncResult, type TranscriptionOptions, type TranscriptionResult, type UsageEvent, type UsageQueryOptions, type UsageSummary, type VideoOptions, WhisperLocalProvider, detectOpenAICompatServers, getAllProviderLogos, getProviderLogo };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,18 @@
|
|
|
1
|
-
type Modality = 'llm' | 'image' | 'video' | 'tts';
|
|
1
|
+
type Modality = 'llm' | 'image' | 'video' | 'tts' | 'stt' | 'music' | 'embedding';
|
|
2
|
+
type ModelStatus = 'installed' | 'available' | 'downloading' | 'running' | 'error';
|
|
3
|
+
interface LocalModelInfo {
|
|
4
|
+
sizeBytes: number;
|
|
5
|
+
family?: string;
|
|
6
|
+
parameterSize?: string;
|
|
7
|
+
quantization?: string;
|
|
8
|
+
format?: string;
|
|
9
|
+
digest?: string;
|
|
10
|
+
modifiedAt?: string;
|
|
11
|
+
running?: boolean;
|
|
12
|
+
vramRequired?: number;
|
|
13
|
+
diskPath?: string;
|
|
14
|
+
runtime: string;
|
|
15
|
+
}
|
|
2
16
|
interface BaseOptions {
|
|
3
17
|
provider?: string;
|
|
4
18
|
model?: string;
|
|
@@ -85,6 +99,8 @@ interface ModelInfo {
|
|
|
85
99
|
unit: string;
|
|
86
100
|
};
|
|
87
101
|
logo?: ProviderLogo$1;
|
|
102
|
+
status?: ModelStatus;
|
|
103
|
+
localInfo?: LocalModelInfo;
|
|
88
104
|
capabilities?: {
|
|
89
105
|
contextWindow?: number;
|
|
90
106
|
maxTokens?: number;
|
|
@@ -202,6 +218,25 @@ interface NoosphereConfig {
|
|
|
202
218
|
};
|
|
203
219
|
onUsage?: (usage: UsageEvent) => void | Promise<void>;
|
|
204
220
|
}
|
|
221
|
+
interface TranscriptionOptions extends BaseOptions {
|
|
222
|
+
audio: string;
|
|
223
|
+
language?: string;
|
|
224
|
+
task?: 'transcribe' | 'translate';
|
|
225
|
+
}
|
|
226
|
+
interface TranscriptionResult {
|
|
227
|
+
text: string;
|
|
228
|
+
language: string;
|
|
229
|
+
duration: number;
|
|
230
|
+
segments?: Array<{
|
|
231
|
+
start: number;
|
|
232
|
+
end: number;
|
|
233
|
+
text: string;
|
|
234
|
+
}>;
|
|
235
|
+
}
|
|
236
|
+
interface MusicOptions extends BaseOptions {
|
|
237
|
+
prompt: string;
|
|
238
|
+
duration?: number;
|
|
239
|
+
}
|
|
205
240
|
|
|
206
241
|
interface NoosphereProvider {
|
|
207
242
|
readonly id: string;
|
|
@@ -218,6 +253,54 @@ interface NoosphereProvider {
|
|
|
218
253
|
dispose?(): Promise<void>;
|
|
219
254
|
}
|
|
220
255
|
|
|
256
|
+
interface OllamaPullProgress {
|
|
257
|
+
status: string;
|
|
258
|
+
digest?: string;
|
|
259
|
+
total?: number;
|
|
260
|
+
completed?: number;
|
|
261
|
+
}
|
|
262
|
+
interface OllamaModelDetail {
|
|
263
|
+
modelfile: string;
|
|
264
|
+
parameters: string;
|
|
265
|
+
template: string;
|
|
266
|
+
details: {
|
|
267
|
+
parent_model: string;
|
|
268
|
+
format: string;
|
|
269
|
+
family: string;
|
|
270
|
+
families: string[];
|
|
271
|
+
parameter_size: string;
|
|
272
|
+
quantization_level: string;
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
interface OllamaRunningModel {
|
|
276
|
+
name: string;
|
|
277
|
+
model: string;
|
|
278
|
+
size: number;
|
|
279
|
+
digest: string;
|
|
280
|
+
expires_at: string;
|
|
281
|
+
size_vram: number;
|
|
282
|
+
}
|
|
283
|
+
declare class OllamaProvider implements NoosphereProvider {
|
|
284
|
+
readonly id = "ollama";
|
|
285
|
+
readonly name = "Ollama (Local)";
|
|
286
|
+
readonly modalities: Modality[];
|
|
287
|
+
readonly isLocal = true;
|
|
288
|
+
private baseUrl;
|
|
289
|
+
constructor(config?: {
|
|
290
|
+
host?: string;
|
|
291
|
+
port?: number;
|
|
292
|
+
});
|
|
293
|
+
ping(): Promise<boolean>;
|
|
294
|
+
listModels(_modality?: Modality): Promise<ModelInfo[]>;
|
|
295
|
+
private toModelInfo;
|
|
296
|
+
chat(options: ChatOptions): Promise<NoosphereResult>;
|
|
297
|
+
stream(options: ChatOptions): NoosphereStream;
|
|
298
|
+
pullModel(name: string): AsyncGenerator<OllamaPullProgress>;
|
|
299
|
+
deleteModel(name: string): Promise<void>;
|
|
300
|
+
showModel(name: string): Promise<OllamaModelDetail>;
|
|
301
|
+
getRunningModels(): Promise<OllamaRunningModel[]>;
|
|
302
|
+
}
|
|
303
|
+
|
|
221
304
|
declare class Noosphere {
|
|
222
305
|
private config;
|
|
223
306
|
private registry;
|
|
@@ -236,6 +319,12 @@ declare class Noosphere {
|
|
|
236
319
|
getModel(provider: string, modelId: string): Promise<ModelInfo | null>;
|
|
237
320
|
syncModels(): Promise<SyncResult>;
|
|
238
321
|
getUsage(options?: UsageQueryOptions): UsageSummary;
|
|
322
|
+
installModel(name: string): Promise<AsyncGenerator<OllamaPullProgress>>;
|
|
323
|
+
uninstallModel(name: string): Promise<void>;
|
|
324
|
+
getHardware(): Promise<{
|
|
325
|
+
ollama: boolean;
|
|
326
|
+
runningModels: OllamaRunningModel[];
|
|
327
|
+
}>;
|
|
239
328
|
dispose(): Promise<void>;
|
|
240
329
|
private init;
|
|
241
330
|
private resolveProviderForModality;
|
|
@@ -260,6 +349,63 @@ declare class NoosphereError extends Error {
|
|
|
260
349
|
isRetryable(): boolean;
|
|
261
350
|
}
|
|
262
351
|
|
|
352
|
+
declare class HfLocalProvider implements NoosphereProvider {
|
|
353
|
+
readonly id = "hf-local";
|
|
354
|
+
readonly name = "HuggingFace Local Models";
|
|
355
|
+
readonly modalities: Modality[];
|
|
356
|
+
readonly isLocal = true;
|
|
357
|
+
private cachedModels;
|
|
358
|
+
ping(): Promise<boolean>;
|
|
359
|
+
listModels(modality?: Modality): Promise<ModelInfo[]>;
|
|
360
|
+
private fetchCatalog;
|
|
361
|
+
private scanLocalCache;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
declare class WhisperLocalProvider implements NoosphereProvider {
|
|
365
|
+
readonly id = "whisper-local";
|
|
366
|
+
readonly name = "Whisper (Local)";
|
|
367
|
+
readonly modalities: Modality[];
|
|
368
|
+
readonly isLocal = true;
|
|
369
|
+
private runtime;
|
|
370
|
+
ping(): Promise<boolean>;
|
|
371
|
+
private detectRuntime;
|
|
372
|
+
listModels(_modality?: Modality): Promise<ModelInfo[]>;
|
|
373
|
+
private isModelCached;
|
|
374
|
+
transcribe(options: TranscriptionOptions): Promise<TranscriptionResult>;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
declare class AudioCraftProvider implements NoosphereProvider {
|
|
378
|
+
readonly id = "audiocraft";
|
|
379
|
+
readonly name = "AudioCraft (Local)";
|
|
380
|
+
readonly modalities: Modality[];
|
|
381
|
+
readonly isLocal = true;
|
|
382
|
+
private detected;
|
|
383
|
+
ping(): Promise<boolean>;
|
|
384
|
+
listModels(_modality?: Modality): Promise<ModelInfo[]>;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
interface OpenAICompatConfig {
|
|
388
|
+
baseUrl: string;
|
|
389
|
+
apiKey?: string;
|
|
390
|
+
name?: string;
|
|
391
|
+
id?: string;
|
|
392
|
+
}
|
|
393
|
+
declare class OpenAICompatProvider implements NoosphereProvider {
|
|
394
|
+
readonly id: string;
|
|
395
|
+
readonly name: string;
|
|
396
|
+
readonly modalities: Modality[];
|
|
397
|
+
readonly isLocal = true;
|
|
398
|
+
private baseUrl;
|
|
399
|
+
private headers;
|
|
400
|
+
constructor(config: OpenAICompatConfig);
|
|
401
|
+
ping(): Promise<boolean>;
|
|
402
|
+
listModels(_modality?: Modality): Promise<ModelInfo[]>;
|
|
403
|
+
chat(options: ChatOptions): Promise<NoosphereResult>;
|
|
404
|
+
stream(options: ChatOptions): NoosphereStream;
|
|
405
|
+
}
|
|
406
|
+
/** Auto-detect running OpenAI-compatible servers on common ports */
|
|
407
|
+
declare function detectOpenAICompatServers(): Promise<OpenAICompatProvider[]>;
|
|
408
|
+
|
|
263
409
|
interface ProviderLogo {
|
|
264
410
|
svg?: string;
|
|
265
411
|
png?: string;
|
|
@@ -269,8 +415,7 @@ interface ProviderLogo {
|
|
|
269
415
|
*/
|
|
270
416
|
declare const PROVIDER_IDS: readonly ["openai", "anthropic", "google", "groq", "mistral", "xai", "openrouter", "cerebras", "pi-ai", "fal", "huggingface", "comfyui", "piper", "kokoro", "ollama", "meta", "deepseek", "microsoft", "nvidia", "qwen", "cohere", "perplexity", "amazon", "zai", "minimax", "baidu", "bytedance", "tencent", "xiaomi", "ibm", "ai21", "inflection", "upstage", "sambanova", "together", "fireworks-ai", "replicate", "nebius", "novita"];
|
|
271
417
|
/**
|
|
272
|
-
* Get
|
|
273
|
-
* Returns absolute paths to SVG and/or PNG files in assets/logos/.
|
|
418
|
+
* Get CDN URLs for a provider's logo.
|
|
274
419
|
*/
|
|
275
420
|
declare function getProviderLogo(providerId: string | undefined | null): ProviderLogo | undefined;
|
|
276
421
|
/**
|
|
@@ -279,4 +424,4 @@ declare function getProviderLogo(providerId: string | undefined | null): Provide
|
|
|
279
424
|
declare function getAllProviderLogos(): Record<string, ProviderLogo>;
|
|
280
425
|
declare const PROVIDER_LOGOS: Record<string, ProviderLogo>;
|
|
281
426
|
|
|
282
|
-
export { type BaseOptions, type ChatOptions, type ImageOptions, type LocalServiceConfig, type Modality, type ModelInfo, Noosphere, type NoosphereConfig, NoosphereError, type NoosphereErrorCode, type NoosphereProvider, type NoosphereResult, type NoosphereStream, PROVIDER_IDS, PROVIDER_LOGOS, type ProviderInfo, type ProviderLogo$1 as ProviderLogo, type SpeakOptions, type StreamEvent, type SyncResult, type UsageEvent, type UsageQueryOptions, type UsageSummary, type VideoOptions, getAllProviderLogos, getProviderLogo };
|
|
427
|
+
export { AudioCraftProvider, type BaseOptions, type ChatOptions, HfLocalProvider, type ImageOptions, type LocalModelInfo, type LocalServiceConfig, type Modality, type ModelInfo, type ModelStatus, type MusicOptions, Noosphere, type NoosphereConfig, NoosphereError, type NoosphereErrorCode, type NoosphereProvider, type NoosphereResult, type NoosphereStream, type OllamaModelDetail, OllamaProvider, type OllamaPullProgress, type OllamaRunningModel, type OpenAICompatConfig, OpenAICompatProvider, PROVIDER_IDS, PROVIDER_LOGOS, type ProviderInfo, type ProviderLogo$1 as ProviderLogo, type SpeakOptions, type StreamEvent, type SyncResult, type TranscriptionOptions, type TranscriptionResult, type UsageEvent, type UsageQueryOptions, type UsageSummary, type VideoOptions, WhisperLocalProvider, detectOpenAICompatServers, getAllProviderLogos, getProviderLogo };
|