Skip to content

Commit

Permalink
fix node names and categories
Browse files Browse the repository at this point in the history
  • Loading branch information
au-re committed Nov 20, 2023
1 parent 2521229 commit a6967cc
Show file tree
Hide file tree
Showing 13 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const documentCheckNodeType = "modifier/document_check" as const;
export const documentCheck: NodeConfig = {
name: "Document Check",
description: "Run a checklist or extract information from a document.",
tags: ["modifier", "document", "text"],
tags: ["adapter", "document", "text"],
status: "stable",
execution: {
inputs: [
Expand Down
6 changes: 6 additions & 0 deletions packages/@pufflig/ps-nodes-config/src/adapters/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,21 @@ import { llmCompletionConfig, llmCompletionNodeType } from "./llm/llm_completion
import { openaiChatConfig } from "./openai/openai_chat";
import { openaiCompletionConfig } from "./openai/openai_completion";
import { openaiEmbeddingConfig, openaiEmbeddingNodeType } from "./openai/openai_embedding";
import { documentCheck, documentCheckNodeType } from "./document_check/document_check";
import { parseDocument, parseDocumentNodeType } from "./parse_document/parse_document";

export const adapterNodes = {
"adapter/openai_chat": openaiChatConfig,
"adapter/openai_completion": openaiCompletionConfig,
[openaiEmbeddingNodeType]: openaiEmbeddingConfig,
[llmCompletionNodeType]: llmCompletionConfig,
[documentCheckNodeType]: documentCheck,
[parseDocumentNodeType]: parseDocument,
};

export const adapterNodeTypes = {
openaiEmbeddingNodeType,
llmCompletionNodeType,
documentCheckNodeType,
parseDocumentNodeType,
};
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const parseDocumentNodeType = "modifier/parse_document" as const;
export const parseDocument: NodeConfig = {
name: "Parse Document",
description: "Run a prompt over a document",
tags: ["modifier", "document", "text"],
tags: ["adapter", "document", "text"],
status: "deprecated",
execution: {
inputs: [
Expand Down
10 changes: 5 additions & 5 deletions packages/@pufflig/ps-nodes-config/src/data/prompt/prompt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ import { NodeConfig } from "@pufflig/ps-types";
export const promptNodeType = "data/prompt" as const;

export const prompt: NodeConfig = {
name: "Prompt",
description: "A prompt with variables.",
name: "Template",
description: "A text template with variables.",
tags: ["data", "text", "prompt"],
status: "stable",
outputs: [
{
id: "prompt",
name: "Prompt",
description: "Prompt with variables filled in",
name: "Template",
description: "Template with variables filled in",
type: "text",
defaultValue: "",
},
Expand All @@ -20,7 +20,7 @@ export const prompt: NodeConfig = {
{
id: "template",
name: "Template",
description: "Prompt Template to fill in",
description: "Template with variables",
type: "text",
defaultValue: "",
},
Expand Down
6 changes: 0 additions & 6 deletions packages/@pufflig/ps-nodes-config/src/modifiers/index.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,21 @@
import { addMessage, addMessageNodeType } from "./add_message/add_message";
import { addText, addTextNodeType } from "./add_text/add_text";
import { documentCheck, documentCheckNodeType } from "./document_check/document_check";
import { parseDocument, parseDocumentNodeType } from "./parse_document/parse_document";
import { splitText, splitTextNodeType } from "./split_text/split_text";
import { templateChat, templateChatNodeType } from "./template/template_chat";
import { templateText, templateTextNodeType } from "./template/template_text";

export const modifierNodes = {
[addMessageNodeType]: addMessage,
[addTextNodeType]: addText,
[parseDocumentNodeType]: parseDocument,
[splitTextNodeType]: splitText,
[templateChatNodeType]: templateChat,
[templateTextNodeType]: templateText,
[documentCheckNodeType]: documentCheck,
};

export const modifierNodeTypes = {
addMessageNodeType,
addTextNodeType,
parseDocumentNodeType,
splitTextNodeType,
templateChatNodeType,
templateTextNodeType,
documentCheckNodeType,
};
4 changes: 4 additions & 0 deletions packages/@pufflig/ps-nodes/src/adapters/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@ import { llmCompletion } from "./llm/llm_completion";
import { openaiChat, openaiChatNodeType } from "./openai/openai_chat";
import { openaiCompletion, openaiCompletionNodeType } from "./openai/openai_completion";
import { openaiEmbedding } from "./openai/openai_embedding";
import { documentCheck } from "./document_check/document_check";
import { parseDocument } from "./parse_document/parse_document";

export const adapterNodes = {
[openaiChatNodeType]: openaiChat,
[openaiCompletionNodeType]: openaiCompletion,
[nodeTypes.openaiEmbeddingNodeType]: openaiEmbedding,
[nodeTypes.llmCompletionNodeType]: llmCompletion,
[nodeTypes.parseDocumentNodeType]: parseDocument,
[nodeTypes.documentCheckNodeType]: documentCheck,
};
4 changes: 0 additions & 4 deletions packages/@pufflig/ps-nodes/src/modifiers/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { nodeTypes } from "@pufflig/ps-nodes-config";
import { addMessage } from "./add_message/add_message";
import { addText } from "./add_text/add_text";
import { documentCheck } from "./document_check/document_check";
import { parseDocument } from "./parse_document/parse_document";
import { splitText } from "./split_text/split_text";
import { templateChat } from "./template/template_chat";
import { templateText } from "./template/template_text";
Expand All @@ -13,6 +11,4 @@ export const modifierNodes = {
[nodeTypes.splitTextNodeType]: splitText,
[nodeTypes.templateChatNodeType]: templateChat,
[nodeTypes.templateTextNodeType]: templateText,
[nodeTypes.parseDocumentNodeType]: parseDocument,
[nodeTypes.documentCheckNodeType]: documentCheck,
};

0 comments on commit a6967cc

Please sign in to comment.