@dbx-tools/dbx-model-catalog 0.1.5 → 0.1.6
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 +46 -9
- package/dist/_generated/json-schema.d.ts +3830 -0
- package/dist/_generated/published.d.ts +1 -1
- package/dist/_generated/schemas.d.ts +27 -2
- package/dist/browser.d.ts +11 -3
- package/dist/browser.js +9480 -1150
- package/dist/browser.js.map +32 -10
- package/dist/catalog-index.d.ts +28 -0
- package/dist/catalog.json +1 -0
- package/dist/cli.js +8847 -49461
- package/dist/cli.js.map +16 -223
- package/dist/filter.d.ts +2 -0
- package/dist/identity.d.ts +15 -0
- package/dist/index.d.ts +8 -4
- package/dist/index.js +8843 -49453
- package/dist/index.js.map +15 -222
- package/dist/local-client.d.ts +4 -0
- package/dist/{client.d.ts → pynect.d.ts} +1 -1
- package/dist/pynect.js +553 -0
- package/dist/pynect.js.map +15 -0
- package/dist/search-index.json +1 -0
- package/dist/search.d.ts +10 -0
- package/dist/snapshot.d.ts +6 -0
- package/dist/snapshot.js +9494 -0
- package/dist/snapshot.js.map +36 -0
- package/dist/types.d.ts +5 -0
- package/dist/validation.d.ts +5 -0
- package/package.json +27 -2
- package/dist/python/pyproject.toml +0 -16
- package/dist/python/src/dbx_model_catalog/__init__.py +0 -93
- package/dist/python/src/dbx_model_catalog/client.py +0 -256
- package/dist/python/src/dbx_model_catalog/database.py +0 -296
- package/dist/python/src/dbx_model_catalog/filters.py +0 -41
- package/dist/python/src/dbx_model_catalog/models.py +0 -853
- package/dist/python/src/dbx_model_catalog/publishing.py +0 -118
- package/dist/python/src/dbx_model_catalog/py.typed +0 -0
- package/dist/python/src/dbx_model_catalog/query.py +0 -593
- package/dist/python/src/dbx_model_catalog/schema/__init__.py +0 -0
- package/dist/python/src/dbx_model_catalog/schema/model-catalog.schema.json +0 -1016
- package/dist/python/src/dbx_model_catalog/search.py +0 -912
- package/dist/python/src/dbx_model_catalog_server/__init__.py +0 -3
- package/dist/python/src/dbx_model_catalog_server/app.py +0 -142
package/README.md
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
# @dbx-tools/dbx-model-catalog
|
|
2
2
|
|
|
3
|
-
The Node client
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
The default Node client loads the JSON catalog and search index directly. It
|
|
4
|
+
does not install or start Python, uv, Pynect, or Pyfig.
|
|
5
|
+
The package contains public catalog data only. It does not authenticate to a
|
|
6
|
+
Databricks workspace or discover customer endpoints.
|
|
6
7
|
|
|
7
8
|
```ts
|
|
8
9
|
import { connectModelCatalog } from "@dbx-tools/dbx-model-catalog";
|
|
@@ -10,14 +11,13 @@ import { connectModelCatalog } from "@dbx-tools/dbx-model-catalog";
|
|
|
10
11
|
await using local = await connectModelCatalog();
|
|
11
12
|
const matches = await local.client.list({ query: "gpt", limit: 10 });
|
|
12
13
|
|
|
13
|
-
await using remote = await connectModelCatalog("
|
|
14
|
+
await using remote = await connectModelCatalog("https://example.com/catalog.json");
|
|
14
15
|
const catalog = await remote.client.catalog();
|
|
15
16
|
```
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
catalog types are re-exported from
|
|
20
|
-
separate JavaScript schema implementation.
|
|
18
|
+
Set `DBX_MODEL_CATALOG_PATH` to load a local catalog. The client loads
|
|
19
|
+
`search-index.json` from the same directory unless `searchIndexPath` is set.
|
|
20
|
+
Generated catalog types are re-exported from the package.
|
|
21
21
|
|
|
22
22
|
For direct public ingestion without the service client, use the exported URL
|
|
23
23
|
for the schema this package was generated against:
|
|
@@ -32,7 +32,44 @@ const catalog = await fetch(PUBLISHED_CATALOG_URL).then(response => response.jso
|
|
|
32
32
|
const registry = await fetch(PUBLISHED_CATALOG_INDEX_URL).then(response => response.json());
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
+
The `/browser` entry point exports `loadModelCatalog()` and
|
|
36
|
+
`createModelCatalogClient()` for browser and worker use. Both use the same
|
|
37
|
+
TypeScript filtering and ranked-search implementation as the Node entry point.
|
|
38
|
+
|
|
39
|
+
Use the bundled snapshot for synchronous matching and enrichment of endpoints
|
|
40
|
+
that another client already discovered:
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
import {
|
|
44
|
+
bundledModelCatalogIndex,
|
|
45
|
+
enrichLiveModels,
|
|
46
|
+
} from "@dbx-tools/dbx-model-catalog/snapshot";
|
|
47
|
+
|
|
48
|
+
const enriched = enrichLiveModels(
|
|
49
|
+
bundledModelCatalogIndex,
|
|
50
|
+
liveEndpoints,
|
|
51
|
+
endpoint => [endpoint.name, endpoint.modelServiceName].filter(Boolean),
|
|
52
|
+
);
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
The join preserves live records that have no public catalog match. Workspace
|
|
56
|
+
discovery remains authoritative when documentation lags.
|
|
57
|
+
|
|
58
|
+
The local explorer demo uses the explicit Pynect adapter to connect to the
|
|
59
|
+
Python server:
|
|
60
|
+
|
|
61
|
+
```ts
|
|
62
|
+
import { createPynectCatalogClient } from "@dbx-tools/dbx-model-catalog/pynect";
|
|
63
|
+
|
|
64
|
+
const client = createPynectCatalogClient({ baseUrl: "ws://127.0.0.1:8787" });
|
|
65
|
+
const matches = await client.list({ query: "gpt", limit: 10 });
|
|
66
|
+
client.close();
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Install `pynect` and `@chanx-js/client` only when using this optional adapter.
|
|
70
|
+
They are not runtime dependencies of the default client.
|
|
71
|
+
|
|
35
72
|
The current URL is
|
|
36
|
-
<https://raw.githubusercontent.com/reggie-db/dbx-model-catalog/main/packages/js/web/catalog/
|
|
73
|
+
<https://raw.githubusercontent.com/reggie-db/dbx-model-catalog/main/packages/js/web/catalog/v16/catalog.json>.
|
|
37
74
|
Its `updated_at` field records the latest source-fetch timestamp represented by
|
|
38
75
|
the catalog.
|