From eda347633bc9006dbf3643b4889c0b3c719b127c Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Wed, 6 Mar 2024 19:17:33 -0300 Subject: [PATCH] Add new components for inputs and outputs --- docs/docs/components/data.mdx | 0 docs/docs/components/experimental.mdx | 0 docs/docs/components/helpers.mdx | 0 docs/docs/components/{io.mdx => inputs.mdx} | 38 +------------------ .../components/{llms.mdx => model_specs.mdx} | 0 docs/docs/components/models.mdx | 0 docs/docs/components/outputs.mdx | 37 ++++++++++++++++++ docs/sidebars.js | 9 ++++- 8 files changed, 47 insertions(+), 37 deletions(-) create mode 100644 docs/docs/components/data.mdx create mode 100644 docs/docs/components/experimental.mdx create mode 100644 docs/docs/components/helpers.mdx rename docs/docs/components/{io.mdx => inputs.mdx} (51%) rename docs/docs/components/{llms.mdx => model_specs.mdx} (100%) create mode 100644 docs/docs/components/models.mdx create mode 100644 docs/docs/components/outputs.mdx diff --git a/docs/docs/components/data.mdx b/docs/docs/components/data.mdx new file mode 100644 index 000000000..e69de29bb diff --git a/docs/docs/components/experimental.mdx b/docs/docs/components/experimental.mdx new file mode 100644 index 000000000..e69de29bb diff --git a/docs/docs/components/helpers.mdx b/docs/docs/components/helpers.mdx new file mode 100644 index 000000000..e69de29bb diff --git a/docs/docs/components/io.mdx b/docs/docs/components/inputs.mdx similarity index 51% rename from docs/docs/components/io.mdx rename to docs/docs/components/inputs.mdx index 0ef93d684..e4a4a8b0f 100644 --- a/docs/docs/components/io.mdx +++ b/docs/docs/components/inputs.mdx @@ -1,6 +1,6 @@ -import Admonition from "@theme/Admonition"; +import Admonition from '@theme/Admonition'; -# I/O +# Inputs ### ChatInput @@ -22,27 +22,6 @@ This component is designed to get user input from the chat.

-### ChatOutput - -This component is designed to send a message to the chat. - -**Params** - -- **Sender Type:** specifies the sender type. Defaults to _`"Machine"`_. Options are _`"Machine"`_ and _`"User"`_. - -- **Sender Name:** specifies the name of the sender. Defaults to _`"AI"`_. - -- **Session ID:** specifies the session ID of the chat history. If provided, the message will be saved in the Message History. - -- **Message:** specifies the message text. - - -

- If _`As Record`_ is _`true`_ and the _`Message`_ is a _`Record`_, the data of the _`Record`_ will be updated with the _`Sender`_, _`Sender Name`_, and _`Session ID`_. -

-
- - ### TextInput This component is designed for simple text input, allowing users to pass textual data to subsequent components in the workflow. It's particularly useful for scenarios where a brief user input is required to initiate or influence the flow. @@ -58,16 +37,3 @@ This component is designed for simple text input, allowing users to pass textual

-### TextOutput - -This component is designed to display text data to the user. It's particularly useful for scenarios where you don't want to send the text data to the chat, but still want to display it. - -**Params** - -- **Value:** Specifies the text data to be displayed. This is where the text data to be displayed is provided. If no value is provided, it defaults to an empty string. - - -

- The `TextOutput` component serves as a straightforward means for displaying text data. It ensures that textual data can be seamlessly observed in the chat window throughout your flow. -

-
\ No newline at end of file diff --git a/docs/docs/components/llms.mdx b/docs/docs/components/model_specs.mdx similarity index 100% rename from docs/docs/components/llms.mdx rename to docs/docs/components/model_specs.mdx diff --git a/docs/docs/components/models.mdx b/docs/docs/components/models.mdx new file mode 100644 index 000000000..e69de29bb diff --git a/docs/docs/components/outputs.mdx b/docs/docs/components/outputs.mdx new file mode 100644 index 000000000..3533dfdb6 --- /dev/null +++ b/docs/docs/components/outputs.mdx @@ -0,0 +1,37 @@ +import Admonition from '@theme/Admonition'; + +# Outputs + +### ChatOutput + +This component is designed to send a message to the chat. + +**Params** + +- **Sender Type:** specifies the sender type. Defaults to _`"Machine"`_. Options are _`"Machine"`_ and _`"User"`_. + +- **Sender Name:** specifies the name of the sender. Defaults to _`"AI"`_. + +- **Session ID:** specifies the session ID of the chat history. If provided, the message will be saved in the Message History. + +- **Message:** specifies the message text. + + +

+ If _`As Record`_ is _`true`_ and the _`Message`_ is a _`Record`_, the data of the _`Record`_ will be updated with the _`Sender`_, _`Sender Name`_, and _`Session ID`_. +

+
+ +### TextOutput + +This component is designed to display text data to the user. It's particularly useful for scenarios where you don't want to send the text data to the chat, but still want to display it. + +**Params** + +- **Value:** Specifies the text data to be displayed. This is where the text data to be displayed is provided. If no value is provided, it defaults to an empty string. + + +

+ The `TextOutput` component serves as a straightforward means for displaying text data. It ensures that textual data can be seamlessly observed in the chat window throughout your flow. +

+
\ No newline at end of file diff --git a/docs/sidebars.js b/docs/sidebars.js index 18cf18040..b533ffbb3 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -33,12 +33,19 @@ module.exports = { label: "Component Reference", collapsed: false, items: [ + "components/inputs", + "components/outputs", + "components/data", + "components/prompts", + "components/models", + "components/helpers", + "components/experimental", "components/agents", "components/chains", "components/custom", "components/embeddings", "components/io", - "components/llms", + "components/model_specs", "components/loaders", "components/memories", "components/prompts",