AI Decision System
Replayable, offline-verifiable records for AI-assisted go/no-go decisions: experiment promotions, typed model answers and human-approved actions.
翻譯準備中
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證正在載入完整 README。 以下為已儲存的摘錄。
ts_dataset a TypeScript module for working with datasetd
The dataset project provides a JSON API for JSON object storage via the datasetd application. This repository hosts a TypeScript module targeting Deno for integrating datasetd JSON API managed dataset collections.檢視完整 README ↗The dataset project provides a JSON API for JSON object storage via the datasetd application. This repository hosts a TypeScript module targeting Deno for integrating datasetd JSON API managed dataset collections.
The TypeScript ts_dataset module is for working with the JSON API provided by datasetd. There are two exported classes defined -- DatasetApiClient and Dataset. The first is a low level HTTP wrapper mapping basic dataset verbs to the JSON API. The later provides those verbs where the objects are TypeScript based. Most applications using dataset collections hosted via datasetd will use the latter class.
Here's a simple example of exercising some of the method available with the Dataset object. This demo code assumes datasetd running on localhost on port 8485 and a dataset set collection called "my_objects.ds" has been defined the in YAML configuration of datasetd.
import { Dataset } from "https://software.library.caltech.edu/ts_dataset/mod.ts";
const port = 8485;
const c_name = "my_objects.ds";
const ds = new Dataset(port, c_name);
// Get a list of keys
let keys = await ds.keys();
console.log(`there are ${keys.length} object(s) found in ${c_name}`);
// Create a new object
let key = "object_key_three";
let obj = {
"one": 1,
"two": "number 2",
"three": true,
"updated": (new Date).toISOString()
};
await ds.create(key, obj);
keys = await ds.keys()
console.log(`there are now ${keys.length} object(s) found in ${c_name}`);
// Read back an object
let nObj = await ds.read(key);
console.log(`this is the read object ${JSON.stringify(nObj, null, " ")}`);
// Update our object.
obj.updated = (new Date).toLocaleString();
await ds.update(key, obj);
// Read back updated object
nObj = await ds.read(key);
console.log(`this is the now our object ${JSON.stringify(nObj, null, " ")}`);
// Remove our object
await ds.delete(key);
keys = await ds.keys()
console.log(`there are now ${keys.length} object(s) found in ${c_name}`);
ts_dataset is a TypeScript module targeting Deno. Installation can be done via an import statement in your TypeScript module. You can also clone the GitHub repository at https://software.library.caltech.edu/ts_dataset. The from value in your import statement should point to https://software.library.caltech.edu/ts_dataset/mod.ts if you want to use it that way. Similarly you can add it to your project's deps.ts file with a line like.
export * from "https://software.library.caltech.edu/ts_dataset/mod.ts";
ts_dataset is only useful in conjunction with a running dataset web service. This is provided by datasetd available as part of installing dataset. See the GitHub repo https://github.com/caltechlibrary/dataset for more details.
To (re)generate the website content clone this repository, change into it and run "make".
I use tmux to run the demo. It's convenient. I start with one window and get everything setup and startup datasetd using a Deno task. Then I split the window and run the demo. Below is what I type to run the demo (comments indicate where to switch windows, explain actions).
# Start up tmux
tmux
# clone this repository and change directory
git clone https://github.com/caltechlibrary/ts_dataset
cd ts_dataset
# Use deno tasks to setup our test and demo dataset collections
deno task setup_datasets
# Start the datasetd
deno task run_datasetd
# Split the tmux window (e.g. Ctrl-b ") and run the demo
deno task demo
You can file a GitHub issue or reach out to the authors listed in the codemeta.json file. See SUPPORT file in this repository.
Contributions and help are welcome. See CONTRIBUTING.md file in this repository.
Software produced by the Caltech Library is Copyright © 2024 California Institute of Technology. This software is freely distributed under a modified BSD 3-clause license. Please see the LICENSE file for more information.
This work was funded by the California Institute of Technology Library.