@ai-sdk/huggingface 2.0.58 → 2.0.60

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/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @ai-sdk/huggingface
2
2
 
3
+ ## 2.0.60
4
+
5
+ ### Patch Changes
6
+
7
+ - ede5b89: chore: migrate package builds from tsup to tsdown
8
+ - Updated dependencies [ede5b89]
9
+ - @ai-sdk/openai-compatible@3.0.60
10
+ - @ai-sdk/provider@4.0.20
11
+ - @ai-sdk/provider-utils@5.0.52
12
+
13
+ ## 2.0.59
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies [c2511c1]
18
+ - @ai-sdk/openai-compatible@3.0.59
19
+ - @ai-sdk/provider-utils@5.0.51
20
+
3
21
  ## 2.0.58
4
22
 
5
23
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -1,61 +1,64 @@
1
- import { ProviderV4, LanguageModelV4 } from '@ai-sdk/provider';
2
- import { FetchFunction } from '@ai-sdk/provider-utils';
3
- export { OpenAICompatibleErrorData as HuggingFaceErrorData } from '@ai-sdk/openai-compatible';
4
-
1
+ import { LanguageModelV4, ProviderV4 } from "@ai-sdk/provider";
2
+ import { FetchFunction } from "@ai-sdk/provider-utils";
3
+ import { OpenAICompatibleErrorData as HuggingFaceErrorData } from "@ai-sdk/openai-compatible";
4
+ //#region src/responses/huggingface-responses-settings.d.ts
5
5
  type HuggingFaceResponsesModelId = 'meta-llama/Llama-3.1-8B-Instruct' | 'meta-llama/Llama-3.1-70B-Instruct' | 'meta-llama/Llama-3.1-405B-Instruct' | 'meta-llama/Llama-3.3-70B-Instruct' | 'meta-llama/Meta-Llama-3-8B-Instruct' | 'meta-llama/Meta-Llama-3-70B-Instruct' | 'meta-llama/Llama-3.2-3B-Instruct' | 'meta-llama/Llama-4-Maverick-17B-128E-Instruct' | 'meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8' | 'meta-llama/Llama-Guard-4-12B' | 'deepseek-ai/DeepSeek-V3.1' | 'deepseek-ai/DeepSeek-V3-0324' | 'deepseek-ai/DeepSeek-R1' | 'deepseek-ai/DeepSeek-R1-0528' | 'deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B' | 'deepseek-ai/DeepSeek-R1-Distill-Qwen-7B' | 'deepseek-ai/DeepSeek-R1-Distill-Qwen-14B' | 'deepseek-ai/DeepSeek-R1-Distill-Qwen-32B' | 'deepseek-ai/DeepSeek-R1-Distill-Llama-8B' | 'deepseek-ai/DeepSeek-R1-Distill-Llama-70B' | 'deepseek-ai/DeepSeek-Prover-V2-671B' | 'Qwen/Qwen3-32B' | 'Qwen/Qwen3-14B' | 'Qwen/Qwen3-8B' | 'Qwen/Qwen3-4B' | 'Qwen/Qwen3-Coder-480B-A35B-Instruct' | 'Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8' | 'Qwen/Qwen3-30B-A3B' | 'Qwen/Qwen2.5-VL-7B-Instruct' | 'Qwen/Qwen2.5-7B-Instruct' | 'Qwen/Qwen2.5-Coder-7B-Instruct' | 'Qwen/Qwen2.5-Coder-32B-Instruct' | 'google/gemma-2-9b-it' | 'google/gemma-3-27b-it' | 'moonshotai/Kimi-K2-Instruct' | (string & {});
6
6
  interface HuggingFaceResponsesSettings {
7
- metadata?: Record<string, string>;
8
- instructions?: string;
9
- strictJsonSchema?: boolean;
7
+ metadata?: Record<string, string>;
8
+ instructions?: string;
9
+ strictJsonSchema?: boolean;
10
10
  }
11
-
11
+ //#endregion
12
+ //#region src/huggingface-provider.d.ts
12
13
  interface HuggingFaceProviderSettings {
13
- /**
14
- * Hugging Face API key.
15
- */
16
- apiKey?: string;
17
- /**
18
- * Base URL for the API calls.
19
- */
20
- baseURL?: string;
21
- /**
22
- * Custom headers to include in the requests.
23
- */
24
- headers?: Record<string, string>;
25
- /**
26
- * Custom fetch implementation. You can use it as a middleware to intercept requests,
27
- * or to provide a custom fetch implementation for e.g. testing.
28
- */
29
- fetch?: FetchFunction;
30
- generateId?: () => string;
14
+ /**
15
+ * Hugging Face API key.
16
+ */
17
+ apiKey?: string;
18
+ /**
19
+ * Base URL for the API calls.
20
+ */
21
+ baseURL?: string;
22
+ /**
23
+ * Custom headers to include in the requests.
24
+ */
25
+ headers?: Record<string, string>;
26
+ /**
27
+ * Custom fetch implementation. You can use it as a middleware to intercept requests,
28
+ * or to provide a custom fetch implementation for e.g. testing.
29
+ */
30
+ fetch?: FetchFunction;
31
+ generateId?: () => string;
31
32
  }
32
33
  interface HuggingFaceProvider extends ProviderV4 {
33
- /**
34
- * Creates a Hugging Face responses model for text generation.
35
- */
36
- (modelId: HuggingFaceResponsesModelId): LanguageModelV4;
37
- /**
38
- * Creates a Hugging Face responses model for text generation.
39
- */
40
- languageModel(modelId: HuggingFaceResponsesModelId): LanguageModelV4;
41
- /**
42
- * Creates a Hugging Face responses model for text generation.
43
- */
44
- responses(modelId: HuggingFaceResponsesModelId): LanguageModelV4;
45
- /**
46
- * @deprecated Use `embeddingModel` instead.
47
- */
48
- textEmbeddingModel(modelId: string): never;
34
+ /**
35
+ * Creates a Hugging Face responses model for text generation.
36
+ */
37
+ (modelId: HuggingFaceResponsesModelId): LanguageModelV4;
38
+ /**
39
+ * Creates a Hugging Face responses model for text generation.
40
+ */
41
+ languageModel(modelId: HuggingFaceResponsesModelId): LanguageModelV4;
42
+ /**
43
+ * Creates a Hugging Face responses model for text generation.
44
+ */
45
+ responses(modelId: HuggingFaceResponsesModelId): LanguageModelV4;
46
+ /**
47
+ * @deprecated Use `embeddingModel` instead.
48
+ */
49
+ textEmbeddingModel(modelId: string): never;
49
50
  }
50
51
  /**
51
52
  * Create a Hugging Face provider instance.
52
53
  */
53
- declare function createHuggingFace(options?: HuggingFaceProviderSettings): HuggingFaceProvider;
54
+ export declare function createHuggingFace(options?: HuggingFaceProviderSettings): HuggingFaceProvider;
54
55
  /**
55
56
  * Default Hugging Face provider instance.
56
57
  */
57
- declare const huggingFace: HuggingFaceProvider;
58
-
59
- declare const VERSION: string;
60
-
61
- export { type HuggingFaceProvider, type HuggingFaceProviderSettings, type HuggingFaceResponsesModelId, type HuggingFaceResponsesSettings, VERSION, createHuggingFace, huggingFace, huggingFace as huggingface };
58
+ export declare const huggingFace: HuggingFaceProvider;
59
+ //#endregion
60
+ //#region src/version.d.ts
61
+ export declare const VERSION: string;
62
+ //#endregion
63
+ export { type HuggingFaceErrorData, type HuggingFaceProvider, type HuggingFaceProviderSettings, type HuggingFaceResponsesModelId, type HuggingFaceResponsesSettings, huggingFace as huggingface };
64
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/responses/huggingface-responses-settings.ts","../src/huggingface-provider.ts","../src/version.ts"],"mappings":";;;;KAAY;UAuCK;EACf,WAAW;EACX;EACA;;;;UC5Be;;;;EAIf;;;;EAIA;;;;EAIA,UAAU;;;;;EAKV,QAAQ;EAER;;UAGe,4BAA4B;;;;GAI1C,SAAS,8BAA8B;;;;EAKxC,cAAc,SAAS,8BAA8B;;;;EAKrD,UAAU,SAAS,8BAA8B;;;;EAKjD,mBAAmB;;;;;wBAML,kBACd,UAAS,8BACR;;;;qBAuDU,aAAW;;;qBCpHX"}