Skip to content

Commit d45499d

Browse files
committed
prepublish updates
1 parent a4372fd commit d45499d

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@ The key differences between this wrapper and the python library are as follows:
1616
1. No support for re-asking (though you can perform reasks yourself outside of the library using `ValidationOutcome.reask` or `guard.history.at(#).reask_prompts` when defined)
1717
1. LLM calls must be made by the user and the text response passed into parse
1818

19-
In addition to above, this library also supports the readonly properties on the [ValidationOutcome class](https://www.guardrailsai.com/docs/api_reference_markdown/validation_outcome) as well as readonly versions of the History & Logs related classes like [Call](https://www.guardrailsai.com/docs/api_reference_markdown/history_and_logs#call-objects), [Iteration](https://www.guardrailsai.com/docs/api_reference_markdown/history_and_logs#iteration-objects), etc..
19+
In addition to above, this library also supports the readonly properties on the [ValidationOutcome class](https://www.guardrailsai.com/docs/hub/api_reference_markdown/validation_outcome) as well as readonly versions of the History & Logs related classes like [Call](https://www.guardrailsai.com/docs/api_reference_markdown/history_and_logs#call-objects), [Iteration](https://www.guardrailsai.com/docs/api_reference_markdown/history_and_logs#iteration-objects), etc..
2020

2121
See the JS docs [here](/docs/modules.md)
2222

2323
## Installation
2424
```sh
25-
npm i git+https://github.com/guardrails-ai/guardrails-js.git
25+
npm i @guardrails-ai/core
2626
```
2727

2828
## Example
2929
```js
30-
import { Guard, Validators } from 'guardrails-ai';
30+
import { Guard, Validators } from '@guardrails-ai/core';
3131

3232
const guard = await Guard.fromRail('./my-railspec.rail');
3333

@@ -59,7 +59,7 @@ Below is a simple end-to-end test we use that demonstrates the concepts above:
5959
```js
6060
import assert from 'node:assert';
6161
import process from 'node:process';
62-
import { Guard, Validators, exit } from './dist/index.js';
62+
import { Guard, Validators, exit } from '@guardrails-ai/core';
6363

6464
process.on('exit', (code) => {
6565
console.log(`About to exit with code: ${code}`);

debug.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ async function main() {
1313
<rail version="0.1">
1414
1515
<output>
16-
<list name="user_orders" description="Generate a list of user, and how many orders they have placed in the past." format="length: 1 10" on-fail-length="fix">
16+
<list name="user_orders" description="Generate a list of user, and how many orders they have placed in the past." format="hub://guardrails/valid_length: 1 10" on-fail-length="fix">
1717
<object>
1818
<string name="user_id" description="The user's id." />
1919
<string name="user_name" description="The user's first name and last name" format="two-words" on-fail-two-words="reask" />
2020
<integer name="num_orders" description="The number of orders the user has placed" format="valid-range: 0 50" on-fail-valid-range="fix" />
2121
<date name="last_order_date" description="Date of last order" />
2222
<string name="portal_url" description="The url for the portal where the user submitted their order." format="valid-url" on-fail-valid-url="reask" />
23-
<string name="user_middle_name" description="The users middle name." format="length: 1" on-fail-length="filter" />
23+
<string name="user_middle_name" description="The users middle name." format="hub://guardrails/valid_length: 1" on-fail-length="filter" />
2424
<string name="account_is_private" description="The users middle name." format="valid-choices: {['false']}" on-fail-valid-choices="refrain" />
2525
</object>
2626
</list>

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "guardrails-ai",
3-
"version": "0.0.0",
2+
"name": "@guardrails-ai/core",
3+
"version": "0.1.0",
44
"description": "A Javascript wrapper for guardrails-ai",
55
"main": "dist/index.js",
66
"types": "./dist/index.d.ts",

0 commit comments

Comments
 (0)