@mixedbread/sdk 0.5.0 → 0.7.2
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 +83 -0
- package/README.md +12 -24
- package/bin/migration-config.json +105 -2
- package/client.d.mts +12 -28
- package/client.d.mts.map +1 -1
- package/client.d.ts +12 -28
- package/client.d.ts.map +1 -1
- package/client.js +6 -22
- package/client.js.map +1 -1
- package/client.mjs +6 -22
- package/client.mjs.map +1 -1
- package/core/pagination.d.mts +1 -1
- package/core/pagination.d.mts.map +1 -1
- package/core/pagination.d.ts +1 -1
- package/core/pagination.d.ts.map +1 -1
- package/core/resource.d.mts +1 -1
- package/core/resource.d.mts.map +1 -1
- package/core/resource.d.ts +1 -1
- package/core/resource.d.ts.map +1 -1
- package/core/resource.js.map +1 -1
- package/core/resource.mjs.map +1 -1
- package/internal/detect-platform.js +3 -3
- package/internal/detect-platform.js.map +1 -1
- package/internal/detect-platform.mjs +3 -3
- package/internal/detect-platform.mjs.map +1 -1
- package/internal/headers.d.mts.map +1 -1
- package/internal/headers.d.ts.map +1 -1
- package/internal/headers.js +5 -5
- package/internal/headers.js.map +1 -1
- package/internal/headers.mjs +5 -5
- package/internal/headers.mjs.map +1 -1
- package/internal/shim-types.d.mts +11 -22
- package/internal/shim-types.d.mts.map +1 -0
- package/internal/shim-types.d.ts +11 -22
- package/internal/shim-types.d.ts.map +1 -0
- package/internal/shim-types.js +4 -0
- package/internal/shim-types.js.map +1 -0
- package/internal/shim-types.mjs +3 -0
- package/internal/shim-types.mjs.map +1 -0
- package/internal/shims.d.mts +2 -2
- package/internal/shims.d.mts.map +1 -1
- package/internal/shims.d.ts +2 -2
- package/internal/shims.d.ts.map +1 -1
- package/internal/uploads.js +1 -1
- package/internal/uploads.js.map +1 -1
- package/internal/uploads.mjs +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/log.js +1 -1
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs +1 -1
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.d.mts.map +1 -1
- package/internal/utils/path.d.ts.map +1 -1
- package/internal/utils/path.js.map +1 -1
- package/internal/utils/path.mjs +1 -1
- package/internal/utils/path.mjs.map +1 -1
- package/internal/utils/values.d.mts +2 -0
- package/internal/utils/values.d.mts.map +1 -1
- package/internal/utils/values.d.ts +2 -0
- package/internal/utils/values.d.ts.map +1 -1
- package/internal/utils/values.js +4 -1
- package/internal/utils/values.js.map +1 -1
- package/internal/utils/values.mjs +2 -0
- package/internal/utils/values.mjs.map +1 -1
- package/package.json +1 -7
- package/resources/api-keys.d.mts +171 -0
- package/resources/api-keys.d.mts.map +1 -0
- package/resources/api-keys.d.ts +171 -0
- package/resources/api-keys.d.ts.map +1 -0
- package/resources/api-keys.js +76 -0
- package/resources/api-keys.js.map +1 -0
- package/resources/api-keys.mjs +72 -0
- package/resources/api-keys.mjs.map +1 -0
- package/resources/data-sources/connectors.d.mts +203 -0
- package/resources/data-sources/connectors.d.mts.map +1 -0
- package/resources/data-sources/connectors.d.ts +203 -0
- package/resources/data-sources/connectors.d.ts.map +1 -0
- package/resources/data-sources/connectors.js +73 -0
- package/resources/data-sources/connectors.js.map +1 -0
- package/resources/data-sources/connectors.mjs +69 -0
- package/resources/data-sources/connectors.mjs.map +1 -0
- package/resources/data-sources/data-sources.d.mts +287 -0
- package/resources/data-sources/data-sources.d.mts.map +1 -0
- package/resources/data-sources/data-sources.d.ts +287 -0
- package/resources/data-sources/data-sources.d.ts.map +1 -0
- package/resources/data-sources/data-sources.js +66 -0
- package/resources/data-sources/data-sources.js.map +1 -0
- package/resources/data-sources/data-sources.mjs +61 -0
- package/resources/data-sources/data-sources.mjs.map +1 -0
- package/resources/data-sources/index.d.mts +3 -0
- package/resources/data-sources/index.d.mts.map +1 -0
- package/resources/data-sources/index.d.ts +3 -0
- package/resources/data-sources/index.d.ts.map +1 -0
- package/resources/data-sources/index.js +9 -0
- package/resources/data-sources/index.js.map +1 -0
- package/resources/data-sources/index.mjs +4 -0
- package/resources/data-sources/index.mjs.map +1 -0
- package/resources/data-sources.d.mts +2 -0
- package/resources/data-sources.d.mts.map +1 -0
- package/resources/data-sources.d.ts +2 -0
- package/resources/data-sources.d.ts.map +1 -0
- package/resources/data-sources.js +6 -0
- package/resources/data-sources.js.map +1 -0
- package/resources/data-sources.mjs +3 -0
- package/resources/data-sources.mjs.map +1 -0
- package/resources/embeddings.d.mts +7 -11
- package/resources/embeddings.d.mts.map +1 -1
- package/resources/embeddings.d.ts +7 -11
- package/resources/embeddings.d.ts.map +1 -1
- package/resources/embeddings.js +0 -9
- package/resources/embeddings.js.map +1 -1
- package/resources/embeddings.mjs +0 -9
- package/resources/embeddings.mjs.map +1 -1
- package/resources/extractions/content.d.mts +44 -42
- package/resources/extractions/content.d.mts.map +1 -1
- package/resources/extractions/content.d.ts +44 -42
- package/resources/extractions/content.d.ts.map +1 -1
- package/resources/extractions/extractions.d.mts +2 -2
- package/resources/extractions/extractions.d.mts.map +1 -1
- package/resources/extractions/extractions.d.ts +2 -2
- package/resources/extractions/extractions.d.ts.map +1 -1
- package/resources/extractions/extractions.js.map +1 -1
- package/resources/extractions/extractions.mjs.map +1 -1
- package/resources/extractions/index.d.mts +1 -1
- package/resources/extractions/index.d.mts.map +1 -1
- package/resources/extractions/index.d.ts +1 -1
- package/resources/extractions/index.d.ts.map +1 -1
- package/resources/extractions/index.js.map +1 -1
- package/resources/extractions/index.mjs +1 -1
- package/resources/extractions/index.mjs.map +1 -1
- package/resources/extractions/jobs.d.mts +2 -1
- package/resources/extractions/jobs.d.mts.map +1 -1
- package/resources/extractions/jobs.d.ts +2 -1
- package/resources/extractions/jobs.d.ts.map +1 -1
- package/resources/extractions/jobs.js.map +1 -1
- package/resources/extractions/jobs.mjs.map +1 -1
- package/resources/files.d.mts +18 -1
- package/resources/files.d.mts.map +1 -1
- package/resources/files.d.ts +18 -1
- package/resources/files.d.ts.map +1 -1
- package/resources/index.d.mts +5 -3
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +5 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -0
- package/resources/index.mjs.map +1 -1
- package/resources/parsing/index.d.mts +1 -1
- package/resources/parsing/index.d.mts.map +1 -1
- package/resources/parsing/index.d.ts +1 -1
- package/resources/parsing/index.d.ts.map +1 -1
- package/resources/parsing/index.js.map +1 -1
- package/resources/parsing/index.mjs.map +1 -1
- package/resources/parsing/jobs.d.mts +24 -10
- package/resources/parsing/jobs.d.mts.map +1 -1
- package/resources/parsing/jobs.d.ts +24 -10
- package/resources/parsing/jobs.d.ts.map +1 -1
- package/resources/parsing/jobs.js.map +1 -1
- package/resources/parsing/jobs.mjs.map +1 -1
- package/resources/parsing/parsing.d.mts +2 -2
- package/resources/parsing/parsing.d.mts.map +1 -1
- package/resources/parsing/parsing.d.ts +2 -2
- package/resources/parsing/parsing.d.ts.map +1 -1
- package/resources/parsing/parsing.js.map +1 -1
- package/resources/parsing/parsing.mjs.map +1 -1
- package/resources/top-level.d.mts +5 -4
- package/resources/top-level.d.mts.map +1 -1
- package/resources/top-level.d.ts +5 -4
- package/resources/top-level.d.ts.map +1 -1
- package/resources/vector-stores/files.d.mts +79 -19
- package/resources/vector-stores/files.d.mts.map +1 -1
- package/resources/vector-stores/files.d.ts +79 -19
- package/resources/vector-stores/files.d.ts.map +1 -1
- package/resources/vector-stores/files.js +19 -18
- package/resources/vector-stores/files.js.map +1 -1
- package/resources/vector-stores/files.mjs +19 -18
- package/resources/vector-stores/files.mjs.map +1 -1
- package/resources/vector-stores/index.d.mts +1 -1
- package/resources/vector-stores/index.d.mts.map +1 -1
- package/resources/vector-stores/index.d.ts +1 -1
- package/resources/vector-stores/index.d.ts.map +1 -1
- package/resources/vector-stores/index.js.map +1 -1
- package/resources/vector-stores/index.mjs.map +1 -1
- package/resources/vector-stores/vector-stores.d.mts +275 -90
- package/resources/vector-stores/vector-stores.d.mts.map +1 -1
- package/resources/vector-stores/vector-stores.d.ts +275 -90
- package/resources/vector-stores/vector-stores.d.ts.map +1 -1
- package/resources/vector-stores/vector-stores.js +18 -15
- package/resources/vector-stores/vector-stores.js.map +1 -1
- package/resources/vector-stores/vector-stores.mjs +18 -15
- package/resources/vector-stores/vector-stores.mjs.map +1 -1
- package/src/client.ts +63 -30
- package/src/core/pagination.ts +1 -1
- package/src/core/resource.ts +1 -1
- package/src/internal/detect-platform.ts +3 -3
- package/src/internal/headers.ts +6 -6
- package/src/internal/shim-types.ts +26 -0
- package/src/internal/shims.ts +2 -2
- package/src/internal/uploads.ts +2 -2
- package/src/internal/utils/log.ts +1 -1
- package/src/internal/utils/path.ts +1 -1
- package/src/internal/utils/values.ts +3 -0
- package/src/resources/api-keys.ts +225 -0
- package/src/resources/data-sources/connectors.ts +290 -0
- package/src/resources/data-sources/data-sources.ts +404 -0
- package/src/resources/data-sources/index.ts +24 -0
- package/src/resources/data-sources.ts +3 -0
- package/src/resources/embeddings.ts +25 -19
- package/src/resources/extractions/content.ts +51 -43
- package/src/resources/extractions/extractions.ts +3 -1
- package/src/resources/extractions/index.ts +7 -1
- package/src/resources/extractions/jobs.ts +2 -1
- package/src/resources/files.ts +21 -0
- package/src/resources/index.ts +26 -4
- package/src/resources/parsing/index.ts +4 -0
- package/src/resources/parsing/jobs.ts +42 -44
- package/src/resources/parsing/parsing.ts +8 -0
- package/src/resources/top-level.ts +5 -44
- package/src/resources/vector-stores/files.ts +104 -28
- package/src/resources/vector-stores/index.ts +4 -3
- package/src/resources/vector-stores/vector-stores.ts +330 -102
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/src/internal/shim-types.d.ts +0 -28
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,88 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.7.2 (2025-06-16)
|
4
|
+
|
5
|
+
Full Changelog: [v0.7.1...v0.7.2](https://github.com/mixedbread-ai/mixedbread-ts/compare/v0.7.1...v0.7.2)
|
6
|
+
|
7
|
+
### Chores
|
8
|
+
|
9
|
+
* update the vs_id ([a488377](https://github.com/mixedbread-ai/mixedbread-ts/commit/a48837750d4e703839c4006bbbc34ab9d9044418))
|
10
|
+
|
11
|
+
## 0.7.1 (2025-06-16)
|
12
|
+
|
13
|
+
Full Changelog: [v0.7.0...v0.7.1](https://github.com/mixedbread-ai/mixedbread-ts/compare/v0.7.0...v0.7.1)
|
14
|
+
|
15
|
+
## 0.7.0 (2025-06-14)
|
16
|
+
|
17
|
+
Full Changelog: [v0.6.0...v0.7.0](https://github.com/mixedbread-ai/mixedbread-ts/compare/v0.6.0...v0.7.0)
|
18
|
+
|
19
|
+
### Features
|
20
|
+
|
21
|
+
* **api:** api update ([d9376d3](https://github.com/mixedbread-ai/mixedbread-ts/commit/d9376d30769cdb5019ba6c3553a5ff95890a6dee))
|
22
|
+
* **api:** api update ([1561d2f](https://github.com/mixedbread-ai/mixedbread-ts/commit/1561d2f597cdd152d851e797daaace847267f625))
|
23
|
+
* **api:** api update ([0f9b94b](https://github.com/mixedbread-ai/mixedbread-ts/commit/0f9b94be529790be8e7176599c7cea6980672eee))
|
24
|
+
* **api:** api update ([6fc614c](https://github.com/mixedbread-ai/mixedbread-ts/commit/6fc614ce58406b9bd49a1dd138b09d7f5f6ef3da))
|
25
|
+
* **api:** update via SDK Studio ([87c97c3](https://github.com/mixedbread-ai/mixedbread-ts/commit/87c97c3162e6d653ef2a0652cf753c4edd585d9f))
|
26
|
+
* **api:** update via SDK Studio ([3e527e4](https://github.com/mixedbread-ai/mixedbread-ts/commit/3e527e47c2efe3cc160b83e895f1bc0d92291138))
|
27
|
+
* **mcp:** implement support for binary responses ([64a9c65](https://github.com/mixedbread-ai/mixedbread-ts/commit/64a9c65a618e52f49a9f7c92342c35463ce66937))
|
28
|
+
* **mcp:** include http information in tools ([3138d3c](https://github.com/mixedbread-ai/mixedbread-ts/commit/3138d3c3399f24fd32f97c2023a1e47dc959969d))
|
29
|
+
* **mcp:** set X-Stainless-MCP header ([6b5bdbc](https://github.com/mixedbread-ai/mixedbread-ts/commit/6b5bdbc2cdf382b94a01738084c242c4c969d381))
|
30
|
+
|
31
|
+
|
32
|
+
### Bug Fixes
|
33
|
+
|
34
|
+
* compat with more runtimes ([101e76f](https://github.com/mixedbread-ai/mixedbread-ts/commit/101e76f065b1a6e9d3b220dac3b0dfc8ee91aa73))
|
35
|
+
* **mcp:** include description in dynamic tool search ([69a15a4](https://github.com/mixedbread-ai/mixedbread-ts/commit/69a15a4c84f3393695dc3c45df7af0111927b3a5))
|
36
|
+
* publish script — handle NPM errors correctly ([b27592b](https://github.com/mixedbread-ai/mixedbread-ts/commit/b27592ba009a84288b90ddb32c2847122e617cf1))
|
37
|
+
|
38
|
+
|
39
|
+
### Chores
|
40
|
+
|
41
|
+
* adjust eslint.config.mjs ignore pattern ([fba075c](https://github.com/mixedbread-ai/mixedbread-ts/commit/fba075cbd0b395c7f7cbd9506bdf879de76a7358))
|
42
|
+
* avoid type error in certain environments ([a445536](https://github.com/mixedbread-ai/mixedbread-ts/commit/a445536ecf9344b665940c6c19b9547c7a533cda))
|
43
|
+
* **deps:** bump eslint-plugin-prettier ([be8bfd9](https://github.com/mixedbread-ai/mixedbread-ts/commit/be8bfd978d71bf2f25dd594ac4872abd93e50f05))
|
44
|
+
* **docs:** use top-level-await in example snippets ([aa74b0e](https://github.com/mixedbread-ai/mixedbread-ts/commit/aa74b0ea186751d325daf95b13a4af53a6db1986))
|
45
|
+
* improve publish-npm script --latest tag logic ([e6276e1](https://github.com/mixedbread-ai/mixedbread-ts/commit/e6276e1065586031d8c02582ee20131f36083116))
|
46
|
+
* **internal:** add pure annotations, make base APIResource abstract ([aff3299](https://github.com/mixedbread-ai/mixedbread-ts/commit/aff3299dcd6d00c739ac8c93435f43ad2fdf7368))
|
47
|
+
* **internal:** codegen related update ([a57e92b](https://github.com/mixedbread-ai/mixedbread-ts/commit/a57e92b751a5a7371e1bceca085582477832ecef))
|
48
|
+
* **internal:** fix readablestream types in node 20 ([33ce546](https://github.com/mixedbread-ai/mixedbread-ts/commit/33ce546ee0e96b8377f644577bdc1c3a161cc2c4))
|
49
|
+
* **internal:** update jest config ([212166e](https://github.com/mixedbread-ai/mixedbread-ts/commit/212166e14882f5ac23155c1a08fbac0feecdecc0))
|
50
|
+
* **mcp:** provides high-level initMcpServer function and exports known clients ([e12f795](https://github.com/mixedbread-ai/mixedbread-ts/commit/e12f7952a7afc20c85cb881485b62b6e4b55d76f))
|
51
|
+
* **mcp:** remove duplicate assignment ([12ad006](https://github.com/mixedbread-ai/mixedbread-ts/commit/12ad0064f641916d697cc9cde9905c7409b8bdec))
|
52
|
+
|
53
|
+
## 0.6.0 (2025-05-26)
|
54
|
+
|
55
|
+
Full Changelog: [v0.5.0...v0.6.0](https://github.com/mixedbread-ai/mixedbread-ts/compare/v0.5.0...v0.6.0)
|
56
|
+
|
57
|
+
### Features
|
58
|
+
|
59
|
+
* **api:** update via SDK Studio ([843e5c1](https://github.com/mixedbread-ai/mixedbread-ts/commit/843e5c11171870194586b31d2234f401a9e1a686))
|
60
|
+
* **api:** update via SDK Studio ([e2cb315](https://github.com/mixedbread-ai/mixedbread-ts/commit/e2cb315adc2eb59a650c870fcae961f5d8da8e1f))
|
61
|
+
* **api:** update via SDK Studio ([8a37885](https://github.com/mixedbread-ai/mixedbread-ts/commit/8a3788591792af3c897a6c819f1d8ae327640163))
|
62
|
+
* **api:** update via SDK Studio ([43f31db](https://github.com/mixedbread-ai/mixedbread-ts/commit/43f31dbe78cd8f1623b373baad2f5ebed03b7fef))
|
63
|
+
* **api:** update via SDK Studio ([1ebc730](https://github.com/mixedbread-ai/mixedbread-ts/commit/1ebc7304ce954ffd5bd46ff485228e62d5e723fc))
|
64
|
+
* **api:** update via SDK Studio ([904cb87](https://github.com/mixedbread-ai/mixedbread-ts/commit/904cb87bdef9d00d04bb5b78fcbfc9d2a2ea0322))
|
65
|
+
* **api:** update via SDK Studio ([40324a6](https://github.com/mixedbread-ai/mixedbread-ts/commit/40324a658c833c268d6a3372de525816780d3c21))
|
66
|
+
* **mcp:** support dynamically discovering and invoking tools for APIs with many endpoints ([285308d](https://github.com/mixedbread-ai/mixedbread-ts/commit/285308da19b88ba5e39d42d52c3e364a0d6d0a00))
|
67
|
+
* **mcp:** support initializing the server with an "environment" ([925075d](https://github.com/mixedbread-ai/mixedbread-ts/commit/925075d05ac63cf2e75fef791f8d6c7a11ba8cd1))
|
68
|
+
|
69
|
+
|
70
|
+
### Bug Fixes
|
71
|
+
|
72
|
+
* **client:** always overwrite when merging headers ([9c69eb5](https://github.com/mixedbread-ai/mixedbread-ts/commit/9c69eb509fe085968f5dcbceb3dc0aad361e6c8e))
|
73
|
+
* **mcp:** explicitly include zod and zod-to-json-schema in package.json ([44952cb](https://github.com/mixedbread-ai/mixedbread-ts/commit/44952cb96fe51e8f43dc43aa07dc29d53ec2573b))
|
74
|
+
* **mcp:** fix cursor schema transformation issue with recursive references ([1a50cfe](https://github.com/mixedbread-ai/mixedbread-ts/commit/1a50cfe6b8d5fdbad923865b56e4c170b7f546da))
|
75
|
+
|
76
|
+
|
77
|
+
### Chores
|
78
|
+
|
79
|
+
* **build:** automatically build subpackages if present ([99dcafa](https://github.com/mixedbread-ai/mixedbread-ts/commit/99dcafaaec25a90571c311b2c918ee399b4b3982))
|
80
|
+
* **docs:** grammar improvements ([b10ade0](https://github.com/mixedbread-ai/mixedbread-ts/commit/b10ade0841b0d0b884677963c18bb7300a8d149c))
|
81
|
+
* **internal:** codegen related update ([69ba23e](https://github.com/mixedbread-ai/mixedbread-ts/commit/69ba23e8fcdfec9fdc711afc72834eb4430af673))
|
82
|
+
* **internal:** codegen related update ([048457f](https://github.com/mixedbread-ai/mixedbread-ts/commit/048457f38564e35fe8ca08f5677397b12526ec62))
|
83
|
+
* **package:** remove engines ([ef7cf2c](https://github.com/mixedbread-ai/mixedbread-ts/commit/ef7cf2c85bb78773daead80ea6a51401870908b0))
|
84
|
+
* **tests:** use node 22 for CI tests ([60d63ff](https://github.com/mixedbread-ai/mixedbread-ts/commit/60d63ff560eab0bd34e2282f292fda4dba4dd17b))
|
85
|
+
|
3
86
|
## 0.5.0 (2025-05-07)
|
4
87
|
|
5
88
|
Full Changelog: [v0.4.0...v0.5.0](https://github.com/mixedbread-ai/mixedbread-ts/compare/v0.4.0...v0.5.0)
|
package/README.md
CHANGED
@@ -27,13 +27,9 @@ const client = new Mixedbread({
|
|
27
27
|
environment: 'local', // defaults to 'production'
|
28
28
|
});
|
29
29
|
|
30
|
-
|
31
|
-
const vectorStore = await client.vectorStores.create();
|
30
|
+
const vectorStore = await client.vectorStores.create();
|
32
31
|
|
33
|
-
|
34
|
-
}
|
35
|
-
|
36
|
-
main();
|
32
|
+
console.log(vectorStore.id);
|
37
33
|
```
|
38
34
|
|
39
35
|
### Request & Response types
|
@@ -49,11 +45,7 @@ const client = new Mixedbread({
|
|
49
45
|
environment: 'local', // defaults to 'production'
|
50
46
|
});
|
51
47
|
|
52
|
-
|
53
|
-
const vectorStore: Mixedbread.VectorStore = await client.vectorStores.create();
|
54
|
-
}
|
55
|
-
|
56
|
-
main();
|
48
|
+
const vectorStore: Mixedbread.VectorStore = await client.vectorStores.create();
|
57
49
|
```
|
58
50
|
|
59
51
|
Documentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.
|
@@ -95,19 +87,15 @@ a subclass of `APIError` will be thrown:
|
|
95
87
|
|
96
88
|
<!-- prettier-ignore -->
|
97
89
|
```ts
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
});
|
108
|
-
}
|
109
|
-
|
110
|
-
main();
|
90
|
+
const vectorStore = await client.vectorStores.create().catch(async (err) => {
|
91
|
+
if (err instanceof Mixedbread.APIError) {
|
92
|
+
console.log(err.status); // 400
|
93
|
+
console.log(err.name); // BadRequestError
|
94
|
+
console.log(err.headers); // {server: 'nginx', ...}
|
95
|
+
} else {
|
96
|
+
throw err;
|
97
|
+
}
|
98
|
+
});
|
111
99
|
```
|
112
100
|
|
113
101
|
Error codes are as follows:
|
@@ -23,7 +23,7 @@
|
|
23
23
|
"oldParams": [
|
24
24
|
{
|
25
25
|
"type": "param",
|
26
|
-
"key": "
|
26
|
+
"key": "vector_store_identifier",
|
27
27
|
"location": "path"
|
28
28
|
},
|
29
29
|
{
|
@@ -56,7 +56,7 @@
|
|
56
56
|
"oldParams": [
|
57
57
|
{
|
58
58
|
"type": "param",
|
59
|
-
"key": "
|
59
|
+
"key": "vector_store_identifier",
|
60
60
|
"location": "path"
|
61
61
|
},
|
62
62
|
{
|
@@ -68,6 +68,109 @@
|
|
68
68
|
"type": "options"
|
69
69
|
}
|
70
70
|
]
|
71
|
+
},
|
72
|
+
{
|
73
|
+
"base": "dataSources.connectors",
|
74
|
+
"name": "retrieve",
|
75
|
+
"params": [
|
76
|
+
{
|
77
|
+
"type": "param",
|
78
|
+
"key": "connector_id",
|
79
|
+
"location": "path"
|
80
|
+
},
|
81
|
+
{
|
82
|
+
"type": "params",
|
83
|
+
"maybeOverload": false
|
84
|
+
},
|
85
|
+
{
|
86
|
+
"type": "options"
|
87
|
+
}
|
88
|
+
],
|
89
|
+
"oldParams": [
|
90
|
+
{
|
91
|
+
"type": "param",
|
92
|
+
"key": "data_source_id",
|
93
|
+
"location": "path"
|
94
|
+
},
|
95
|
+
{
|
96
|
+
"type": "param",
|
97
|
+
"key": "connector_id",
|
98
|
+
"location": "path"
|
99
|
+
},
|
100
|
+
{
|
101
|
+
"type": "options"
|
102
|
+
}
|
103
|
+
]
|
104
|
+
},
|
105
|
+
{
|
106
|
+
"base": "dataSources.connectors",
|
107
|
+
"name": "update",
|
108
|
+
"params": [
|
109
|
+
{
|
110
|
+
"type": "param",
|
111
|
+
"key": "connector_id",
|
112
|
+
"location": "path"
|
113
|
+
},
|
114
|
+
{
|
115
|
+
"type": "params",
|
116
|
+
"maybeOverload": false
|
117
|
+
},
|
118
|
+
{
|
119
|
+
"type": "options"
|
120
|
+
}
|
121
|
+
],
|
122
|
+
"oldParams": [
|
123
|
+
{
|
124
|
+
"type": "param",
|
125
|
+
"key": "data_source_id",
|
126
|
+
"location": "path"
|
127
|
+
},
|
128
|
+
{
|
129
|
+
"type": "param",
|
130
|
+
"key": "connector_id",
|
131
|
+
"location": "path"
|
132
|
+
},
|
133
|
+
{
|
134
|
+
"type": "params",
|
135
|
+
"maybeOverload": false
|
136
|
+
},
|
137
|
+
{
|
138
|
+
"type": "options"
|
139
|
+
}
|
140
|
+
]
|
141
|
+
},
|
142
|
+
{
|
143
|
+
"base": "dataSources.connectors",
|
144
|
+
"name": "delete",
|
145
|
+
"params": [
|
146
|
+
{
|
147
|
+
"type": "param",
|
148
|
+
"key": "connector_id",
|
149
|
+
"location": "path"
|
150
|
+
},
|
151
|
+
{
|
152
|
+
"type": "params",
|
153
|
+
"maybeOverload": false
|
154
|
+
},
|
155
|
+
{
|
156
|
+
"type": "options"
|
157
|
+
}
|
158
|
+
],
|
159
|
+
"oldParams": [
|
160
|
+
{
|
161
|
+
"type": "param",
|
162
|
+
"key": "data_source_id",
|
163
|
+
"location": "path"
|
164
|
+
},
|
165
|
+
{
|
166
|
+
"type": "param",
|
167
|
+
"key": "connector_id",
|
168
|
+
"location": "path"
|
169
|
+
},
|
170
|
+
{
|
171
|
+
"type": "options"
|
172
|
+
}
|
173
|
+
]
|
71
174
|
}
|
72
175
|
]
|
73
176
|
}
|
package/client.d.mts
CHANGED
@@ -14,11 +14,13 @@ import { APIPromise } from "./core/api-promise.mjs";
|
|
14
14
|
import { type Fetch } from "./internal/builtin-types.mjs";
|
15
15
|
import { HeadersLike, NullableHeaders } from "./internal/headers.mjs";
|
16
16
|
import { FinalRequestOptions, RequestOptions } from "./internal/request-options.mjs";
|
17
|
-
import {
|
18
|
-
import {
|
17
|
+
import { APIKey, APIKeyCreateParams, APIKeyCreated, APIKeyDeleteResponse, APIKeyListParams, APIKeys, APIKeysLimitOffset } from "./resources/api-keys.mjs";
|
18
|
+
import { EmbeddingCreateParams, Embeddings, EncodingFormat, ObjectType } from "./resources/embeddings.mjs";
|
19
|
+
import { FileCreateParams, FileDeleteResponse, FileListParams, FileObject, FileObjectsLimitOffset, FileUpdateParams, Files, PaginationWithTotal } from "./resources/files.mjs";
|
20
|
+
import { DataSource, DataSourceCreateParams, DataSourceDeleteResponse, DataSourceListParams, DataSourceOauth2Params, DataSourceType, DataSourceUpdateParams, DataSources, DataSourcesLimitOffset } from "./resources/data-sources/data-sources.mjs";
|
19
21
|
import { Extractions } from "./resources/extractions/extractions.mjs";
|
20
22
|
import { Parsing } from "./resources/parsing/parsing.mjs";
|
21
|
-
import { ExpiresAfter,
|
23
|
+
import { ExpiresAfter, ScoredAudioURLInputChunk, ScoredImageURLInputChunk, ScoredTextInputChunk, ScoredVideoURLInputChunk, VectorStore, VectorStoreChunkSearchOptions, VectorStoreCreateParams, VectorStoreDeleteResponse, VectorStoreListParams, VectorStoreQuestionAnsweringParams, VectorStoreQuestionAnsweringResponse, VectorStoreSearchParams, VectorStoreSearchResponse, VectorStoreUpdateParams, VectorStores, VectorStoresLimitOffset } from "./resources/vector-stores/vector-stores.mjs";
|
22
24
|
declare const environments: {
|
23
25
|
production: string;
|
24
26
|
local: string;
|
@@ -136,25 +138,12 @@ export declare class Mixedbread {
|
|
136
138
|
* Args: params: The parameters for creating embeddings.
|
137
139
|
*
|
138
140
|
* Returns: EmbeddingCreateResponse: The response containing the embeddings.
|
139
|
-
*
|
140
|
-
* @example
|
141
|
-
* ```ts
|
142
|
-
* const embeddingCreateResponse = await client.embed({
|
143
|
-
* model: 'mixedbread-ai/mxbai-embed-large-v1',
|
144
|
-
* input: 'x',
|
145
|
-
* });
|
146
|
-
* ```
|
147
141
|
*/
|
148
142
|
embed(body: TopLevelAPI.EmbedParams, options?: RequestOptions): APIPromise<TopLevelAPI.EmbeddingCreateResponse>;
|
149
143
|
/**
|
150
144
|
* Returns service information, including name and version.
|
151
145
|
*
|
152
146
|
* Returns: InfoResponse: A response containing the service name and version.
|
153
|
-
*
|
154
|
-
* @example
|
155
|
-
* ```ts
|
156
|
-
* const response = await client.info();
|
157
|
-
* ```
|
158
147
|
*/
|
159
148
|
info(options?: RequestOptions): APIPromise<TopLevelAPI.InfoResponse>;
|
160
149
|
/**
|
@@ -163,15 +152,6 @@ export declare class Mixedbread {
|
|
163
152
|
* Args: params: RerankParams: The parameters for reranking.
|
164
153
|
*
|
165
154
|
* Returns: RerankResponse: The reranked documents for the input query.
|
166
|
-
*
|
167
|
-
* @example
|
168
|
-
* ```ts
|
169
|
-
* const response = await client.rerank({
|
170
|
-
* query:
|
171
|
-
* 'What are the key features of the Mixedbread embedding model?',
|
172
|
-
* input: ['Document 1', 'Document 2'],
|
173
|
-
* });
|
174
|
-
* ```
|
175
155
|
*/
|
176
156
|
rerank(body: TopLevelAPI.RerankParams, options?: RequestOptions): APIPromise<TopLevelAPI.RerankResponse>;
|
177
157
|
protected defaultQuery(): Record<string, string | undefined> | undefined;
|
@@ -243,17 +223,21 @@ export declare class Mixedbread {
|
|
243
223
|
files: API.Files;
|
244
224
|
extractions: API.Extractions;
|
245
225
|
embeddings: API.Embeddings;
|
226
|
+
dataSources: API.DataSources;
|
227
|
+
apiKeys: API.APIKeys;
|
246
228
|
}
|
247
229
|
export declare namespace Mixedbread {
|
248
230
|
export type RequestOptions = Opts.RequestOptions;
|
249
231
|
export import LimitOffset = Pagination.LimitOffset;
|
250
232
|
export { type LimitOffsetParams as LimitOffsetParams, type LimitOffsetResponse as LimitOffsetResponse };
|
251
233
|
export { type Embedding as Embedding, type EmbeddingCreateResponse as EmbeddingCreateResponse, type MultiEncodingEmbedding as MultiEncodingEmbedding, type InfoResponse as InfoResponse, type RerankResponse as RerankResponse, type EmbedParams as EmbedParams, type RerankParams as RerankParams, };
|
252
|
-
export { VectorStores as VectorStores, type ExpiresAfter as ExpiresAfter, type
|
234
|
+
export { VectorStores as VectorStores, type ExpiresAfter as ExpiresAfter, type ScoredAudioURLInputChunk as ScoredAudioURLInputChunk, type ScoredImageURLInputChunk as ScoredImageURLInputChunk, type ScoredTextInputChunk as ScoredTextInputChunk, type ScoredVideoURLInputChunk as ScoredVideoURLInputChunk, type VectorStore as VectorStore, type VectorStoreChunkSearchOptions as VectorStoreChunkSearchOptions, type VectorStoreDeleteResponse as VectorStoreDeleteResponse, type VectorStoreQuestionAnsweringResponse as VectorStoreQuestionAnsweringResponse, type VectorStoreSearchResponse as VectorStoreSearchResponse, type VectorStoresLimitOffset as VectorStoresLimitOffset, type VectorStoreCreateParams as VectorStoreCreateParams, type VectorStoreUpdateParams as VectorStoreUpdateParams, type VectorStoreListParams as VectorStoreListParams, type VectorStoreQuestionAnsweringParams as VectorStoreQuestionAnsweringParams, type VectorStoreSearchParams as VectorStoreSearchParams, };
|
253
235
|
export { Parsing as Parsing };
|
254
|
-
export { Files as Files, type FileObject as FileObject, type FileDeleteResponse as FileDeleteResponse, type FileObjectsLimitOffset as FileObjectsLimitOffset, type FileCreateParams as FileCreateParams, type FileUpdateParams as FileUpdateParams, type FileListParams as FileListParams, };
|
236
|
+
export { Files as Files, type FileObject as FileObject, type PaginationWithTotal as PaginationWithTotal, type FileDeleteResponse as FileDeleteResponse, type FileObjectsLimitOffset as FileObjectsLimitOffset, type FileCreateParams as FileCreateParams, type FileUpdateParams as FileUpdateParams, type FileListParams as FileListParams, };
|
255
237
|
export { Extractions as Extractions };
|
256
|
-
export { Embeddings as Embeddings, type EmbeddingCreateParams as EmbeddingCreateParams };
|
238
|
+
export { Embeddings as Embeddings, type EncodingFormat as EncodingFormat, type ObjectType as ObjectType, type EmbeddingCreateParams as EmbeddingCreateParams, };
|
239
|
+
export { DataSources as DataSources, type DataSource as DataSource, type DataSourceOauth2Params as DataSourceOauth2Params, type DataSourceType as DataSourceType, type DataSourceDeleteResponse as DataSourceDeleteResponse, type DataSourcesLimitOffset as DataSourcesLimitOffset, type DataSourceCreateParams as DataSourceCreateParams, type DataSourceUpdateParams as DataSourceUpdateParams, type DataSourceListParams as DataSourceListParams, };
|
240
|
+
export { APIKeys as APIKeys, type APIKey as APIKey, type APIKeyCreated as APIKeyCreated, type APIKeyDeleteResponse as APIKeyDeleteResponse, type APIKeysLimitOffset as APIKeysLimitOffset, type APIKeyCreateParams as APIKeyCreateParams, type APIKeyListParams as APIKeyListParams, };
|
257
241
|
export type SearchFilter = API.SearchFilter;
|
258
242
|
export type SearchFilterCondition = API.SearchFilterCondition;
|
259
243
|
export type Usage = API.Usage;
|
package/client.d.mts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"client.d.mts","sourceRoot":"","sources":["src/client.ts"],"names":[],"mappings":"OAEO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAY;OAC3C,KAAK,EAAc,cAAc,EAAE,iBAAiB,EAAE,oBAAoB,EAAE;OAI5E,EAAE,KAAK,MAAM,EAAE,KAAK,QAAQ,EAAiB;YACxC,EAAE,MAAM,EAAE,QAAQ,EAAE;OAKzB,KAAK,IAAI;OAET,KAAK,MAAM;OACX,KAAK,UAAU;OACf,EAAgB,KAAK,iBAAiB,EAAE,mBAAmB,EAAE;OAC7D,KAAK,OAAO;OACZ,KAAK,GAAG;OACR,KAAK,WAAW;OAChB,EACL,WAAW,EACX,SAAS,EACT,uBAAuB,EACvB,YAAY,EACZ,sBAAsB,EACtB,YAAY,EACZ,cAAc,EACf;OACM,EAAE,UAAU,EAAE;OACd,EAAE,KAAK,KAAK,EAAE;OACd,EAAE,WAAW,EAAE,eAAe,EAAgB;OAC9C,EAAE,mBAAmB,EAAE,cAAc,EAAE;OACvC,EAAE,qBAAqB,EAAE,UAAU,EAAE;
|
1
|
+
{"version":3,"file":"client.d.mts","sourceRoot":"","sources":["src/client.ts"],"names":[],"mappings":"OAEO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAY;OAC3C,KAAK,E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B,EACrD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;IAEF,OAAO,EACL,OAAO,IAAI,OAAO,EAClB,KAAK,MAAM,IAAI,MAAM,EACrB,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;IAEF,MAAM,MAAM,YAAY,GAAG,GAAG,CAAC,YAAY,CAAC;IAC5C,MAAM,MAAM,qBAAqB,GAAG,GAAG,CAAC,qBAAqB,CAAC;IAC9D,MAAM,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC;CAC/B"}
|
package/client.d.ts
CHANGED
@@ -14,11 +14,13 @@ import { APIPromise } from "./core/api-promise.js";
|
|
14
14
|
import { type Fetch } from "./internal/builtin-types.js";
|
15
15
|
import { HeadersLike, NullableHeaders } from "./internal/headers.js";
|
16
16
|
import { FinalRequestOptions, RequestOptions } from "./internal/request-options.js";
|
17
|
-
import {
|
18
|
-
import {
|
17
|
+
import { APIKey, APIKeyCreateParams, APIKeyCreated, APIKeyDeleteResponse, APIKeyListParams, APIKeys, APIKeysLimitOffset } from "./resources/api-keys.js";
|
18
|
+
import { EmbeddingCreateParams, Embeddings, EncodingFormat, ObjectType } from "./resources/embeddings.js";
|
19
|
+
import { FileCreateParams, FileDeleteResponse, FileListParams, FileObject, FileObjectsLimitOffset, FileUpdateParams, Files, PaginationWithTotal } from "./resources/files.js";
|
20
|
+
import { DataSource, DataSourceCreateParams, DataSourceDeleteResponse, DataSourceListParams, DataSourceOauth2Params, DataSourceType, DataSourceUpdateParams, DataSources, DataSourcesLimitOffset } from "./resources/data-sources/data-sources.js";
|
19
21
|
import { Extractions } from "./resources/extractions/extractions.js";
|
20
22
|
import { Parsing } from "./resources/parsing/parsing.js";
|
21
|
-
import { ExpiresAfter,
|
23
|
+
import { ExpiresAfter, ScoredAudioURLInputChunk, ScoredImageURLInputChunk, ScoredTextInputChunk, ScoredVideoURLInputChunk, VectorStore, VectorStoreChunkSearchOptions, VectorStoreCreateParams, VectorStoreDeleteResponse, VectorStoreListParams, VectorStoreQuestionAnsweringParams, VectorStoreQuestionAnsweringResponse, VectorStoreSearchParams, VectorStoreSearchResponse, VectorStoreUpdateParams, VectorStores, VectorStoresLimitOffset } from "./resources/vector-stores/vector-stores.js";
|
22
24
|
declare const environments: {
|
23
25
|
production: string;
|
24
26
|
local: string;
|
@@ -136,25 +138,12 @@ export declare class Mixedbread {
|
|
136
138
|
* Args: params: The parameters for creating embeddings.
|
137
139
|
*
|
138
140
|
* Returns: EmbeddingCreateResponse: The response containing the embeddings.
|
139
|
-
*
|
140
|
-
* @example
|
141
|
-
* ```ts
|
142
|
-
* const embeddingCreateResponse = await client.embed({
|
143
|
-
* model: 'mixedbread-ai/mxbai-embed-large-v1',
|
144
|
-
* input: 'x',
|
145
|
-
* });
|
146
|
-
* ```
|
147
141
|
*/
|
148
142
|
embed(body: TopLevelAPI.EmbedParams, options?: RequestOptions): APIPromise<TopLevelAPI.EmbeddingCreateResponse>;
|
149
143
|
/**
|
150
144
|
* Returns service information, including name and version.
|
151
145
|
*
|
152
146
|
* Returns: InfoResponse: A response containing the service name and version.
|
153
|
-
*
|
154
|
-
* @example
|
155
|
-
* ```ts
|
156
|
-
* const response = await client.info();
|
157
|
-
* ```
|
158
147
|
*/
|
159
148
|
info(options?: RequestOptions): APIPromise<TopLevelAPI.InfoResponse>;
|
160
149
|
/**
|
@@ -163,15 +152,6 @@ export declare class Mixedbread {
|
|
163
152
|
* Args: params: RerankParams: The parameters for reranking.
|
164
153
|
*
|
165
154
|
* Returns: RerankResponse: The reranked documents for the input query.
|
166
|
-
*
|
167
|
-
* @example
|
168
|
-
* ```ts
|
169
|
-
* const response = await client.rerank({
|
170
|
-
* query:
|
171
|
-
* 'What are the key features of the Mixedbread embedding model?',
|
172
|
-
* input: ['Document 1', 'Document 2'],
|
173
|
-
* });
|
174
|
-
* ```
|
175
155
|
*/
|
176
156
|
rerank(body: TopLevelAPI.RerankParams, options?: RequestOptions): APIPromise<TopLevelAPI.RerankResponse>;
|
177
157
|
protected defaultQuery(): Record<string, string | undefined> | undefined;
|
@@ -243,17 +223,21 @@ export declare class Mixedbread {
|
|
243
223
|
files: API.Files;
|
244
224
|
extractions: API.Extractions;
|
245
225
|
embeddings: API.Embeddings;
|
226
|
+
dataSources: API.DataSources;
|
227
|
+
apiKeys: API.APIKeys;
|
246
228
|
}
|
247
229
|
export declare namespace Mixedbread {
|
248
230
|
export type RequestOptions = Opts.RequestOptions;
|
249
231
|
export import LimitOffset = Pagination.LimitOffset;
|
250
232
|
export { type LimitOffsetParams as LimitOffsetParams, type LimitOffsetResponse as LimitOffsetResponse };
|
251
233
|
export { type Embedding as Embedding, type EmbeddingCreateResponse as EmbeddingCreateResponse, type MultiEncodingEmbedding as MultiEncodingEmbedding, type InfoResponse as InfoResponse, type RerankResponse as RerankResponse, type EmbedParams as EmbedParams, type RerankParams as RerankParams, };
|
252
|
-
export { VectorStores as VectorStores, type ExpiresAfter as ExpiresAfter, type
|
234
|
+
export { VectorStores as VectorStores, type ExpiresAfter as ExpiresAfter, type ScoredAudioURLInputChunk as ScoredAudioURLInputChunk, type ScoredImageURLInputChunk as ScoredImageURLInputChunk, type ScoredTextInputChunk as ScoredTextInputChunk, type ScoredVideoURLInputChunk as ScoredVideoURLInputChunk, type VectorStore as VectorStore, type VectorStoreChunkSearchOptions as VectorStoreChunkSearchOptions, type VectorStoreDeleteResponse as VectorStoreDeleteResponse, type VectorStoreQuestionAnsweringResponse as VectorStoreQuestionAnsweringResponse, type VectorStoreSearchResponse as VectorStoreSearchResponse, type VectorStoresLimitOffset as VectorStoresLimitOffset, type VectorStoreCreateParams as VectorStoreCreateParams, type VectorStoreUpdateParams as VectorStoreUpdateParams, type VectorStoreListParams as VectorStoreListParams, type VectorStoreQuestionAnsweringParams as VectorStoreQuestionAnsweringParams, type VectorStoreSearchParams as VectorStoreSearchParams, };
|
253
235
|
export { Parsing as Parsing };
|
254
|
-
export { Files as Files, type FileObject as FileObject, type FileDeleteResponse as FileDeleteResponse, type FileObjectsLimitOffset as FileObjectsLimitOffset, type FileCreateParams as FileCreateParams, type FileUpdateParams as FileUpdateParams, type FileListParams as FileListParams, };
|
236
|
+
export { Files as Files, type FileObject as FileObject, type PaginationWithTotal as PaginationWithTotal, type FileDeleteResponse as FileDeleteResponse, type FileObjectsLimitOffset as FileObjectsLimitOffset, type FileCreateParams as FileCreateParams, type FileUpdateParams as FileUpdateParams, type FileListParams as FileListParams, };
|
255
237
|
export { Extractions as Extractions };
|
256
|
-
export { Embeddings as Embeddings, type EmbeddingCreateParams as EmbeddingCreateParams };
|
238
|
+
export { Embeddings as Embeddings, type EncodingFormat as EncodingFormat, type ObjectType as ObjectType, type EmbeddingCreateParams as EmbeddingCreateParams, };
|
239
|
+
export { DataSources as DataSources, type DataSource as DataSource, type DataSourceOauth2Params as DataSourceOauth2Params, type DataSourceType as DataSourceType, type DataSourceDeleteResponse as DataSourceDeleteResponse, type DataSourcesLimitOffset as DataSourcesLimitOffset, type DataSourceCreateParams as DataSourceCreateParams, type DataSourceUpdateParams as DataSourceUpdateParams, type DataSourceListParams as DataSourceListParams, };
|
240
|
+
export { APIKeys as APIKeys, type APIKey as APIKey, type APIKeyCreated as APIKeyCreated, type APIKeyDeleteResponse as APIKeyDeleteResponse, type APIKeysLimitOffset as APIKeysLimitOffset, type APIKeyCreateParams as APIKeyCreateParams, type APIKeyListParams as APIKeyListParams, };
|
257
241
|
export type SearchFilter = API.SearchFilter;
|
258
242
|
export type SearchFilterCondition = API.SearchFilterCondition;
|
259
243
|
export type Usage = API.Usage;
|
package/client.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["src/client.ts"],"names":[],"mappings":"OAEO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAY;OAC3C,KAAK,EAAc,cAAc,EAAE,iBAAiB,EAAE,oBAAoB,EAAE;OAI5E,EAAE,KAAK,MAAM,EAAE,KAAK,QAAQ,EAAiB;YACxC,EAAE,MAAM,EAAE,QAAQ,EAAE;OAKzB,KAAK,IAAI;OAET,KAAK,MAAM;OACX,KAAK,UAAU;OACf,EAAgB,KAAK,iBAAiB,EAAE,mBAAmB,EAAE;OAC7D,KAAK,OAAO;OACZ,KAAK,GAAG;OACR,KAAK,WAAW;OAChB,EACL,WAAW,EACX,SAAS,EACT,uBAAuB,EACvB,YAAY,EACZ,sBAAsB,EACtB,YAAY,EACZ,cAAc,EACf;OACM,EAAE,UAAU,EAAE;OACd,EAAE,KAAK,KAAK,EAAE;OACd,EAAE,WAAW,EAAE,eAAe,EAAgB;OAC9C,EAAE,mBAAmB,EAAE,cAAc,EAAE;OACvC,EAAE,qBAAqB,EAAE,UAAU,EAAE;
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["src/client.ts"],"names":[],"mappings":"OAEO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAY;OAC3C,KAAK,EAAc,cAAc,EAAE,iBAAiB,EAAE,oBAAoB,EAAE;OAI5E,EAAE,KAAK,MAAM,EAAE,KAAK,QAAQ,EAAiB;YACxC,EAAE,MAAM,EAAE,QAAQ,EAAE;OAKzB,KAAK,IAAI;OAET,KAAK,MAAM;OACX,KAAK,UAAU;OACf,EAAgB,KAAK,iBAAiB,EAAE,mBAAmB,EAAE;OAC7D,KAAK,OAAO;OACZ,KAAK,GAAG;OACR,KAAK,WAAW;OAChB,EACL,WAAW,EACX,SAAS,EACT,uBAAuB,EACvB,YAAY,EACZ,sBAAsB,EACtB,YAAY,EACZ,cAAc,EACf;OACM,EAAE,UAAU,EAAE;OACd,EAAE,KAAK,KAAK,EAAE;OACd,EAAE,WAAW,EAAE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AAG,CAAC,qBAAqB,CAAC;IAC9D,MAAM,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC;CAC/B"}
|
package/client.js
CHANGED
@@ -19,11 +19,13 @@ const Uploads = tslib_1.__importStar(require("./core/uploads.js"));
|
|
19
19
|
const API = tslib_1.__importStar(require("./resources/index.js"));
|
20
20
|
const api_promise_1 = require("./core/api-promise.js");
|
21
21
|
const headers_1 = require("./internal/headers.js");
|
22
|
+
const api_keys_1 = require("./resources/api-keys.js");
|
22
23
|
const embeddings_1 = require("./resources/embeddings.js");
|
23
24
|
const files_1 = require("./resources/files.js");
|
24
25
|
const env_1 = require("./internal/utils/env.js");
|
25
26
|
const log_2 = require("./internal/utils/log.js");
|
26
27
|
const values_2 = require("./internal/utils/values.js");
|
28
|
+
const data_sources_1 = require("./resources/data-sources/data-sources.js");
|
27
29
|
const extractions_1 = require("./resources/extractions/extractions.js");
|
28
30
|
const parsing_1 = require("./resources/parsing/parsing.js");
|
29
31
|
const vector_stores_1 = require("./resources/vector-stores/vector-stores.js");
|
@@ -55,6 +57,8 @@ class Mixedbread {
|
|
55
57
|
this.files = new API.Files(this);
|
56
58
|
this.extractions = new API.Extractions(this);
|
57
59
|
this.embeddings = new API.Embeddings(this);
|
60
|
+
this.dataSources = new API.DataSources(this);
|
61
|
+
this.apiKeys = new API.APIKeys(this);
|
58
62
|
if (apiKey === undefined) {
|
59
63
|
throw new Errors.MixedbreadError("The MXBAI_API_KEY environment variable is missing or empty; either provide it, or instantiate the Mixedbread client with an apiKey option, like new Mixedbread({ apiKey: 'My API Key' }).");
|
60
64
|
}
|
@@ -108,14 +112,6 @@ class Mixedbread {
|
|
108
112
|
* Args: params: The parameters for creating embeddings.
|
109
113
|
*
|
110
114
|
* Returns: EmbeddingCreateResponse: The response containing the embeddings.
|
111
|
-
*
|
112
|
-
* @example
|
113
|
-
* ```ts
|
114
|
-
* const embeddingCreateResponse = await client.embed({
|
115
|
-
* model: 'mixedbread-ai/mxbai-embed-large-v1',
|
116
|
-
* input: 'x',
|
117
|
-
* });
|
118
|
-
* ```
|
119
115
|
*/
|
120
116
|
embed(body, options) {
|
121
117
|
return this.post('/v1/embeddings', { body, ...options });
|
@@ -124,11 +120,6 @@ class Mixedbread {
|
|
124
120
|
* Returns service information, including name and version.
|
125
121
|
*
|
126
122
|
* Returns: InfoResponse: A response containing the service name and version.
|
127
|
-
*
|
128
|
-
* @example
|
129
|
-
* ```ts
|
130
|
-
* const response = await client.info();
|
131
|
-
* ```
|
132
123
|
*/
|
133
124
|
info(options) {
|
134
125
|
return this.get('/', options);
|
@@ -139,15 +130,6 @@ class Mixedbread {
|
|
139
130
|
* Args: params: RerankParams: The parameters for reranking.
|
140
131
|
*
|
141
132
|
* Returns: RerankResponse: The reranked documents for the input query.
|
142
|
-
*
|
143
|
-
* @example
|
144
|
-
* ```ts
|
145
|
-
* const response = await client.rerank({
|
146
|
-
* query:
|
147
|
-
* 'What are the key features of the Mixedbread embedding model?',
|
148
|
-
* input: ['Document 1', 'Document 2'],
|
149
|
-
* });
|
150
|
-
* ```
|
151
133
|
*/
|
152
134
|
rerank(body, options) {
|
153
135
|
return this.post('/v1/reranking', { body, ...options });
|
@@ -532,4 +514,6 @@ Mixedbread.Parsing = parsing_1.Parsing;
|
|
532
514
|
Mixedbread.Files = files_1.Files;
|
533
515
|
Mixedbread.Extractions = extractions_1.Extractions;
|
534
516
|
Mixedbread.Embeddings = embeddings_1.Embeddings;
|
517
|
+
Mixedbread.DataSources = data_sources_1.DataSources;
|
518
|
+
Mixedbread.APIKeys = api_keys_1.APIKeys;
|
535
519
|
//# sourceMappingURL=client.js.map
|