- Large model nodes can customize model name, temperature, API_KEY, base_url, currently only supports openai type API interface calls.
- You can directly input system prompts and user prompts on the node, or right-click to convert these two widgets into node inputs, accepting string type inputs.
- Large model nodes can also accept outputs from tool nodes through the tools interface and accept string inputs from the file_content interface, which will be used as the model's knowledge base, searching for related content to input into the model based on word vector similarity.
- The is_memory of the large model node can determine whether the large model has memory. You can change is_memory to disable, then run, at which time the model will clear the previous conversation records, then switch back to enable, and the model will retain your conversation records in subsequent runs.
- You can view the model's reply in this round of conversation through assistant_response, or view the history of multiple rounds of conversation through history.
- Even if the external parameters do not change, the large model node will always run, because the large model always has different answers to the same question.
- is_tools_in_sys_prompt determines whether the information of tools will be input into the system prompts.
- is_locked can lock the results of the previous round of conversation, allowing the large model to directly return the answer from the previous round of conversation.
- main_brain determines whether the large model is the model that interfaces with the user. If disabled, the LLM node can serve as a tool for another LLM node.
- LLM is compatible with GPT-4’s visual features. The imgbb_api_key can be entered with imgbb’s API key. After filling it in, your image will be input into GPT in URL format. If not filled, it will be input in the form of image encoding.
- Currently supports GLM/Llama/Qwen, but only GLM's tool calling is perfectly adapted, the other two require a large parameter version to call tools normally.
- Input the model's project folder into model_path and tokenizer_path, compatible with all models that can be compatible with transformer.
- Other parameters are consistent with the LLM_API node.
- The file_content node can input a string, which will be used as the input to the word embedding model. The model will search on this string and return the most relevant text content based on the question.
- chuck_size is the size of each text block when the text is split, the default is 200, chuck_overlap is the overlap size between each text block when the text is split, the default is 50.
- Input embedding_path, and the embedding model in this folder will be called.
- The path to read the file is in comfyui_LLM_party/file, you can put the file you want to read in this path, and then fill in the file name in this node.
- You can choose absolute path input, in which case path can accept an absolute path.
- The output is a string that contains all the text information in the file.
- The adapted file formats are: ".docx", ".txt", ".pdf", ".xlsx", ".csv", ".py", ".js", ".java", ".c", ".cpp", ".html", ".css", ".sql", ".r", ".swift"
- folder_path can accept an absolute path of a folder, and this node will automatically read all the files in the folder.
- The output is a string that contains all the text information in the folder.
- The adapted file formats are: ".docx", ".txt", ".pdf", ".xlsx", ".csv", ".py", ".js", ".java", ".c", ".cpp", ".html", ".css", ".sql", ".r", ".swift"
- Can convert all web page content in a url into an md format output.
- The output is a string that contains all the text information on the web page.
- Can return all content related to the question in Wikipedia.
- You can use this persona node as the system_prompt_input of the LLM node, allowing the large model to have the personality of the persona.
- LLM will classify user_prompt according to the categories described on the classifier persona node.
- Can be used in conjunction with classifier functions to output different categories of text to different workflows.
- prompt is the system_prompt_input that will be input into the LLM node, which can contain some variables, such as: "You are an intelligent customer service about {app}, you need to generate content related to {text}", where {text} will automatically be filled with the user_prompt received by LLM.
- prompt_template contains the corresponding rules for the variables in the prompt, generally in json format, which can be filled in as follows: {"app":"chatgpt"}, at this time, {app} in the prompt will be automatically replaced with chatgpt.
- Can return a preset persona persona, which can be used as the system_prompt_input of the large model, allowing the large model to have the personality of the persona.
- The persona folder contains the persona of the image prompt assistant and DAN. You can add more personas to this folder for your use.
- Can split the string processed by the LLM with a classifier persona into multiple strings, which can be used in conjunction with string logic to control the execution of the corresponding workflow.
- option contains the following options: "A contain B", "A not contain B", "A relate to B", "A not relate to B", "A equal B", "A not equal B", "A is null", "A is not null" for selection.
- When the condition is true, if will output A string, else will output an empty string, is_true will output true, is_false will output false, otherwise else will output A string, if will output an empty string, is_true will output false, is_false will output true.
- Can directly display the input string on the comfyui interface.
- Input a string, which will be used as the user_prompt of the large model, allowing the large model to have the personality of the persona.
- Used to combine multiple strings into one string.
- These combination nodes can be nested.
- Used to combine multiple tool nodes into one tool node, then input to the large model.
- These combination nodes can be nested.
- Used for querying time and weather. The time tool node can change the default time zone for queries, and the weather tool node will also add an option to change the default region in the future (this free weather tool is limited to searching for weather in China).
- The AccuWeather tool node requires an AccuWeather API key to query global weather.
- You can use this node by entering your Google API key and CSE ID.
- This node will return the top 10 URLs and summaries from Google search. You can ask the model to paginate to see later search results.
- You can enter the URL you want to search into this node as the default URL for the model's search. This node will convert all content of this webpage into Markdown format and return it to the model.
- Since requests are not omnipotent, some URLs may not allow crawling, and this project does not provide malicious crawler code.
- You can input an embedding_path, which will call the word embedding model in this folder. The tool will split the webpage content according to chuck_size and chuck_overlap, returning only the text information related to the user's question.
- If there is no embedding_path, it will return all content of the webpage.
- The specific function is the same as the word embedding model node, but this node is a tool for LLM, which can be called when the model thinks it needs to query the knowledge base, using the file_content input into this tool.
- Allows the large model to generate Python code, run it automatically, and obtain the results of the code execution.
- Currently, only supports Python code.
- Allows the large model to do anything. The large model will download the required third-party libraries in a virtual environment and then execute the generated code.
- Please use this tool carefully, as the large model will gain the ability to control your computer to do anything!
- Fill in the URL that needs to be accessed.
- The first text input box is for entering the function of this API tool, for example: a tool for checking the weather.
- The second text input box is for entering the parameters of this API tool, for example: the parameters for the weather-checking tool are: {"city":"beijing"}
- Allows the large model to query content related to Wikipedia.
- You can input an embedding_path, which will call the word embedding model in this folder. The tool will split the Wikipedia content according to chuck_size and chuck_overlap, returning only the text information related to the user's question.
- If there is no embedding_path, it will return the first 1000 characters related to Wikipedia.
- Allows the large model to query relevant research papers on arXiv.
- The default search is for the research direction in the query.
- You can use these two nodes to define the start and end points of the workflow, placing your workflow in the workflow subfolder of this project folder.
- Click setup_streamlit_app.bat in the project folder, and in the Streamlit interface, click settings and replace it with your workflow.
- This way, you quickly build an AI application with Streamlit as the frontend.
- Both of these nodes have a dialog_id, connecting the dialog_id to make them a dialogue archive point. When you need to loop-connect two large models, although it cannot be achieved in comfyui, you can save the output of the latter model locally, and then pass it to the previous model the next time it runs. You can call comfyui with the comfyui API in other frontends, and as long as you keep calling, you can see the infinite self-dialogue of the two models.
- The start dialogue node has an interface for starting a dialogue, which can serve as a prompt given by the user at the start of a dialogue, guiding the large model to discuss within the topic given by the user.
- Allows your workflow to call other workflows!
- Add start workflow and end workflow nodes to the beginning and end of the workflow you want to embed, and save this workflow as an API in the workflow_api folder of the comfyui_LLM_party project.
- Open another workflow, use the workflow switch node in this workflow, select the workflow you want to embed, and it's done.
- The first time you use the workflow switch node, another 8189 port will be opened, please do not close this new console.
- These nodes have been modified by me so that they will not error out when input is missing, but will be bypassed instead. I think this feature is very important, but I don't know why comfyui doesn't write this feature. This feature can control which part of the workflow is executed by controlling whether there is input to the workflow.