offrouter-huggingface 0.33.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 ADDED
@@ -0,0 +1,23 @@
1
+ # offrouter-huggingface
2
+
3
+ Hugging Face provider package for OffRouter.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install offrouter-huggingface
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```ts
14
+ import { createHuggingFaceAdapter } from "offrouter-huggingface";
15
+
16
+ const adapter = createHuggingFaceAdapter({
17
+ apiKey: process.env.HUGGINGFACE_API_KEY,
18
+ });
19
+ ```
20
+
21
+ Provider activation names: `HUGGINGFACE_API_KEY`, `HF_TOKEN`.
22
+
23
+ The package delegates transport and policy behavior to `offrouter-core`.
@@ -0,0 +1,9 @@
1
+ import { type CreateBuiltinOpenAiCompatibleAdapterOptions } from "offrouter-core";
2
+ export declare const PACKAGE_NAME: "offrouter-huggingface";
3
+ export declare const PROVIDER_ID: "huggingface";
4
+ export declare const DEFAULT_BASE_URL: string;
5
+ export declare const ENV_NAMES: readonly string[];
6
+ export type HuggingFaceAdapterOptions = CreateBuiltinOpenAiCompatibleAdapterOptions;
7
+ export declare function createHuggingFaceAdapter(options?: HuggingFaceAdapterOptions): import("offrouter-core").OpenAiCompatibleAdapter;
8
+ export declare const createAdapter: typeof createHuggingFaceAdapter;
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,2CAA2C,EACjD,MAAM,gBAAgB,CAAC;AAExB,eAAO,MAAM,YAAY,EAAG,uBAAgC,CAAC;AAC7D,eAAO,MAAM,WAAW,EAAG,aAAsB,CAAC;AAClD,eAAO,MAAM,gBAAgB,QAC0B,CAAC;AACxD,eAAO,MAAM,SAAS,mBAAkD,CAAC;AAEzE,MAAM,MAAM,yBAAyB,GACnC,2CAA2C,CAAC;AAE9C,wBAAgB,wBAAwB,CACtC,OAAO,GAAE,yBAA8B,oDAGxC;AAED,eAAO,MAAM,aAAa,iCAA2B,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,10 @@
1
+ import { createBuiltinOpenAiCompatibleAdapter, getBuiltinProvider, openAiCompatibleCredentialEnvNames, } from "offrouter-core";
2
+ export const PACKAGE_NAME = "offrouter-huggingface";
3
+ export const PROVIDER_ID = "huggingface";
4
+ export const DEFAULT_BASE_URL = getBuiltinProvider(PROVIDER_ID)?.defaultBaseUrl ?? "";
5
+ export const ENV_NAMES = openAiCompatibleCredentialEnvNames(PROVIDER_ID);
6
+ export function createHuggingFaceAdapter(options = {}) {
7
+ return createBuiltinOpenAiCompatibleAdapter(PROVIDER_ID, options);
8
+ }
9
+ export const createAdapter = createHuggingFaceAdapter;
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oCAAoC,EACpC,kBAAkB,EAClB,kCAAkC,GAEnC,MAAM,gBAAgB,CAAC;AAExB,MAAM,CAAC,MAAM,YAAY,GAAG,uBAAgC,CAAC;AAC7D,MAAM,CAAC,MAAM,WAAW,GAAG,aAAsB,CAAC;AAClD,MAAM,CAAC,MAAM,gBAAgB,GAC3B,kBAAkB,CAAC,WAAW,CAAC,EAAE,cAAc,IAAI,EAAE,CAAC;AACxD,MAAM,CAAC,MAAM,SAAS,GAAG,kCAAkC,CAAC,WAAW,CAAC,CAAC;AAKzE,MAAM,UAAU,wBAAwB,CACtC,UAAqC,EAAE;IAEvC,OAAO,oCAAoC,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;AACpE,CAAC;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,wBAAwB,CAAC"}
package/package.json ADDED
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "offrouter-huggingface",
3
+ "version": "0.33.0",
4
+ "type": "module",
5
+ "main": "./dist/index.js",
6
+ "types": "./dist/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "import": "./dist/index.js"
11
+ }
12
+ },
13
+ "scripts": {
14
+ "build": "tsc -p tsconfig.json"
15
+ },
16
+ "dependencies": {
17
+ "offrouter-core": "0.33.0"
18
+ },
19
+ "files": [
20
+ "dist",
21
+ "README.md",
22
+ "LICENSE"
23
+ ]
24
+ }