Skip to content

Commit

Permalink
Merge pull request #100 from pufflyai/99-update-the-checklist-node
Browse files Browse the repository at this point in the history
99 update the checklist node
  • Loading branch information
au-re authored Nov 23, 2023
2 parents 1f0c48b + 0d2071a commit 140f0a0
Show file tree
Hide file tree
Showing 13 changed files with 318 additions and 92 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"version": "0.23.2"
"version": "0.24.6"
}
30 changes: 15 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/@pufflig/ps-chains/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pufflig/ps-chains",
"version": "0.23.1",
"version": "0.24.6",
"license": "MIT",
"main": "./dist/ps-chains.umd.js",
"module": "./dist/ps-chains.es.js",
Expand All @@ -16,7 +16,7 @@
"test": "jest"
},
"devDependencies": {
"@pufflig/ps-types": "^0.23.1",
"@pufflig/ps-types": "^0.24.6",
"@types/react-dom": "^18.2.7",
"immer": "^10.0.2",
"prop-types": "^15.8.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/@pufflig/ps-models/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@pufflig/ps-models",
"private": false,
"version": "0.23.2",
"version": "0.24.6",
"description": "Configuration of models used in Prompt Studio",
"files": [
"dist"
Expand All @@ -16,7 +16,7 @@
"author": "Pufflig AB",
"license": "MIT",
"devDependencies": {
"@pufflig/ps-types": "^0.23.1",
"@pufflig/ps-types": "^0.24.6",
"typescript": "^5.2.2",
"vite": "^4.3.9",
"vite-plugin-dts": "^2.3.0"
Expand Down
6 changes: 3 additions & 3 deletions packages/@pufflig/ps-nodes-config/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@pufflig/ps-nodes-config",
"private": false,
"version": "0.23.2",
"version": "0.24.6",
"description": "Configuration files for nodes used in prompt studio.",
"files": [
"dist"
Expand All @@ -16,10 +16,10 @@
"author": "Pufflig AB",
"license": "MIT",
"dependencies": {
"@pufflig/ps-models": "^0.23.2"
"@pufflig/ps-models": "^0.24.6"
},
"devDependencies": {
"@pufflig/ps-types": "^0.23.1",
"@pufflig/ps-types": "^0.24.6",
"@types/jest": "^29.5.8",
"jest": "^29.7.0",
"ts-jest": "^29.1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { NodeConfig } from "@pufflig/ps-types";
export const documentCheckNodeType = "modifier/document_check" as const;

export const documentCheck: NodeConfig = {
name: "Document Checklist",
name: "Checklist",
description: "Run a checklist on a document.",
tags: ["adapter", "document", "text"],
status: "stable",
Expand All @@ -23,9 +23,9 @@ export const documentCheck: NodeConfig = {
},
outputs: [
{
id: "result",
name: "Result",
description: "A list, checklist or other information about the document",
id: "checklist",
name: "Checklist",
description: "A checklist of items to run on the document",
type: "text",
defaultValue: "",
},
Expand All @@ -43,25 +43,44 @@ export const documentCheck: NodeConfig = {
},
},
{
id: "prompt",
name: "Prompt",
description: "Prompt to check the document with",
id: "instructions",
name: "Instructions",
description: "Instructions for the AI",
type: "text",
defaultValue: `Extract information in the document below and insert them in the csv table, don't overwrite existing values and keep things empty if you cannot find information in the document:\n\nTABLE EXAMPLE:\ncharacters, age\nmickey mouse, 10\ndonald duck, -\n\nTABLE:\n{{table}}\n\nDOCUMENT:\n{{document}}\n\nTABLE:\n`,
},
{
id: "table",
name: "Table",
description: "The list, table or checklist to parse the document with.",
type: "text",
defaultValue: "",
defaultValue: ``,
},
{
id: "document",
name: "Document",
description: "Document to be processed",
description: "Document to be checked",
type: "text",
defaultValue: "",
},
{
id: "checks",
name: "Checks",
description: "The checklist to run on the document",
type: "object",
editableSchema: true,
defaultValue: [],
},
{
id: "fields",
name: "Fields",
description: "Custom fields to include in the output for each checklist item",
type: "list",
defaultValue: ["ok (yes/no)"],
},
{
id: "format",
name: "Format",
description: "The format in which to return the cheklist results",
type: "selection",
defaultValue: "markdown",
options: [
{ id: "csv", name: "CSV" },
{ id: "markdown", name: "Markdown" },
],
},
],
};
10 changes: 5 additions & 5 deletions packages/@pufflig/ps-nodes/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@pufflig/ps-nodes",
"private": false,
"version": "0.23.2",
"version": "0.24.6",
"description": "Collection of nodes used in Prompt Studio",
"files": [
"dist"
Expand All @@ -17,7 +17,7 @@
"author": "Pufflig AB",
"license": "MIT",
"devDependencies": {
"@pufflig/ps-types": "^0.23.1",
"@pufflig/ps-types": "^0.24.6",
"@types/jest": "^29.5.8",
"@types/lodash": "^4.14.196",
"@types/mustache": "^4.2.2",
Expand All @@ -33,9 +33,9 @@
},
"dependencies": {
"@dqbd/tiktoken": "^1.0.7",
"@pufflig/ps-models": "^0.23.2",
"@pufflig/ps-nodes-config": "^0.23.2",
"@pufflig/ps-sdk": "^0.23.2",
"@pufflig/ps-models": "^0.24.6",
"@pufflig/ps-nodes-config": "^0.24.6",
"@pufflig/ps-sdk": "^0.24.6",
"axios": "^1.6.2",
"langchain": "^0.0.193",
"lodash": "^4.17.21",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exports[`documentCheck should extract variables correctly 1`] = `
[
{
"defaultValue": {
"modelId": "test_model",
"modelId": "gpt-3.5-turbo-instruct",
"parameters": {},
},
"definition": {
Expand Down Expand Up @@ -213,32 +213,52 @@ exports[`documentCheck should extract variables correctly 1`] = `
"type": "model",
},
{
"defaultValue": "Hello, {{myVariable}}!",
"description": "Prompt to check the document with",
"id": "prompt",
"name": "Prompt",
"defaultValue": "",
"description": "Instructions for the AI",
"id": "instructions",
"name": "Instructions",
"type": "text",
},
{
"defaultValue": "test_table",
"description": "The list, table or checklist to parse the document with.",
"id": "table",
"name": "Table",
"type": "text",
},
{
"defaultValue": "This is a test document.",
"description": "Document to be processed",
"defaultValue": "",
"description": "Document to be checked",
"id": "document",
"name": "Document",
"type": "text",
},
{
"defaultValue": "myValue",
"description": "",
"id": "myVariable",
"name": "myVariable",
"type": "text",
"defaultValue": [],
"description": "The checklist to run on the document",
"editableSchema": true,
"id": "checks",
"name": "Checks",
"type": "object",
},
{
"defaultValue": [
"ok (yes/no)",
],
"description": "Custom fields to include in the output for each checklist item",
"id": "fields",
"name": "Fields",
"type": "list",
},
{
"defaultValue": "markdown",
"description": "The format in which to return the cheklist results",
"id": "format",
"name": "Format",
"options": [
{
"id": "csv",
"name": "CSV",
},
{
"id": "markdown",
"name": "Markdown",
},
],
"type": "selection",
},
]
`;
Loading

0 comments on commit 140f0a0

Please sign in to comment.