mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-26 07:01:16 +03:00
9281b57ef1
- add types & interfaces - small ui bug fix - update marketplace files
230 lines
9.0 KiB
JSON
230 lines
9.0 KiB
JSON
{
|
|
"description": "Language translation using LLM Chain with a Chat Prompt Template and Chat Model",
|
|
"nodes": [
|
|
{
|
|
"width": 300,
|
|
"height": 460,
|
|
"id": "chatPromptTemplate_0",
|
|
"position": {
|
|
"x": 524,
|
|
"y": 237
|
|
},
|
|
"type": "customNode",
|
|
"data": {
|
|
"id": "chatPromptTemplate_0",
|
|
"label": "Chat Prompt Template",
|
|
"name": "chatPromptTemplate",
|
|
"type": "ChatPromptTemplate",
|
|
"baseClasses": ["ChatPromptTemplate", "BaseChatPromptTemplate", "BasePromptTemplate"],
|
|
"category": "Prompts",
|
|
"description": "Schema to represent a chat prompt",
|
|
"inputParams": [
|
|
{
|
|
"label": "System Message",
|
|
"name": "systemMessagePrompt",
|
|
"type": "string",
|
|
"rows": 3,
|
|
"placeholder": "You are a helpful assistant that translates {input_language} to {output_language}."
|
|
},
|
|
{
|
|
"label": "Human Message",
|
|
"name": "humanMessagePrompt",
|
|
"type": "string",
|
|
"rows": 3,
|
|
"placeholder": "{text}"
|
|
}
|
|
],
|
|
"inputAnchors": [],
|
|
"inputs": {
|
|
"systemMessagePrompt": "You are a helpful assistant that translates {input_language} to {output_language}.",
|
|
"humanMessagePrompt": "{input}"
|
|
},
|
|
"outputAnchors": [
|
|
{
|
|
"id": "chatPromptTemplate_0-output-chatPromptTemplate-ChatPromptTemplate|BaseChatPromptTemplate|BasePromptTemplate",
|
|
"name": "chatPromptTemplate",
|
|
"label": "ChatPromptTemplate",
|
|
"type": "ChatPromptTemplate | BaseChatPromptTemplate | BasePromptTemplate"
|
|
}
|
|
],
|
|
"selected": false
|
|
},
|
|
"selected": false,
|
|
"dragging": false,
|
|
"positionAbsolute": {
|
|
"x": 524,
|
|
"y": 237
|
|
}
|
|
},
|
|
{
|
|
"width": 300,
|
|
"height": 472,
|
|
"id": "chatOpenAI_0",
|
|
"position": {
|
|
"x": 855.1997276913991,
|
|
"y": 24.090553068402556
|
|
},
|
|
"type": "customNode",
|
|
"data": {
|
|
"id": "chatOpenAI_0",
|
|
"label": "ChatOpenAI",
|
|
"name": "chatOpenAI",
|
|
"type": "ChatOpenAI",
|
|
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel"],
|
|
"category": "Chat Models",
|
|
"description": "Wrapper around OpenAI large language models that use the Chat endpoint",
|
|
"inputParams": [
|
|
{
|
|
"label": "OpenAI Api Key",
|
|
"name": "openAIApiKey",
|
|
"type": "password"
|
|
},
|
|
{
|
|
"label": "Model Name",
|
|
"name": "modelName",
|
|
"type": "options",
|
|
"options": [
|
|
{
|
|
"label": "gpt-4",
|
|
"name": "gpt-4"
|
|
},
|
|
{
|
|
"label": "gpt-4-0314",
|
|
"name": "gpt-4-0314"
|
|
},
|
|
{
|
|
"label": "gpt-4-32k-0314",
|
|
"name": "gpt-4-32k-0314"
|
|
},
|
|
{
|
|
"label": "gpt-3.5-turbo",
|
|
"name": "gpt-3.5-turbo"
|
|
},
|
|
{
|
|
"label": "gpt-3.5-turbo-0301",
|
|
"name": "gpt-3.5-turbo-0301"
|
|
}
|
|
],
|
|
"default": "gpt-3.5-turbo",
|
|
"optional": true
|
|
},
|
|
{
|
|
"label": "Temperature",
|
|
"name": "temperature",
|
|
"type": "number",
|
|
"default": 0.9,
|
|
"optional": true
|
|
}
|
|
],
|
|
"inputAnchors": [],
|
|
"inputs": {
|
|
"modelName": "gpt-3.5-turbo",
|
|
"temperature": 0.9
|
|
},
|
|
"outputAnchors": [
|
|
{
|
|
"id": "chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel",
|
|
"name": "chatOpenAI",
|
|
"label": "ChatOpenAI",
|
|
"type": "ChatOpenAI | BaseChatModel | BaseLanguageModel"
|
|
}
|
|
],
|
|
"selected": false
|
|
},
|
|
"selected": false,
|
|
"positionAbsolute": {
|
|
"x": 855.1997276913991,
|
|
"y": 24.090553068402556
|
|
},
|
|
"dragging": false
|
|
},
|
|
{
|
|
"width": 300,
|
|
"height": 461,
|
|
"id": "llmChain_0",
|
|
"position": {
|
|
"x": 1192.2235692202612,
|
|
"y": 361.71736677076257
|
|
},
|
|
"type": "customNode",
|
|
"data": {
|
|
"id": "llmChain_0",
|
|
"label": "LLM Chain",
|
|
"name": "llmChain",
|
|
"type": "LLMChain",
|
|
"baseClasses": ["LLMChain", "BaseChain"],
|
|
"category": "Chains",
|
|
"description": "Chain to run queries against LLMs",
|
|
"inputParams": [
|
|
{
|
|
"label": "Format Prompt Values",
|
|
"name": "promptValues",
|
|
"type": "string",
|
|
"rows": 5,
|
|
"placeholder": "{\n \"input_language\": \"English\",\n \"output_language\": \"French\"\n}",
|
|
"optional": true
|
|
}
|
|
],
|
|
"inputAnchors": [
|
|
{
|
|
"label": "Language Model",
|
|
"name": "model",
|
|
"type": "BaseLanguageModel",
|
|
"id": "llmChain_0-input-model-BaseLanguageModel"
|
|
},
|
|
{
|
|
"label": "Prompt",
|
|
"name": "prompt",
|
|
"type": "BasePromptTemplate",
|
|
"id": "llmChain_0-input-prompt-BasePromptTemplate"
|
|
}
|
|
],
|
|
"inputs": {
|
|
"model": "{{chatOpenAI_0.data.instance}}",
|
|
"prompt": "{{chatPromptTemplate_0.data.instance}}",
|
|
"promptValues": "{\n \"input_language\": \"English\",\n \"output_language\": \"French\"\n}"
|
|
},
|
|
"outputAnchors": [
|
|
{
|
|
"id": "llmChain_0-output-llmChain-LLMChain|BaseChain",
|
|
"name": "llmChain",
|
|
"label": "LLMChain",
|
|
"type": "LLMChain | BaseChain"
|
|
}
|
|
],
|
|
"selected": false
|
|
},
|
|
"selected": false,
|
|
"positionAbsolute": {
|
|
"x": 1192.2235692202612,
|
|
"y": 361.71736677076257
|
|
},
|
|
"dragging": false
|
|
}
|
|
],
|
|
"edges": [
|
|
{
|
|
"source": "chatOpenAI_0",
|
|
"sourceHandle": "chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel",
|
|
"target": "llmChain_0",
|
|
"targetHandle": "llmChain_0-input-model-BaseLanguageModel",
|
|
"type": "buttonedge",
|
|
"id": "chatOpenAI_0-chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel-llmChain_0-llmChain_0-input-model-BaseLanguageModel",
|
|
"data": {
|
|
"label": ""
|
|
}
|
|
},
|
|
{
|
|
"source": "chatPromptTemplate_0",
|
|
"sourceHandle": "chatPromptTemplate_0-output-chatPromptTemplate-ChatPromptTemplate|BaseChatPromptTemplate|BasePromptTemplate",
|
|
"target": "llmChain_0",
|
|
"targetHandle": "llmChain_0-input-prompt-BasePromptTemplate",
|
|
"type": "buttonedge",
|
|
"id": "chatPromptTemplate_0-chatPromptTemplate_0-output-chatPromptTemplate-ChatPromptTemplate|BaseChatPromptTemplate|BasePromptTemplate-llmChain_0-llmChain_0-input-prompt-BasePromptTemplate",
|
|
"data": {
|
|
"label": ""
|
|
}
|
|
}
|
|
]
|
|
}
|