zhipu-ai-provider-fkysly 0.2.1 → 0.2.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/README.md +2 -2
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -29,13 +29,13 @@ Alternatively, you can create a provider instance with custom configuration with
|
|
|
29
29
|
import { createZhipu } from 'zhipu-ai-provider';
|
|
30
30
|
|
|
31
31
|
const zhipu = createZhipu({
|
|
32
|
-
baseURL: "https://
|
|
32
|
+
baseURL: "https://api.z.ai/api/paas/v4",
|
|
33
33
|
apiKey: "your-api-key"
|
|
34
34
|
});
|
|
35
35
|
```
|
|
36
36
|
You can use the following optional settings to customize the Zhipu provider instance:
|
|
37
37
|
- **baseURL**: *string*
|
|
38
|
-
- Use a different URL prefix for API calls, e.g. to use proxy servers. The default prefix is `https://
|
|
38
|
+
- Use a different URL prefix for API calls, e.g. to use proxy servers. The default prefix is `https://api.z.ai/api/paas/v4`.
|
|
39
39
|
- **apiKey**: *string*
|
|
40
40
|
- Your API key for Zhipu [BigModel Platform](https://bigmodel.cn/). If not provided, the provider will attempt to read the API key from the environment variable `ZHIPU_API_KEY`.
|
|
41
41
|
- **headers**: *Record<string,string>*
|
package/dist/index.d.mts
CHANGED
|
@@ -51,7 +51,7 @@ interface ZhipuProvider extends ProviderV3 {
|
|
|
51
51
|
interface ZhipuProviderSettings {
|
|
52
52
|
/**
|
|
53
53
|
Use a different URL prefix for API calls, e.g. to use proxy servers.
|
|
54
|
-
The default prefix is `https://
|
|
54
|
+
The default prefix is `https://api.z.ai/api/paas/v4`.
|
|
55
55
|
*/
|
|
56
56
|
baseURL?: string;
|
|
57
57
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -51,7 +51,7 @@ interface ZhipuProvider extends ProviderV3 {
|
|
|
51
51
|
interface ZhipuProviderSettings {
|
|
52
52
|
/**
|
|
53
53
|
Use a different URL prefix for API calls, e.g. to use proxy servers.
|
|
54
|
-
The default prefix is `https://
|
|
54
|
+
The default prefix is `https://api.z.ai/api/paas/v4`.
|
|
55
55
|
*/
|
|
56
56
|
baseURL?: string;
|
|
57
57
|
/**
|
package/dist/index.js
CHANGED
|
@@ -14925,7 +14925,7 @@ var zhipuImageResponseSchema = external_exports.object({
|
|
|
14925
14925
|
// src/zhipu-provider.ts
|
|
14926
14926
|
function createZhipu(options = {}) {
|
|
14927
14927
|
var _a3;
|
|
14928
|
-
const baseURL = (_a3 = (0, import_provider_utils6.withoutTrailingSlash)(options.baseURL)) != null ? _a3 : "https://
|
|
14928
|
+
const baseURL = (_a3 = (0, import_provider_utils6.withoutTrailingSlash)(options.baseURL)) != null ? _a3 : "https://api.z.ai/api/paas/v4";
|
|
14929
14929
|
const getHeaders = () => ({
|
|
14930
14930
|
Authorization: `Bearer ${(0, import_provider_utils6.loadApiKey)({
|
|
14931
14931
|
apiKey: options.apiKey,
|