@ever-works/lm-studio-plugin 1.0.0 → 1.0.3

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.
@@ -0,0 +1,41 @@
1
+ import { BaseAiProvider } from '@ever-works/plugin/abstract';
2
+ import { JsonSchema, PluginContext, ChatCompletionOptions, ChatCompletionResponse, ChatCompletionChunk, EmbeddingOptions, EmbeddingResponse, PluginSettings, AiModel, AiModelCapabilities, PluginHealthCheck, PluginManifest } from '@ever-works/plugin';
3
+
4
+ /**
5
+ * LM Studio AI provider plugin
6
+ *
7
+ * Provides AI capabilities through a local (or remote) LM Studio server.
8
+ * LM Studio exposes an OpenAI-compatible API on `/v1`, so it reuses the same
9
+ * `AiOperations` (LangChain) backend as the other AI providers.
10
+ *
11
+ * Uses 'user-required' configuration mode - users point the plugin at their
12
+ * LM Studio server URL. LM Studio does not authenticate by default, but the
13
+ * OpenAI client requires a non-empty key, so `apiKey` defaults to a placeholder.
14
+ *
15
+ * Unlike Ollama, LM Studio has no canonical default model: the served model is
16
+ * whatever the user has loaded in the app. The model fields therefore ship
17
+ * without a hardcoded default and are populated by the `model-select` widget
18
+ * once the connection is established and `listModels()` returns.
19
+ */
20
+ declare class LmStudioPlugin extends BaseAiProvider {
21
+ readonly id = "lm-studio";
22
+ readonly name = "LM Studio";
23
+ readonly version = "1.0.0";
24
+ readonly providerType = "lm-studio";
25
+ readonly providerName = "LM Studio";
26
+ readonly configurationMode: 'admin-only' | 'user-required' | 'hybrid';
27
+ readonly settingsSchema: JsonSchema;
28
+ onLoad(context: PluginContext): Promise<void>;
29
+ onUnload(): Promise<void>;
30
+ createChatCompletion(options: ChatCompletionOptions): Promise<ChatCompletionResponse>;
31
+ createStreamingChatCompletion(options: ChatCompletionOptions): AsyncIterable<ChatCompletionChunk>;
32
+ createEmbedding(options: EmbeddingOptions): Promise<EmbeddingResponse>;
33
+ listModels(settings?: PluginSettings): Promise<readonly AiModel[]>;
34
+ isAvailable(settings?: PluginSettings): Promise<boolean>;
35
+ getCapabilities(): AiModelCapabilities;
36
+ protected getDefaultModelId(): string;
37
+ healthCheck(): Promise<PluginHealthCheck>;
38
+ getManifest(): PluginManifest;
39
+ }
40
+
41
+ export { LmStudioPlugin, LmStudioPlugin as default };
@@ -0,0 +1,41 @@
1
+ import { BaseAiProvider } from '@ever-works/plugin/abstract';
2
+ import { JsonSchema, PluginContext, ChatCompletionOptions, ChatCompletionResponse, ChatCompletionChunk, EmbeddingOptions, EmbeddingResponse, PluginSettings, AiModel, AiModelCapabilities, PluginHealthCheck, PluginManifest } from '@ever-works/plugin';
3
+
4
+ /**
5
+ * LM Studio AI provider plugin
6
+ *
7
+ * Provides AI capabilities through a local (or remote) LM Studio server.
8
+ * LM Studio exposes an OpenAI-compatible API on `/v1`, so it reuses the same
9
+ * `AiOperations` (LangChain) backend as the other AI providers.
10
+ *
11
+ * Uses 'user-required' configuration mode - users point the plugin at their
12
+ * LM Studio server URL. LM Studio does not authenticate by default, but the
13
+ * OpenAI client requires a non-empty key, so `apiKey` defaults to a placeholder.
14
+ *
15
+ * Unlike Ollama, LM Studio has no canonical default model: the served model is
16
+ * whatever the user has loaded in the app. The model fields therefore ship
17
+ * without a hardcoded default and are populated by the `model-select` widget
18
+ * once the connection is established and `listModels()` returns.
19
+ */
20
+ declare class LmStudioPlugin extends BaseAiProvider {
21
+ readonly id = "lm-studio";
22
+ readonly name = "LM Studio";
23
+ readonly version = "1.0.0";
24
+ readonly providerType = "lm-studio";
25
+ readonly providerName = "LM Studio";
26
+ readonly configurationMode: 'admin-only' | 'user-required' | 'hybrid';
27
+ readonly settingsSchema: JsonSchema;
28
+ onLoad(context: PluginContext): Promise<void>;
29
+ onUnload(): Promise<void>;
30
+ createChatCompletion(options: ChatCompletionOptions): Promise<ChatCompletionResponse>;
31
+ createStreamingChatCompletion(options: ChatCompletionOptions): AsyncIterable<ChatCompletionChunk>;
32
+ createEmbedding(options: EmbeddingOptions): Promise<EmbeddingResponse>;
33
+ listModels(settings?: PluginSettings): Promise<readonly AiModel[]>;
34
+ isAvailable(settings?: PluginSettings): Promise<boolean>;
35
+ getCapabilities(): AiModelCapabilities;
36
+ protected getDefaultModelId(): string;
37
+ healthCheck(): Promise<PluginHealthCheck>;
38
+ getManifest(): PluginManifest;
39
+ }
40
+
41
+ export { LmStudioPlugin, LmStudioPlugin as default };