Update projects

This commit is contained in:
ogabrielluiz 2024-06-13 12:05:45 -03:00
commit 6dbc2c76e4
7 changed files with 557 additions and 159 deletions

Binary file not shown.

View file

View file

@ -434,7 +434,7 @@
"show": true, "show": true,
"title_case": false, "title_case": false,
"type": "code", "type": "code",
"value": "from typing import Optional\n\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.schema.message import Message\nfrom langflow.field_typing import Text\nfrom typing import Union\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"ChatInput\"\n\n def build_config(self):\n build_config = super().build_config()\n build_config[\"input_value\"] = {\n \"input_types\": [],\n \"display_name\": \"Text\",\n \"multiline\": True,\n }\n\n return build_config\n\n def build(\n self,\n sender: Optional[str] = \"User\",\n sender_name: Optional[str] = \"User\",\n input_value: Optional[str] = None,\n files: Optional[list[str]] = None,\n session_id: Optional[str] = None,\n return_message: Optional[bool] = False,\n ) -> Union[Message, Text]:\n return super().build_with_record(\n sender=sender,\n sender_name=sender_name,\n input_value=input_value,\n files=files,\n session_id=session_id,\n return_message=return_message,\n )\n" "value": "from typing import Optional\n\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.schema.message import Message\nfrom langflow.field_typing import Text\nfrom typing import Union\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"ChatInput\"\n\n def build_config(self):\n build_config = super().build_config()\n build_config[\"input_value\"] = {\n \"input_types\": [],\n \"display_name\": \"Text\",\n \"multiline\": True,\n }\n build_config[\"return_message\"] = {\n \"display_name\": \"Return Record\",\n \"advanced\": True,\n }\n\n return build_config\n\n def build(\n self,\n sender: Optional[str] = \"User\",\n sender_name: Optional[str] = \"User\",\n input_value: Optional[str] = None,\n files: Optional[list[str]] = None,\n session_id: Optional[str] = None,\n return_message: Optional[bool] = True,\n ) -> Union[Message, Text]:\n return super().build_with_record(\n sender=sender,\n sender_name=sender_name,\n input_value=input_value,\n files=files,\n session_id=session_id,\n return_message=return_message,\n )\n"
}, },
"input_value": { "input_value": {
"advanced": false, "advanced": false,

View file

@ -5,14 +5,23 @@
"className": "stroke-gray-900 stroke-connection", "className": "stroke-gray-900 stroke-connection",
"data": { "data": {
"sourceHandle": { "sourceHandle": {
"baseClasses": ["str", "Text", "object"], "baseClasses": [
"str",
"Text",
"object"
],
"dataType": "MemoryComponent", "dataType": "MemoryComponent",
"id": "MemoryComponent-iDkC0" "id": "MemoryComponent-iDkC0"
}, },
"targetHandle": { "targetHandle": {
"fieldName": "context", "fieldName": "context",
"id": "Prompt-19lCm", "id": "Prompt-19lCm",
"inputTypes": ["Document", "BaseOutputParser", "Record", "Text"], "inputTypes": [
"Document",
"BaseOutputParser",
"Record",
"Text"
],
"type": "str" "type": "str"
} }
}, },
@ -30,14 +39,24 @@
"className": "", "className": "",
"data": { "data": {
"sourceHandle": { "sourceHandle": {
"baseClasses": ["Text", "object", "Record", "str"], "baseClasses": [
"Text",
"object",
"Record",
"str"
],
"dataType": "ChatInput", "dataType": "ChatInput",
"id": "ChatInput-Z6G1Z" "id": "ChatInput-Z6G1Z"
}, },
"targetHandle": { "targetHandle": {
"fieldName": "user_message", "fieldName": "user_message",
"id": "Prompt-19lCm", "id": "Prompt-19lCm",
"inputTypes": ["Document", "BaseOutputParser", "Record", "Text"], "inputTypes": [
"Document",
"BaseOutputParser",
"Record",
"Text"
],
"type": "str" "type": "str"
} }
}, },
@ -55,14 +74,22 @@
"className": "", "className": "",
"data": { "data": {
"sourceHandle": { "sourceHandle": {
"baseClasses": ["Text", "str", "object"], "baseClasses": [
"Text",
"str",
"object"
],
"dataType": "Prompt", "dataType": "Prompt",
"id": "Prompt-19lCm" "id": "Prompt-19lCm"
}, },
"targetHandle": { "targetHandle": {
"fieldName": "input_value", "fieldName": "input_value",
"id": "OpenAIModel-1v5Hz", "id": "OpenAIModel-1v5Hz",
"inputTypes": ["Text", "Record", "Prompt"], "inputTypes": [
"Text",
"Record",
"Prompt"
],
"type": "str" "type": "str"
} }
}, },
@ -79,14 +106,20 @@
"className": "", "className": "",
"data": { "data": {
"sourceHandle": { "sourceHandle": {
"baseClasses": ["str", "object", "Text"], "baseClasses": [
"str",
"object",
"Text"
],
"dataType": "OpenAIModel", "dataType": "OpenAIModel",
"id": "OpenAIModel-1v5Hz" "id": "OpenAIModel-1v5Hz"
}, },
"targetHandle": { "targetHandle": {
"fieldName": "input_value", "fieldName": "input_value",
"id": "ChatOutput-i56kN", "id": "ChatOutput-i56kN",
"inputTypes": ["Text"], "inputTypes": [
"Text"
],
"type": "str" "type": "str"
} }
}, },
@ -103,14 +136,21 @@
"className": "", "className": "",
"data": { "data": {
"sourceHandle": { "sourceHandle": {
"baseClasses": ["str", "Text", "object"], "baseClasses": [
"str",
"Text",
"object"
],
"dataType": "MemoryComponent", "dataType": "MemoryComponent",
"id": "MemoryComponent-iDkC0" "id": "MemoryComponent-iDkC0"
}, },
"targetHandle": { "targetHandle": {
"fieldName": "input_value", "fieldName": "input_value",
"id": "TextOutput-KuLNK", "id": "TextOutput-KuLNK",
"inputTypes": ["Record", "Text"], "inputTypes": [
"Record",
"Text"
],
"type": "str" "type": "str"
} }
}, },
@ -129,7 +169,12 @@
"data": { "data": {
"id": "ChatInput-Z6G1Z", "id": "ChatInput-Z6G1Z",
"node": { "node": {
"base_classes": ["Text", "object", "Record", "str"], "base_classes": [
"Text",
"object",
"Record",
"str"
],
"beta": false, "beta": false,
"custom_fields": { "custom_fields": {
"input_value": null, "input_value": null,
@ -145,7 +190,10 @@
"field_order": [], "field_order": [],
"frozen": false, "frozen": false,
"icon": "ChatInput", "icon": "ChatInput",
"output_types": ["Message", "Text"], "output_types": [
"Message",
"Text"
],
"template": { "template": {
"_type": "CustomComponent", "_type": "CustomComponent",
"code": { "code": {
@ -164,7 +212,7 @@
"show": true, "show": true,
"title_case": false, "title_case": false,
"type": "code", "type": "code",
"value": "from typing import Optional\n\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.schema.message import Message\nfrom langflow.field_typing import Text\nfrom typing import Union\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"ChatInput\"\n\n def build_config(self):\n build_config = super().build_config()\n build_config[\"input_value\"] = {\n \"input_types\": [],\n \"display_name\": \"Text\",\n \"multiline\": True,\n }\n\n return build_config\n\n def build(\n self,\n sender: Optional[str] = \"User\",\n sender_name: Optional[str] = \"User\",\n input_value: Optional[str] = None,\n files: Optional[list[str]] = None,\n session_id: Optional[str] = None,\n return_message: Optional[bool] = False,\n ) -> Union[Message, Text]:\n return super().build_with_record(\n sender=sender,\n sender_name=sender_name,\n input_value=input_value,\n files=files,\n session_id=session_id,\n return_message=return_message,\n )\n" "value": "from typing import Optional\n\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.schema.message import Message\nfrom langflow.field_typing import Text\nfrom typing import Union\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"ChatInput\"\n\n def build_config(self):\n build_config = super().build_config()\n build_config[\"input_value\"] = {\n \"input_types\": [],\n \"display_name\": \"Text\",\n \"multiline\": True,\n }\n build_config[\"return_message\"] = {\n \"display_name\": \"Return Record\",\n \"advanced\": True,\n }\n\n return build_config\n\n def build(\n self,\n sender: Optional[str] = \"User\",\n sender_name: Optional[str] = \"User\",\n input_value: Optional[str] = None,\n files: Optional[list[str]] = None,\n session_id: Optional[str] = None,\n return_message: Optional[bool] = True,\n ) -> Union[Message, Text]:\n return super().build_with_record(\n sender=sender,\n sender_name=sender_name,\n input_value=input_value,\n files=files,\n session_id=session_id,\n return_message=return_message,\n )\n"
}, },
"input_value": { "input_value": {
"advanced": false, "advanced": false,
@ -193,12 +241,17 @@
"fileTypes": [], "fileTypes": [],
"file_path": "", "file_path": "",
"info": "", "info": "",
"input_types": ["Text"], "input_types": [
"Text"
],
"list": true, "list": true,
"load_from_db": false, "load_from_db": false,
"multiline": false, "multiline": false,
"name": "sender", "name": "sender",
"options": ["Machine", "User"], "options": [
"Machine",
"User"
],
"password": false, "password": false,
"placeholder": "", "placeholder": "",
"required": false, "required": false,
@ -214,7 +267,9 @@
"fileTypes": [], "fileTypes": [],
"file_path": "", "file_path": "",
"info": "", "info": "",
"input_types": ["Text"], "input_types": [
"Text"
],
"list": false, "list": false,
"load_from_db": false, "load_from_db": false,
"multiline": false, "multiline": false,
@ -234,7 +289,9 @@
"fileTypes": [], "fileTypes": [],
"file_path": "", "file_path": "",
"info": "If provided, the message will be stored in the memory.", "info": "If provided, the message will be stored in the memory.",
"input_types": ["Text"], "input_types": [
"Text"
],
"list": false, "list": false,
"load_from_db": false, "load_from_db": false,
"multiline": false, "multiline": false,
@ -270,7 +327,12 @@
"data": { "data": {
"id": "ChatOutput-i56kN", "id": "ChatOutput-i56kN",
"node": { "node": {
"base_classes": ["Text", "object", "Record", "str"], "base_classes": [
"Text",
"object",
"Record",
"str"
],
"beta": false, "beta": false,
"custom_fields": { "custom_fields": {
"input_value": null, "input_value": null,
@ -286,7 +348,10 @@
"field_order": [], "field_order": [],
"frozen": false, "frozen": false,
"icon": "ChatOutput", "icon": "ChatOutput",
"output_types": ["Message", "Text"], "output_types": [
"Message",
"Text"
],
"template": { "template": {
"_type": "CustomComponent", "_type": "CustomComponent",
"code": { "code": {
@ -314,7 +379,9 @@
"fileTypes": [], "fileTypes": [],
"file_path": "", "file_path": "",
"info": "", "info": "",
"input_types": ["Text"], "input_types": [
"Text"
],
"list": false, "list": false,
"load_from_db": false, "load_from_db": false,
"multiline": true, "multiline": true,
@ -333,12 +400,17 @@
"fileTypes": [], "fileTypes": [],
"file_path": "", "file_path": "",
"info": "", "info": "",
"input_types": ["Text"], "input_types": [
"Text"
],
"list": true, "list": true,
"load_from_db": false, "load_from_db": false,
"multiline": false, "multiline": false,
"name": "sender", "name": "sender",
"options": ["Machine", "User"], "options": [
"Machine",
"User"
],
"password": false, "password": false,
"placeholder": "", "placeholder": "",
"required": false, "required": false,
@ -354,7 +426,9 @@
"fileTypes": [], "fileTypes": [],
"file_path": "", "file_path": "",
"info": "", "info": "",
"input_types": ["Text"], "input_types": [
"Text"
],
"list": false, "list": false,
"load_from_db": false, "load_from_db": false,
"multiline": false, "multiline": false,
@ -374,7 +448,9 @@
"fileTypes": [], "fileTypes": [],
"file_path": "", "file_path": "",
"info": "If provided, the message will be stored in the memory.", "info": "If provided, the message will be stored in the memory.",
"input_types": ["Text"], "input_types": [
"Text"
],
"list": false, "list": false,
"load_from_db": false, "load_from_db": false,
"multiline": false, "multiline": false,
@ -412,7 +488,11 @@
"display_name": "Chat Memory", "display_name": "Chat Memory",
"id": "MemoryComponent-iDkC0", "id": "MemoryComponent-iDkC0",
"node": { "node": {
"base_classes": ["str", "Text", "object"], "base_classes": [
"str",
"Text",
"object"
],
"beta": true, "beta": true,
"custom_fields": { "custom_fields": {
"n_messages": null, "n_messages": null,
@ -429,7 +509,9 @@
"field_order": [], "field_order": [],
"frozen": false, "frozen": false,
"icon": "history", "icon": "history",
"output_types": ["Text"], "output_types": [
"Text"
],
"template": { "template": {
"_type": "CustomComponent", "_type": "CustomComponent",
"code": { "code": {
@ -476,12 +558,17 @@
"fileTypes": [], "fileTypes": [],
"file_path": "", "file_path": "",
"info": "Order of the messages.", "info": "Order of the messages.",
"input_types": ["Text"], "input_types": [
"Text"
],
"list": true, "list": true,
"load_from_db": false, "load_from_db": false,
"multiline": false, "multiline": false,
"name": "order", "name": "order",
"options": ["Ascending", "Descending"], "options": [
"Ascending",
"Descending"
],
"password": false, "password": false,
"placeholder": "", "placeholder": "",
"required": false, "required": false,
@ -497,7 +584,9 @@
"fileTypes": [], "fileTypes": [],
"file_path": "", "file_path": "",
"info": "Template to convert Record to Text. If left empty, it will be dynamically set to the Record's text key.", "info": "Template to convert Record to Text. If left empty, it will be dynamically set to the Record's text key.",
"input_types": ["Text"], "input_types": [
"Text"
],
"list": false, "list": false,
"load_from_db": false, "load_from_db": false,
"multiline": true, "multiline": true,
@ -517,12 +606,18 @@
"fileTypes": [], "fileTypes": [],
"file_path": "", "file_path": "",
"info": "", "info": "",
"input_types": ["Text"], "input_types": [
"Text"
],
"list": true, "list": true,
"load_from_db": false, "load_from_db": false,
"multiline": false, "multiline": false,
"name": "sender", "name": "sender",
"options": ["Machine", "User", "Machine and User"], "options": [
"Machine",
"User",
"Machine and User"
],
"password": false, "password": false,
"placeholder": "", "placeholder": "",
"required": false, "required": false,
@ -538,7 +633,9 @@
"fileTypes": [], "fileTypes": [],
"file_path": "", "file_path": "",
"info": "", "info": "",
"input_types": ["Text"], "input_types": [
"Text"
],
"list": false, "list": false,
"load_from_db": false, "load_from_db": false,
"multiline": false, "multiline": false,
@ -557,7 +654,9 @@
"fileTypes": [], "fileTypes": [],
"file_path": "", "file_path": "",
"info": "Session ID of the chat history.", "info": "Session ID of the chat history.",
"input_types": ["Text"], "input_types": [
"Text"
],
"list": false, "list": false,
"load_from_db": false, "load_from_db": false,
"multiline": false, "multiline": false,
@ -595,10 +694,17 @@
"display_name": "Prompt", "display_name": "Prompt",
"id": "Prompt-19lCm", "id": "Prompt-19lCm",
"node": { "node": {
"base_classes": ["Text", "str", "object"], "base_classes": [
"Text",
"str",
"object"
],
"beta": false, "beta": false,
"custom_fields": { "custom_fields": {
"template": ["context", "user_message"] "template": [
"context",
"user_message"
]
}, },
"description": "Create a prompt template with dynamic variables.", "description": "Create a prompt template with dynamic variables.",
"display_name": "Prompt", "display_name": "Prompt",
@ -613,7 +719,9 @@
"is_input": null, "is_input": null,
"is_output": null, "is_output": null,
"name": "", "name": "",
"output_types": ["Prompt"], "output_types": [
"Prompt"
],
"template": { "template": {
"_type": "CustomComponent", "_type": "CustomComponent",
"code": { "code": {
@ -667,7 +775,9 @@
"fileTypes": [], "fileTypes": [],
"file_path": "", "file_path": "",
"info": "", "info": "",
"input_types": ["Text"], "input_types": [
"Text"
],
"list": false, "list": false,
"load_from_db": false, "load_from_db": false,
"multiline": false, "multiline": false,
@ -729,7 +839,11 @@
"data": { "data": {
"id": "OpenAIModel-1v5Hz", "id": "OpenAIModel-1v5Hz",
"node": { "node": {
"base_classes": ["str", "object", "Text"], "base_classes": [
"str",
"object",
"Text"
],
"beta": false, "beta": false,
"custom_fields": { "custom_fields": {
"input_value": null, "input_value": null,
@ -759,7 +873,9 @@
], ],
"frozen": false, "frozen": false,
"icon": "OpenAI", "icon": "OpenAI",
"output_types": ["Text"], "output_types": [
"Text"
],
"template": { "template": {
"_type": "CustomComponent", "_type": "CustomComponent",
"code": { "code": {
@ -787,7 +903,11 @@
"fileTypes": [], "fileTypes": [],
"file_path": "", "file_path": "",
"info": "", "info": "",
"input_types": ["Text", "Record", "Prompt"], "input_types": [
"Text",
"Record",
"Prompt"
],
"list": false, "list": false,
"load_from_db": false, "load_from_db": false,
"multiline": false, "multiline": false,
@ -844,7 +964,9 @@
"fileTypes": [], "fileTypes": [],
"file_path": "", "file_path": "",
"info": "", "info": "",
"input_types": ["Text"], "input_types": [
"Text"
],
"list": true, "list": true,
"load_from_db": false, "load_from_db": false,
"multiline": false, "multiline": false,
@ -871,7 +993,9 @@
"fileTypes": [], "fileTypes": [],
"file_path": "", "file_path": "",
"info": "The base URL of the OpenAI API. Defaults to https://api.openai.com/v1.\n\nYou can change this to use other APIs like JinaChat, LocalAI and Prem.", "info": "The base URL of the OpenAI API. Defaults to https://api.openai.com/v1.\n\nYou can change this to use other APIs like JinaChat, LocalAI and Prem.",
"input_types": ["Text"], "input_types": [
"Text"
],
"list": false, "list": false,
"load_from_db": false, "load_from_db": false,
"multiline": false, "multiline": false,
@ -890,7 +1014,9 @@
"fileTypes": [], "fileTypes": [],
"file_path": "", "file_path": "",
"info": "The OpenAI API Key to use for the OpenAI model.", "info": "The OpenAI API Key to use for the OpenAI model.",
"input_types": ["Text"], "input_types": [
"Text"
],
"list": false, "list": false,
"load_from_db": true, "load_from_db": true,
"multiline": false, "multiline": false,
@ -929,7 +1055,9 @@
"fileTypes": [], "fileTypes": [],
"file_path": "", "file_path": "",
"info": "System message to pass to the model.", "info": "System message to pass to the model.",
"input_types": ["Text"], "input_types": [
"Text"
],
"list": false, "list": false,
"load_from_db": false, "load_from_db": false,
"multiline": false, "multiline": false,
@ -992,7 +1120,11 @@
"edited": false, "edited": false,
"id": "TextOutput-KuLNK", "id": "TextOutput-KuLNK",
"node": { "node": {
"base_classes": ["object", "str", "Text"], "base_classes": [
"object",
"str",
"Text"
],
"beta": false, "beta": false,
"custom_fields": { "custom_fields": {
"input_value": null, "input_value": null,
@ -1006,7 +1138,9 @@
"field_order": [], "field_order": [],
"frozen": false, "frozen": false,
"icon": "type", "icon": "type",
"output_types": ["Text"], "output_types": [
"Text"
],
"template": { "template": {
"_type": "CustomComponent", "_type": "CustomComponent",
"code": { "code": {
@ -1034,7 +1168,10 @@
"fileTypes": [], "fileTypes": [],
"file_path": "", "file_path": "",
"info": "Text or Record to be passed as output.", "info": "Text or Record to be passed as output.",
"input_types": ["Record", "Text"], "input_types": [
"Record",
"Text"
],
"list": false, "list": false,
"load_from_db": false, "load_from_db": false,
"multiline": false, "multiline": false,
@ -1054,7 +1191,9 @@
"fileTypes": [], "fileTypes": [],
"file_path": "", "file_path": "",
"info": "Template to convert Record to Text. If left empty, it will be dynamically set to the Record's text key.", "info": "Template to convert Record to Text. If left empty, it will be dynamically set to the Record's text key.",
"input_types": ["Text"], "input_types": [
"Text"
],
"list": false, "list": false,
"load_from_db": false, "load_from_db": false,
"multiline": true, "multiline": true,
@ -1100,4 +1239,4 @@
"is_component": false, "is_component": false,
"last_tested_version": "1.0.0a52", "last_tested_version": "1.0.0a52",
"name": "Memory Chatbot" "name": "Memory Chatbot"
} }

File diff suppressed because one or more lines are too long