LLM Process Node
This node is a custom node in LiteGraph designed for interacting with language models, particularly those from OpenAI (like GPT-3.5 and GPT-4). It\‘s useful for performing various natural language processing tasks like summarization, entity extraction, sentiment analysis, language detection, and text annotation.
Inputs and Outputs
Input: The node accepts an input of type \‘string\‘. It\‘s the text that will be processed by the language model.
Output: The node outputs the result of the language model\‘s processing.
Properties
Model: Choose from various language model options like \‘gpt-3.5-turbo\’, \‘gpt-3.5-turbo-16k\’, \‘gpt-3.5-turbo-1106\’, \‘gpt-4\’, \‘gpt-4-1106-preview\’, \‘gpt-4-32k\‘.
Temperature: Set the temperature for the language model\‘s response.
Max Tokens: Maximum length of the model\‘s response.
Top P: Top probability for token selection.
Frequency Penalty: Adjusts frequency of token usage.
Presence Penalty: Adjusts presence of token usage.
Secret: API key for accessing the language model service.
Functionalities
Summarize: Summarize the given text.
Extract Entities: Identify and extract entities from the text.
Sentiment: Analyze the sentiment of the text.
Detect Language: Identify the language of the text.
Annotate: Annotate the text with relevant information.
Widgets
Model Selector: Choose the language model to use.
Function Selector: Select the specific functionality to perform with the language model.
Secret Selector: Select the secret (API key) to access the language model.
Usage
1. Connect a string input to the node.
2. Select the desired model and function from the dropdown menus.
3. Provide the necessary API key in the \‘Secret\’ field.
4. The node will process the input text and output the result based on the selected model and function.