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,
"title_case": false,
"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": {
"advanced": false,

View file

@ -5,14 +5,23 @@
"className": "stroke-gray-900 stroke-connection",
"data": {
"sourceHandle": {
"baseClasses": ["str", "Text", "object"],
"baseClasses": [
"str",
"Text",
"object"
],
"dataType": "MemoryComponent",
"id": "MemoryComponent-iDkC0"
},
"targetHandle": {
"fieldName": "context",
"id": "Prompt-19lCm",
"inputTypes": ["Document", "BaseOutputParser", "Record", "Text"],
"inputTypes": [
"Document",
"BaseOutputParser",
"Record",
"Text"
],
"type": "str"
}
},
@ -30,14 +39,24 @@
"className": "",
"data": {
"sourceHandle": {
"baseClasses": ["Text", "object", "Record", "str"],
"baseClasses": [
"Text",
"object",
"Record",
"str"
],
"dataType": "ChatInput",
"id": "ChatInput-Z6G1Z"
},
"targetHandle": {
"fieldName": "user_message",
"id": "Prompt-19lCm",
"inputTypes": ["Document", "BaseOutputParser", "Record", "Text"],
"inputTypes": [
"Document",
"BaseOutputParser",
"Record",
"Text"
],
"type": "str"
}
},
@ -55,14 +74,22 @@
"className": "",
"data": {
"sourceHandle": {
"baseClasses": ["Text", "str", "object"],
"baseClasses": [
"Text",
"str",
"object"
],
"dataType": "Prompt",
"id": "Prompt-19lCm"
},
"targetHandle": {
"fieldName": "input_value",
"id": "OpenAIModel-1v5Hz",
"inputTypes": ["Text", "Record", "Prompt"],
"inputTypes": [
"Text",
"Record",
"Prompt"
],
"type": "str"
}
},
@ -79,14 +106,20 @@
"className": "",
"data": {
"sourceHandle": {
"baseClasses": ["str", "object", "Text"],
"baseClasses": [
"str",
"object",
"Text"
],
"dataType": "OpenAIModel",
"id": "OpenAIModel-1v5Hz"
},
"targetHandle": {
"fieldName": "input_value",
"id": "ChatOutput-i56kN",
"inputTypes": ["Text"],
"inputTypes": [
"Text"
],
"type": "str"
}
},
@ -103,14 +136,21 @@
"className": "",
"data": {
"sourceHandle": {
"baseClasses": ["str", "Text", "object"],
"baseClasses": [
"str",
"Text",
"object"
],
"dataType": "MemoryComponent",
"id": "MemoryComponent-iDkC0"
},
"targetHandle": {
"fieldName": "input_value",
"id": "TextOutput-KuLNK",
"inputTypes": ["Record", "Text"],
"inputTypes": [
"Record",
"Text"
],
"type": "str"
}
},
@ -129,7 +169,12 @@
"data": {
"id": "ChatInput-Z6G1Z",
"node": {
"base_classes": ["Text", "object", "Record", "str"],
"base_classes": [
"Text",
"object",
"Record",
"str"
],
"beta": false,
"custom_fields": {
"input_value": null,
@ -145,7 +190,10 @@
"field_order": [],
"frozen": false,
"icon": "ChatInput",
"output_types": ["Message", "Text"],
"output_types": [
"Message",
"Text"
],
"template": {
"_type": "CustomComponent",
"code": {
@ -164,7 +212,7 @@
"show": true,
"title_case": false,
"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": {
"advanced": false,
@ -193,12 +241,17 @@
"fileTypes": [],
"file_path": "",
"info": "",
"input_types": ["Text"],
"input_types": [
"Text"
],
"list": true,
"load_from_db": false,
"multiline": false,
"name": "sender",
"options": ["Machine", "User"],
"options": [
"Machine",
"User"
],
"password": false,
"placeholder": "",
"required": false,
@ -214,7 +267,9 @@
"fileTypes": [],
"file_path": "",
"info": "",
"input_types": ["Text"],
"input_types": [
"Text"
],
"list": false,
"load_from_db": false,
"multiline": false,
@ -234,7 +289,9 @@
"fileTypes": [],
"file_path": "",
"info": "If provided, the message will be stored in the memory.",
"input_types": ["Text"],
"input_types": [
"Text"
],
"list": false,
"load_from_db": false,
"multiline": false,
@ -270,7 +327,12 @@
"data": {
"id": "ChatOutput-i56kN",
"node": {
"base_classes": ["Text", "object", "Record", "str"],
"base_classes": [
"Text",
"object",
"Record",
"str"
],
"beta": false,
"custom_fields": {
"input_value": null,
@ -286,7 +348,10 @@
"field_order": [],
"frozen": false,
"icon": "ChatOutput",
"output_types": ["Message", "Text"],
"output_types": [
"Message",
"Text"
],
"template": {
"_type": "CustomComponent",
"code": {
@ -314,7 +379,9 @@
"fileTypes": [],
"file_path": "",
"info": "",
"input_types": ["Text"],
"input_types": [
"Text"
],
"list": false,
"load_from_db": false,
"multiline": true,
@ -333,12 +400,17 @@
"fileTypes": [],
"file_path": "",
"info": "",
"input_types": ["Text"],
"input_types": [
"Text"
],
"list": true,
"load_from_db": false,
"multiline": false,
"name": "sender",
"options": ["Machine", "User"],
"options": [
"Machine",
"User"
],
"password": false,
"placeholder": "",
"required": false,
@ -354,7 +426,9 @@
"fileTypes": [],
"file_path": "",
"info": "",
"input_types": ["Text"],
"input_types": [
"Text"
],
"list": false,
"load_from_db": false,
"multiline": false,
@ -374,7 +448,9 @@
"fileTypes": [],
"file_path": "",
"info": "If provided, the message will be stored in the memory.",
"input_types": ["Text"],
"input_types": [
"Text"
],
"list": false,
"load_from_db": false,
"multiline": false,
@ -412,7 +488,11 @@
"display_name": "Chat Memory",
"id": "MemoryComponent-iDkC0",
"node": {
"base_classes": ["str", "Text", "object"],
"base_classes": [
"str",
"Text",
"object"
],
"beta": true,
"custom_fields": {
"n_messages": null,
@ -429,7 +509,9 @@
"field_order": [],
"frozen": false,
"icon": "history",
"output_types": ["Text"],
"output_types": [
"Text"
],
"template": {
"_type": "CustomComponent",
"code": {
@ -476,12 +558,17 @@
"fileTypes": [],
"file_path": "",
"info": "Order of the messages.",
"input_types": ["Text"],
"input_types": [
"Text"
],
"list": true,
"load_from_db": false,
"multiline": false,
"name": "order",
"options": ["Ascending", "Descending"],
"options": [
"Ascending",
"Descending"
],
"password": false,
"placeholder": "",
"required": false,
@ -497,7 +584,9 @@
"fileTypes": [],
"file_path": "",
"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,
"load_from_db": false,
"multiline": true,
@ -517,12 +606,18 @@
"fileTypes": [],
"file_path": "",
"info": "",
"input_types": ["Text"],
"input_types": [
"Text"
],
"list": true,
"load_from_db": false,
"multiline": false,
"name": "sender",
"options": ["Machine", "User", "Machine and User"],
"options": [
"Machine",
"User",
"Machine and User"
],
"password": false,
"placeholder": "",
"required": false,
@ -538,7 +633,9 @@
"fileTypes": [],
"file_path": "",
"info": "",
"input_types": ["Text"],
"input_types": [
"Text"
],
"list": false,
"load_from_db": false,
"multiline": false,
@ -557,7 +654,9 @@
"fileTypes": [],
"file_path": "",
"info": "Session ID of the chat history.",
"input_types": ["Text"],
"input_types": [
"Text"
],
"list": false,
"load_from_db": false,
"multiline": false,
@ -595,10 +694,17 @@
"display_name": "Prompt",
"id": "Prompt-19lCm",
"node": {
"base_classes": ["Text", "str", "object"],
"base_classes": [
"Text",
"str",
"object"
],
"beta": false,
"custom_fields": {
"template": ["context", "user_message"]
"template": [
"context",
"user_message"
]
},
"description": "Create a prompt template with dynamic variables.",
"display_name": "Prompt",
@ -613,7 +719,9 @@
"is_input": null,
"is_output": null,
"name": "",
"output_types": ["Prompt"],
"output_types": [
"Prompt"
],
"template": {
"_type": "CustomComponent",
"code": {
@ -667,7 +775,9 @@
"fileTypes": [],
"file_path": "",
"info": "",
"input_types": ["Text"],
"input_types": [
"Text"
],
"list": false,
"load_from_db": false,
"multiline": false,
@ -729,7 +839,11 @@
"data": {
"id": "OpenAIModel-1v5Hz",
"node": {
"base_classes": ["str", "object", "Text"],
"base_classes": [
"str",
"object",
"Text"
],
"beta": false,
"custom_fields": {
"input_value": null,
@ -759,7 +873,9 @@
],
"frozen": false,
"icon": "OpenAI",
"output_types": ["Text"],
"output_types": [
"Text"
],
"template": {
"_type": "CustomComponent",
"code": {
@ -787,7 +903,11 @@
"fileTypes": [],
"file_path": "",
"info": "",
"input_types": ["Text", "Record", "Prompt"],
"input_types": [
"Text",
"Record",
"Prompt"
],
"list": false,
"load_from_db": false,
"multiline": false,
@ -844,7 +964,9 @@
"fileTypes": [],
"file_path": "",
"info": "",
"input_types": ["Text"],
"input_types": [
"Text"
],
"list": true,
"load_from_db": false,
"multiline": false,
@ -871,7 +993,9 @@
"fileTypes": [],
"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.",
"input_types": ["Text"],
"input_types": [
"Text"
],
"list": false,
"load_from_db": false,
"multiline": false,
@ -890,7 +1014,9 @@
"fileTypes": [],
"file_path": "",
"info": "The OpenAI API Key to use for the OpenAI model.",
"input_types": ["Text"],
"input_types": [
"Text"
],
"list": false,
"load_from_db": true,
"multiline": false,
@ -929,7 +1055,9 @@
"fileTypes": [],
"file_path": "",
"info": "System message to pass to the model.",
"input_types": ["Text"],
"input_types": [
"Text"
],
"list": false,
"load_from_db": false,
"multiline": false,
@ -992,7 +1120,11 @@
"edited": false,
"id": "TextOutput-KuLNK",
"node": {
"base_classes": ["object", "str", "Text"],
"base_classes": [
"object",
"str",
"Text"
],
"beta": false,
"custom_fields": {
"input_value": null,
@ -1006,7 +1138,9 @@
"field_order": [],
"frozen": false,
"icon": "type",
"output_types": ["Text"],
"output_types": [
"Text"
],
"template": {
"_type": "CustomComponent",
"code": {
@ -1034,7 +1168,10 @@
"fileTypes": [],
"file_path": "",
"info": "Text or Record to be passed as output.",
"input_types": ["Record", "Text"],
"input_types": [
"Record",
"Text"
],
"list": false,
"load_from_db": false,
"multiline": false,
@ -1054,7 +1191,9 @@
"fileTypes": [],
"file_path": "",
"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,
"load_from_db": false,
"multiline": true,
@ -1100,4 +1239,4 @@
"is_component": false,
"last_tested_version": "1.0.0a52",
"name": "Memory Chatbot"
}
}

File diff suppressed because one or more lines are too long