@ever-works/vllm-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.
- package/dist/index.cjs +5783 -0
- package/dist/index.d.cts +43 -0
- package/dist/index.d.ts +43 -0
- package/dist/index.js +5758 -0
- package/package.json +77 -67
- package/LICENSE +0 -661
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
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
|
+
* vLLM AI provider plugin
|
|
6
|
+
*
|
|
7
|
+
* Provides AI capabilities through a self-hosted vLLM server. vLLM serves an
|
|
8
|
+
* OpenAI-compatible API on `/v1`, so it reuses the same `AiOperations`
|
|
9
|
+
* (LangChain) backend as the other AI providers.
|
|
10
|
+
*
|
|
11
|
+
* Uses 'user-required' configuration mode - users point the plugin at their
|
|
12
|
+
* vLLM server URL. An unsecured vLLM server accepts any key, so `apiKey`
|
|
13
|
+
* defaults to vLLM's documented `EMPTY` placeholder; when the server is
|
|
14
|
+
* started with `--api-key`, users enter that token (stored encrypted via
|
|
15
|
+
* `x-secret`).
|
|
16
|
+
*
|
|
17
|
+
* vLLM serves whatever model it was launched with (`--model ...`), so there is
|
|
18
|
+
* no canonical default model. The model fields ship without a hardcoded
|
|
19
|
+
* default and are populated by the `model-select` widget once the connection
|
|
20
|
+
* is established and `listModels()` returns.
|
|
21
|
+
*/
|
|
22
|
+
declare class VllmPlugin extends BaseAiProvider {
|
|
23
|
+
readonly id = "vllm";
|
|
24
|
+
readonly name = "vLLM";
|
|
25
|
+
readonly version = "1.0.0";
|
|
26
|
+
readonly providerType = "vllm";
|
|
27
|
+
readonly providerName = "vLLM";
|
|
28
|
+
readonly configurationMode: 'admin-only' | 'user-required' | 'hybrid';
|
|
29
|
+
readonly settingsSchema: JsonSchema;
|
|
30
|
+
onLoad(context: PluginContext): Promise<void>;
|
|
31
|
+
onUnload(): Promise<void>;
|
|
32
|
+
createChatCompletion(options: ChatCompletionOptions): Promise<ChatCompletionResponse>;
|
|
33
|
+
createStreamingChatCompletion(options: ChatCompletionOptions): AsyncIterable<ChatCompletionChunk>;
|
|
34
|
+
createEmbedding(options: EmbeddingOptions): Promise<EmbeddingResponse>;
|
|
35
|
+
listModels(settings?: PluginSettings): Promise<readonly AiModel[]>;
|
|
36
|
+
isAvailable(settings?: PluginSettings): Promise<boolean>;
|
|
37
|
+
getCapabilities(): AiModelCapabilities;
|
|
38
|
+
protected getDefaultModelId(): string;
|
|
39
|
+
healthCheck(): Promise<PluginHealthCheck>;
|
|
40
|
+
getManifest(): PluginManifest;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export { VllmPlugin, VllmPlugin as default };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
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
|
+
* vLLM AI provider plugin
|
|
6
|
+
*
|
|
7
|
+
* Provides AI capabilities through a self-hosted vLLM server. vLLM serves an
|
|
8
|
+
* OpenAI-compatible API on `/v1`, so it reuses the same `AiOperations`
|
|
9
|
+
* (LangChain) backend as the other AI providers.
|
|
10
|
+
*
|
|
11
|
+
* Uses 'user-required' configuration mode - users point the plugin at their
|
|
12
|
+
* vLLM server URL. An unsecured vLLM server accepts any key, so `apiKey`
|
|
13
|
+
* defaults to vLLM's documented `EMPTY` placeholder; when the server is
|
|
14
|
+
* started with `--api-key`, users enter that token (stored encrypted via
|
|
15
|
+
* `x-secret`).
|
|
16
|
+
*
|
|
17
|
+
* vLLM serves whatever model it was launched with (`--model ...`), so there is
|
|
18
|
+
* no canonical default model. The model fields ship without a hardcoded
|
|
19
|
+
* default and are populated by the `model-select` widget once the connection
|
|
20
|
+
* is established and `listModels()` returns.
|
|
21
|
+
*/
|
|
22
|
+
declare class VllmPlugin extends BaseAiProvider {
|
|
23
|
+
readonly id = "vllm";
|
|
24
|
+
readonly name = "vLLM";
|
|
25
|
+
readonly version = "1.0.0";
|
|
26
|
+
readonly providerType = "vllm";
|
|
27
|
+
readonly providerName = "vLLM";
|
|
28
|
+
readonly configurationMode: 'admin-only' | 'user-required' | 'hybrid';
|
|
29
|
+
readonly settingsSchema: JsonSchema;
|
|
30
|
+
onLoad(context: PluginContext): Promise<void>;
|
|
31
|
+
onUnload(): Promise<void>;
|
|
32
|
+
createChatCompletion(options: ChatCompletionOptions): Promise<ChatCompletionResponse>;
|
|
33
|
+
createStreamingChatCompletion(options: ChatCompletionOptions): AsyncIterable<ChatCompletionChunk>;
|
|
34
|
+
createEmbedding(options: EmbeddingOptions): Promise<EmbeddingResponse>;
|
|
35
|
+
listModels(settings?: PluginSettings): Promise<readonly AiModel[]>;
|
|
36
|
+
isAvailable(settings?: PluginSettings): Promise<boolean>;
|
|
37
|
+
getCapabilities(): AiModelCapabilities;
|
|
38
|
+
protected getDefaultModelId(): string;
|
|
39
|
+
healthCheck(): Promise<PluginHealthCheck>;
|
|
40
|
+
getManifest(): PluginManifest;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export { VllmPlugin, VllmPlugin as default };
|