THub Technical Documentation
  • Introduction
  • 🔗 LangChain
    • 🕵️ Agents
    • 🗄️Cache
    • ⛓️Chains
    • 🗨️Chat Models
    • 📁Document Loaders
    • 🧬Embeddings
    • 🧠Large Language Models(LLM)
    • 💾Memory
    • 🛡️Moderation
    • 👥Multi Agents
    • 🔀Output Parsers
    • 📝Prompts
    • 📊Record Managers
    • 📑Retrieval-Augmented Generation
    • 🔍Retrivers
    • ✂️Text Splitters
    • 🛠️Tools
    • 🔌Utilities
    • 🗃️Vector Stores
  • 🦙LLama Index
    • 🕵️ Agents
    • 🗨️Chat Models
    • 🧬Embeddings
    • 🚀Engine's
    • 🧪Response Synthesizer
    • 🛠️Tools
    • 🗃️Vector Stores
Powered by GitBook
On this page
  1. 🔗 LangChain

🔌Utilities

AI utilities are helper functions, data processing tools, and modular components that support core AI operations and streamline development workflows.

Previous🛠️ToolsNext🗃️Vector Stores

Last updated 10 months ago

1)Custom JS Function

Execute custom javascript function.

2)Set Variable

Taking inputs from any node that outputs string, number, boolean, json, array, we can assign a variable name to it.

3)Get Variable

You can get the variable value from the variable name at a later stage:

4)If Else

THub allows you to split your chatflow into different branches depending on If/Else condition.

Input Variables

As noticed from the image above, it takes in any nodes that has json output. Some examples are: Custom Function, LLM Chain Output Prediction, Get/Set Variables.

You can then give a variable name:

Copy

$output

If Else Name

You can name the node for easier visualization of what it does.

If Function

This is a piece of JS code that is ran on Node sandbox. It must:

· Contains the if statement

· Returns a value within if statement

This gives much more flexibility for users to do complex comparison like regex, date comparsion and many more.

Else Function

Output

User can also take a look at the If Else template in the marketplace:

5)Sticky Note

Add a sticky note to the flow.

This variable can then be used in the and with the prefix $. For example:

Similar to If Function, it must returns a value. This function will only be ran if the does not return a value.

When the successfully returns a value, it will be passed to the True output dot as shown above. This allow users to pass the value to the next node.

Otherwise, the returned value from will be passed to the False output dot.

If Function
Else Function
If Function
If Function
Else Function