@infersec/conduit 1.72.0 → 1.74.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.
@@ -209,4 +209,34 @@ export declare function createPostCompletionsHandler(options: {
209
209
  status: number;
210
210
  statusText: string;
211
211
  }>;
212
+ export declare function createPostEmbeddingsHandler(options: {
213
+ apiClient: APIClient;
214
+ conduitConfiguration: () => InferenceAgentConfiguration;
215
+ configuration: Configuration;
216
+ getModelID: () => string;
217
+ getModelManager: () => ModelManager;
218
+ logger: Logger;
219
+ startup: number;
220
+ }): (params: {
221
+ req: APIRequest;
222
+ res: import("@infersec/fetch").APIResponse;
223
+ parameters: Record<string, never>;
224
+ query: Record<string, never>;
225
+ body: {
226
+ input: string | number[] | string[] | number[][];
227
+ model: string;
228
+ dimensions?: number | null | undefined;
229
+ encoding_format?: "base64" | "float" | null | undefined;
230
+ user?: string | undefined;
231
+ };
232
+ responseSchema: undefined;
233
+ }) => Promise<{
234
+ body: import("stream").Readable;
235
+ headers?: Record<string, string>;
236
+ status: number;
237
+ } | {
238
+ headers?: Record<string, string>;
239
+ status: number;
240
+ statusText: string;
241
+ }>;
212
242
  export {};
@@ -3,6 +3,23 @@ import { InferenceAgentConfiguration, InferenceAgentLLMMetricsPayload, type ULID
3
3
  import { Logger } from "@infersec/logger";
4
4
  import { Configuration } from "../configuration.js";
5
5
  import { ModelManager } from "../modelManagement/ModelManager.js";
6
+ export declare function proxyEmbeddingsRoute({ body, conduitConfiguration, endpointId, logger, modelID, modelManager, reportMetrics, signal }: {
7
+ body: unknown;
8
+ conduitConfiguration: InferenceAgentConfiguration;
9
+ endpointId?: ULID | null;
10
+ logger: Logger;
11
+ modelID: ULID;
12
+ modelManager: ModelManager;
13
+ reportMetrics: (payload: InferenceAgentLLMMetricsPayload) => Promise<void>;
14
+ signal?: AbortSignal;
15
+ }): Promise<{
16
+ body: Readable;
17
+ headers: Record<string, string>;
18
+ status: number;
19
+ } | {
20
+ status: number;
21
+ statusText: string;
22
+ }>;
6
23
  export declare function proxyOpenAIStreamingRoute({ body, conduitConfiguration, endpointId, logger, modelID, modelManager, path, reportMetrics, signal }: {
7
24
  body: unknown;
8
25
  conduitConfiguration: InferenceAgentConfiguration;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@infersec/conduit",
3
3
  "description": "End user conduit agent for connecting local LLMs to the cloud.",
4
- "version": "1.72.0",
4
+ "version": "1.74.0",
5
5
  "bin": {
6
6
  "infersec-conduit": "./dist/cli.js"
7
7
  },