merge projects
This commit is contained in:
parent
1712577e4d
commit
ef6c179bd1
5 changed files with 793 additions and 2539 deletions
|
|
@ -45,15 +45,9 @@
|
||||||
"name": "template",
|
"name": "template",
|
||||||
"display_name": "Template",
|
"display_name": "Template",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
=======
|
|
||||||
"input_types": [
|
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
|
|
@ -92,24 +86,15 @@
|
||||||
"is_input": null,
|
"is_input": null,
|
||||||
"is_output": null,
|
"is_output": null,
|
||||||
"is_composition": null,
|
"is_composition": null,
|
||||||
<<<<<<< HEAD
|
|
||||||
"base_classes": [
|
"base_classes": [
|
||||||
"object",
|
"object",
|
||||||
"str",
|
"str",
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
=======
|
|
||||||
"base_classes": [
|
|
||||||
"object",
|
|
||||||
"str",
|
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"name": "",
|
"name": "",
|
||||||
"display_name": "Prompt",
|
"display_name": "Prompt",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
<<<<<<< HEAD
|
|
||||||
"template": [
|
"template": [
|
||||||
"user_input"
|
"user_input"
|
||||||
]
|
]
|
||||||
|
|
@ -117,21 +102,11 @@
|
||||||
"output_types": [
|
"output_types": [
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
=======
|
|
||||||
"template": [
|
|
||||||
"user_input"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"output_types": [
|
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"full_path": null,
|
"full_path": null,
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [],
|
"field_order": [],
|
||||||
"beta": false,
|
"beta": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"error": null,
|
"error": null,
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
|
|
@ -144,9 +119,6 @@
|
||||||
"method": null
|
"method": null
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"error": null
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"id": "Prompt-uxBqP",
|
"id": "Prompt-uxBqP",
|
||||||
"description": "Create a prompt template with dynamic variables.",
|
"description": "Create a prompt template with dynamic variables.",
|
||||||
|
|
@ -189,15 +161,9 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"input_types": [
|
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"code": {
|
"code": {
|
||||||
"type": "code",
|
"type": "code",
|
||||||
|
|
@ -280,15 +246,9 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"input_types": [
|
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"openai_api_base": {
|
"openai_api_base": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -307,15 +267,9 @@
|
||||||
"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.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"input_types": [
|
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"openai_api_key": {
|
"openai_api_key": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -334,15 +288,9 @@
|
||||||
"info": "The OpenAI API Key to use for the OpenAI model.",
|
"info": "The OpenAI API Key to use for the OpenAI model.",
|
||||||
"load_from_db": true,
|
"load_from_db": true,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
=======
|
|
||||||
"input_types": [
|
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"value": "OPENAI_API_KEY"
|
"value": "OPENAI_API_KEY"
|
||||||
},
|
},
|
||||||
"stream": {
|
"stream": {
|
||||||
|
|
@ -381,15 +329,9 @@
|
||||||
"info": "System message to pass to the model.",
|
"info": "System message to pass to the model.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"input_types": [
|
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"temperature": {
|
"temperature": {
|
||||||
"type": "float",
|
"type": "float",
|
||||||
|
|
@ -420,19 +362,11 @@
|
||||||
},
|
},
|
||||||
"description": "Generates text using OpenAI LLMs.",
|
"description": "Generates text using OpenAI LLMs.",
|
||||||
"icon": "OpenAI",
|
"icon": "OpenAI",
|
||||||
<<<<<<< HEAD
|
|
||||||
"base_classes": [
|
"base_classes": [
|
||||||
"object",
|
"object",
|
||||||
"Text",
|
"Text",
|
||||||
"str"
|
"str"
|
||||||
],
|
],
|
||||||
=======
|
|
||||||
"base_classes": [
|
|
||||||
"object",
|
|
||||||
"Text",
|
|
||||||
"str"
|
|
||||||
],
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"display_name": "OpenAI",
|
"display_name": "OpenAI",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
|
|
@ -446,15 +380,9 @@
|
||||||
"stream": null,
|
"stream": null,
|
||||||
"system_message": null
|
"system_message": null
|
||||||
},
|
},
|
||||||
<<<<<<< HEAD
|
|
||||||
"output_types": [
|
"output_types": [
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
=======
|
|
||||||
"output_types": [
|
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [
|
"field_order": [
|
||||||
|
|
@ -468,7 +396,6 @@
|
||||||
"system_message",
|
"system_message",
|
||||||
"stream"
|
"stream"
|
||||||
],
|
],
|
||||||
<<<<<<< HEAD
|
|
||||||
"beta": false,
|
"beta": false,
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
|
|
@ -481,9 +408,6 @@
|
||||||
"method": null
|
"method": null
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"beta": false
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"id": "OpenAIModel-k39HS",
|
"id": "OpenAIModel-k39HS",
|
||||||
"description": "Generates text using OpenAI LLMs.",
|
"description": "Generates text using OpenAI LLMs.",
|
||||||
|
|
@ -516,11 +440,7 @@
|
||||||
"list": false,
|
"list": false,
|
||||||
"show": true,
|
"show": true,
|
||||||
"multiline": true,
|
"multiline": true,
|
||||||
<<<<<<< HEAD
|
|
||||||
"value": "from langflow.base.io.chat import ChatComponent\nfrom langflow.field_typing import Text\nfrom langflow.schema import Record\nfrom langflow.template import Input, Output\n\n\nclass ChatOutput(ChatComponent):\n display_name = \"Chat Output\"\n description = \"Display a chat message in the Playground.\"\n icon = \"ChatOutput\"\n\n inputs = [\n Input(\n name=\"input_value\", type=str, display_name=\"Message\", multiline=True, info=\"Message to be passed as output.\"\n ),\n Input(\n name=\"sender\",\n type=str,\n display_name=\"Sender Type\",\n options=[\"Machine\", \"User\"],\n value=\"Machine\",\n advanced=True,\n info=\"Type of sender.\",\n ),\n Input(name=\"sender_name\", type=str, display_name=\"Sender Name\", info=\"Name of the sender.\", value=\"AI\"),\n Input(\n name=\"session_id\", type=str, display_name=\"Session ID\", info=\"Session ID for the message.\", advanced=True\n ),\n Input(\n name=\"record_template\",\n type=str,\n display_name=\"Record Template\",\n value=\"{text}\",\n advanced=True,\n info=\"Template to convert Record to Text. If left empty, it will be dynamically set to the Record's text key.\",\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"text_response\"),\n Output(display_name=\"Record\", name=\"record\", method=\"record_response\"),\n ]\n\n def text_response(self) -> Text:\n result = self.input_value\n if self.session_id and isinstance(result, (Record, str)):\n self.store_message(result, self.session_id, self.sender, self.sender_name)\n return result\n\n def record_response(self) -> Record:\n record = Record(\n data={\n \"message\": self.input_value,\n \"sender\": self.sender,\n \"sender_name\": self.sender_name,\n \"session_id\": self.session_id,\n \"template\": self.record_template or \"\",\n }\n )\n if self.session_id and isinstance(record, (Record, str)):\n self.store_message(record, self.session_id, self.sender, self.sender_name)\n return record\n",
|
"value": "from langflow.base.io.chat import ChatComponent\nfrom langflow.field_typing import Text\nfrom langflow.schema import Record\nfrom langflow.template import Input, Output\n\n\nclass ChatOutput(ChatComponent):\n display_name = \"Chat Output\"\n description = \"Display a chat message in the Playground.\"\n icon = \"ChatOutput\"\n\n inputs = [\n Input(\n name=\"input_value\", type=str, display_name=\"Message\", multiline=True, info=\"Message to be passed as output.\"\n ),\n Input(\n name=\"sender\",\n type=str,\n display_name=\"Sender Type\",\n options=[\"Machine\", \"User\"],\n value=\"Machine\",\n advanced=True,\n info=\"Type of sender.\",\n ),\n Input(name=\"sender_name\", type=str, display_name=\"Sender Name\", info=\"Name of the sender.\", value=\"AI\"),\n Input(\n name=\"session_id\", type=str, display_name=\"Session ID\", info=\"Session ID for the message.\", advanced=True\n ),\n Input(\n name=\"record_template\",\n type=str,\n display_name=\"Record Template\",\n value=\"{text}\",\n advanced=True,\n info=\"Template to convert Record to Text. If left empty, it will be dynamically set to the Record's text key.\",\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"text_response\"),\n Output(display_name=\"Record\", name=\"record\", method=\"record_response\"),\n ]\n\n def text_response(self) -> Text:\n result = self.input_value\n if self.session_id and isinstance(result, (Record, str)):\n self.store_message(result, self.session_id, self.sender, self.sender_name)\n return result\n\n def record_response(self) -> Record:\n record = Record(\n data={\n \"message\": self.input_value,\n \"sender\": self.sender,\n \"sender_name\": self.sender_name,\n \"session_id\": self.session_id,\n \"template\": self.record_template or \"\",\n }\n )\n if self.session_id and isinstance(record, (Record, str)):\n self.store_message(record, self.session_id, self.sender, self.sender_name)\n return record\n",
|
||||||
=======
|
|
||||||
"value": "from typing import Optional, Union\n\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.field_typing import Text\nfrom langflow.schema import Record\n\n\nclass ChatOutput(ChatComponent):\n display_name = \"Chat Output\"\n description = \"Display a chat message in the Playground.\"\n icon = \"ChatOutput\"\n\n def build(\n self,\n sender: Optional[str] = \"Machine\",\n sender_name: Optional[str] = \"AI\",\n input_value: Optional[str] = None,\n session_id: Optional[str] = None,\n return_record: Optional[bool] = False,\n record_template: Optional[str] = \"{text}\",\n ) -> Union[Text, Record]:\n return super().build_with_record(\n sender=sender,\n sender_name=sender_name,\n input_value=input_value,\n session_id=session_id,\n return_record=return_record,\n record_template=record_template or \"\",\n )\n",
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
|
|
@ -538,17 +458,13 @@
|
||||||
"list": false,
|
"list": false,
|
||||||
"show": true,
|
"show": true,
|
||||||
"multiline": true,
|
"multiline": true,
|
||||||
<<<<<<< HEAD
|
|
||||||
"value": "",
|
"value": "",
|
||||||
=======
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
"name": "input_value",
|
"name": "input_value",
|
||||||
"display_name": "Message",
|
"display_name": "Message",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "Message to be passed as output.",
|
"info": "Message to be passed as output.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
|
|
@ -556,15 +472,6 @@
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"input_types": [
|
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"dynamic": false,
|
|
||||||
"info": "",
|
|
||||||
"load_from_db": false,
|
|
||||||
"title_case": false
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"record_template": {
|
"record_template": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -572,13 +479,8 @@
|
||||||
"placeholder": "",
|
"placeholder": "",
|
||||||
"list": false,
|
"list": false,
|
||||||
"show": true,
|
"show": true,
|
||||||
<<<<<<< HEAD
|
|
||||||
"multiline": false,
|
"multiline": false,
|
||||||
"value": "",
|
"value": "",
|
||||||
=======
|
|
||||||
"multiline": true,
|
|
||||||
"value": "{text}",
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
|
|
@ -586,40 +488,12 @@
|
||||||
"display_name": "Record Template",
|
"display_name": "Record Template",
|
||||||
"advanced": true,
|
"advanced": true,
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"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.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"info": "In case of Message being a Record, this template will be used to convert it to text.",
|
|
||||||
"load_from_db": false,
|
|
||||||
"title_case": false,
|
|
||||||
"input_types": [
|
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"return_record": {
|
|
||||||
"type": "bool",
|
|
||||||
"required": false,
|
|
||||||
"placeholder": "",
|
|
||||||
"list": false,
|
|
||||||
"show": true,
|
|
||||||
"multiline": false,
|
|
||||||
"value": false,
|
|
||||||
"fileTypes": [],
|
|
||||||
"file_path": "",
|
|
||||||
"password": false,
|
|
||||||
"name": "return_record",
|
|
||||||
"display_name": "Return Record",
|
|
||||||
"advanced": true,
|
|
||||||
"dynamic": false,
|
|
||||||
"info": "Return the message as a record containing the sender, sender_name, and session_id.",
|
|
||||||
"load_from_db": false,
|
|
||||||
"title_case": false
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"sender": {
|
"sender": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -632,36 +506,20 @@
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"options": [
|
"options": [
|
||||||
"Machine",
|
"Machine",
|
||||||
"User"
|
"User"
|
||||||
],
|
],
|
||||||
=======
|
|
||||||
"options": [
|
|
||||||
"Machine",
|
|
||||||
"User"
|
|
||||||
],
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"name": "sender",
|
"name": "sender",
|
||||||
"display_name": "Sender Type",
|
"display_name": "Sender Type",
|
||||||
"advanced": true,
|
"advanced": true,
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"info": "Type of sender.",
|
"info": "Type of sender.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"info": "",
|
|
||||||
"load_from_db": false,
|
|
||||||
"title_case": false,
|
|
||||||
"input_types": [
|
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"sender_name": {
|
"sender_name": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -678,21 +536,12 @@
|
||||||
"display_name": "Sender Name",
|
"display_name": "Sender Name",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"info": "Name of the sender.",
|
"info": "Name of the sender.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"info": "",
|
|
||||||
"load_from_db": false,
|
|
||||||
"title_case": false,
|
|
||||||
"input_types": [
|
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"session_id": {
|
"session_id": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -701,10 +550,7 @@
|
||||||
"list": false,
|
"list": false,
|
||||||
"show": true,
|
"show": true,
|
||||||
"multiline": false,
|
"multiline": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"value": "",
|
"value": "",
|
||||||
=======
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
|
|
@ -712,7 +558,6 @@
|
||||||
"display_name": "Session ID",
|
"display_name": "Session ID",
|
||||||
"advanced": true,
|
"advanced": true,
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"info": "Session ID for the message.",
|
"info": "Session ID for the message.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
|
|
@ -730,25 +575,6 @@
|
||||||
"str",
|
"str",
|
||||||
"object"
|
"object"
|
||||||
],
|
],
|
||||||
=======
|
|
||||||
"info": "If provided, the message will be stored in the memory.",
|
|
||||||
"load_from_db": false,
|
|
||||||
"title_case": false,
|
|
||||||
"input_types": [
|
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"_type": "CustomComponent"
|
|
||||||
},
|
|
||||||
"description": "Display a chat message in the Playground.",
|
|
||||||
"icon": "ChatOutput",
|
|
||||||
"base_classes": [
|
|
||||||
"Record",
|
|
||||||
"Text",
|
|
||||||
"str",
|
|
||||||
"object"
|
|
||||||
],
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"display_name": "Chat Output",
|
"display_name": "Chat Output",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
|
|
@ -759,7 +585,6 @@
|
||||||
"return_record": null,
|
"return_record": null,
|
||||||
"record_template": null
|
"record_template": null
|
||||||
},
|
},
|
||||||
<<<<<<< HEAD
|
|
||||||
"output_types": [
|
"output_types": [
|
||||||
"Text",
|
"Text",
|
||||||
"Record"
|
"Record"
|
||||||
|
|
@ -788,16 +613,6 @@
|
||||||
"method": "record_response"
|
"method": "record_response"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"output_types": [
|
|
||||||
"Text",
|
|
||||||
"Record"
|
|
||||||
],
|
|
||||||
"field_formatters": {},
|
|
||||||
"frozen": false,
|
|
||||||
"field_order": [],
|
|
||||||
"beta": false
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"id": "ChatOutput-njtka"
|
"id": "ChatOutput-njtka"
|
||||||
},
|
},
|
||||||
|
|
@ -809,8 +624,8 @@
|
||||||
"y": 71.88476890163852
|
"y": 71.88476890163852
|
||||||
},
|
},
|
||||||
"dragging": false
|
"dragging": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "ChatInput-P3fgL",
|
"id": "ChatInput-P3fgL",
|
||||||
"type": "genericNode",
|
"type": "genericNode",
|
||||||
"position": {
|
"position": {
|
||||||
|
|
@ -828,11 +643,7 @@
|
||||||
"list": false,
|
"list": false,
|
||||||
"show": true,
|
"show": true,
|
||||||
"multiline": true,
|
"multiline": true,
|
||||||
<<<<<<< HEAD
|
|
||||||
"value": "from langflow.base.io.chat import ChatComponent\nfrom langflow.field_typing import Text\nfrom langflow.schema import Record\nfrom langflow.template import Input, Output\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"ChatInput\"\n\n inputs = [\n Input(\n name=\"input_value\",\n type=str,\n display_name=\"Message\",\n multiline=True,\n input_types=[],\n info=\"Message to be passed as input.\",\n ),\n Input(\n name=\"sender\",\n type=str,\n display_name=\"Sender Type\",\n options=[\"Machine\", \"User\"],\n value=\"User\",\n info=\"Type of sender.\",\n advanced=True,\n ),\n Input(name=\"sender_name\", type=str, display_name=\"Sender Name\", info=\"Name of the sender.\", value=\"User\"),\n Input(\n name=\"session_id\", type=str, display_name=\"Session ID\", info=\"Session ID for the message.\", advanced=True\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"text_response\"),\n Output(display_name=\"Record\", name=\"record\", method=\"record_response\"),\n ]\n\n def text_response(self) -> Text:\n result = self.input_value\n if self.session_id and isinstance(result, (Record, str)):\n self.store_message(result, self.session_id, self.sender, self.sender_name)\n return result\n\n def record_response(self) -> Record:\n record = Record(\n data={\n \"text\": self.input_value,\n \"sender\": self.sender,\n \"sender_name\": self.sender_name,\n \"session_id\": self.session_id,\n },\n )\n if self.session_id and isinstance(record, (Record, str)):\n self.store_message(record, self.session_id, self.sender, self.sender_name)\n return record\n",
|
"value": "from langflow.base.io.chat import ChatComponent\nfrom langflow.field_typing import Text\nfrom langflow.schema import Record\nfrom langflow.template import Input, Output\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"ChatInput\"\n\n inputs = [\n Input(\n name=\"input_value\",\n type=str,\n display_name=\"Message\",\n multiline=True,\n input_types=[],\n info=\"Message to be passed as input.\",\n ),\n Input(\n name=\"sender\",\n type=str,\n display_name=\"Sender Type\",\n options=[\"Machine\", \"User\"],\n value=\"User\",\n info=\"Type of sender.\",\n advanced=True,\n ),\n Input(name=\"sender_name\", type=str, display_name=\"Sender Name\", info=\"Name of the sender.\", value=\"User\"),\n Input(\n name=\"session_id\", type=str, display_name=\"Session ID\", info=\"Session ID for the message.\", advanced=True\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"text_response\"),\n Output(display_name=\"Record\", name=\"record\", method=\"record_response\"),\n ]\n\n def text_response(self) -> Text:\n result = self.input_value\n if self.session_id and isinstance(result, (Record, str)):\n self.store_message(result, self.session_id, self.sender, self.sender_name)\n return result\n\n def record_response(self) -> Record:\n record = Record(\n data={\n \"text\": self.input_value,\n \"sender\": self.sender,\n \"sender_name\": self.sender_name,\n \"session_id\": self.session_id,\n },\n )\n if self.session_id and isinstance(record, (Record, str)):\n self.store_message(record, self.session_id, self.sender, self.sender_name)\n return record\n",
|
||||||
=======
|
|
||||||
"value": "from typing import Optional, Union\n\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.field_typing import Text\nfrom langflow.schema import Record\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\": \"Message\",\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 session_id: Optional[str] = None,\n return_record: Optional[bool] = False,\n ) -> Union[Text, Record]:\n return super().build_no_record(\n sender=sender,\n sender_name=sender_name,\n input_value=input_value,\n session_id=session_id,\n return_record=return_record,\n )\n",
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
|
|
@ -850,10 +661,7 @@
|
||||||
"list": false,
|
"list": false,
|
||||||
"show": true,
|
"show": true,
|
||||||
"multiline": true,
|
"multiline": true,
|
||||||
<<<<<<< HEAD
|
|
||||||
"value": "Hello, world!",
|
"value": "Hello, world!",
|
||||||
=======
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
|
|
@ -862,31 +670,7 @@
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
"input_types": [],
|
"input_types": [],
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"info": "Message to be passed as input.",
|
"info": "Message to be passed as input.",
|
||||||
=======
|
|
||||||
"info": "",
|
|
||||||
"load_from_db": false,
|
|
||||||
"title_case": false,
|
|
||||||
"value": "hi"
|
|
||||||
},
|
|
||||||
"return_record": {
|
|
||||||
"type": "bool",
|
|
||||||
"required": false,
|
|
||||||
"placeholder": "",
|
|
||||||
"list": false,
|
|
||||||
"show": true,
|
|
||||||
"multiline": false,
|
|
||||||
"value": false,
|
|
||||||
"fileTypes": [],
|
|
||||||
"file_path": "",
|
|
||||||
"password": false,
|
|
||||||
"name": "return_record",
|
|
||||||
"display_name": "Return Record",
|
|
||||||
"advanced": true,
|
|
||||||
"dynamic": false,
|
|
||||||
"info": "Return the message as a record containing the sender, sender_name, and session_id.",
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false
|
"title_case": false
|
||||||
},
|
},
|
||||||
|
|
@ -901,36 +685,20 @@
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"options": [
|
"options": [
|
||||||
"Machine",
|
"Machine",
|
||||||
"User"
|
"User"
|
||||||
],
|
],
|
||||||
=======
|
|
||||||
"options": [
|
|
||||||
"Machine",
|
|
||||||
"User"
|
|
||||||
],
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"name": "sender",
|
"name": "sender",
|
||||||
"display_name": "Sender Type",
|
"display_name": "Sender Type",
|
||||||
"advanced": true,
|
"advanced": true,
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"info": "Type of sender.",
|
"info": "Type of sender.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"info": "",
|
|
||||||
"load_from_db": false,
|
|
||||||
"title_case": false,
|
|
||||||
"input_types": [
|
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"sender_name": {
|
"sender_name": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -947,21 +715,12 @@
|
||||||
"display_name": "Sender Name",
|
"display_name": "Sender Name",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"info": "Name of the sender.",
|
"info": "Name of the sender.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"info": "",
|
|
||||||
"load_from_db": false,
|
|
||||||
"title_case": false,
|
|
||||||
"input_types": [
|
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"session_id": {
|
"session_id": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -970,10 +729,7 @@
|
||||||
"list": false,
|
"list": false,
|
||||||
"show": true,
|
"show": true,
|
||||||
"multiline": false,
|
"multiline": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"value": "",
|
"value": "",
|
||||||
=======
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
|
|
@ -981,7 +737,6 @@
|
||||||
"display_name": "Session ID",
|
"display_name": "Session ID",
|
||||||
"advanced": true,
|
"advanced": true,
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"info": "Session ID for the message.",
|
"info": "Session ID for the message.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
|
|
@ -999,25 +754,6 @@
|
||||||
"str",
|
"str",
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
=======
|
|
||||||
"info": "If provided, the message will be stored in the memory.",
|
|
||||||
"load_from_db": false,
|
|
||||||
"title_case": false,
|
|
||||||
"input_types": [
|
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"_type": "CustomComponent"
|
|
||||||
},
|
|
||||||
"description": "Get chat inputs from the Playground.",
|
|
||||||
"icon": "ChatInput",
|
|
||||||
"base_classes": [
|
|
||||||
"object",
|
|
||||||
"Record",
|
|
||||||
"str",
|
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"display_name": "Chat Input",
|
"display_name": "Chat Input",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
|
|
@ -1027,7 +763,6 @@
|
||||||
"session_id": null,
|
"session_id": null,
|
||||||
"return_record": null
|
"return_record": null
|
||||||
},
|
},
|
||||||
<<<<<<< HEAD
|
|
||||||
"output_types": [
|
"output_types": [
|
||||||
"Text",
|
"Text",
|
||||||
"Record"
|
"Record"
|
||||||
|
|
@ -1056,142 +791,87 @@
|
||||||
"method": "record_response"
|
"method": "record_response"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
=======
|
},
|
||||||
"output_types": [
|
"id": "ChatInput-P3fgL"
|
||||||
"Text",
|
},
|
||||||
"Record"
|
"selected": false,
|
||||||
|
"width": 384,
|
||||||
|
"height": 375,
|
||||||
|
"positionAbsolute": {
|
||||||
|
"x": -495.2223093083827,
|
||||||
|
"y": -232.56998443685862
|
||||||
|
},
|
||||||
|
"dragging": false
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"field_formatters": {},
|
"edges": [
|
||||||
"frozen": false,
|
{
|
||||||
"field_order": [],
|
"source": "OpenAIModel-k39HS",
|
||||||
"beta": false
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
|
||||||
"id": "ChatInput-P3fgL"
|
|
||||||
},
|
|
||||||
"selected": false,
|
|
||||||
"width": 384,
|
|
||||||
"height": 375,
|
|
||||||
"positionAbsolute": {
|
|
||||||
"x": -495.2223093083827,
|
|
||||||
"y": -232.56998443685862
|
|
||||||
},
|
|
||||||
"dragging": false
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"edges": [
|
|
||||||
{
|
|
||||||
"source": "OpenAIModel-k39HS",
|
|
||||||
<<<<<<< HEAD
|
|
||||||
"sourceHandle": "{\"dataType\": \"OpenAIModel\", \"id\": \"OpenAIModel-k39HS\", \"output_types\": [\"Text\"], \"name\": \"Text\"}",
|
"sourceHandle": "{\"dataType\": \"OpenAIModel\", \"id\": \"OpenAIModel-k39HS\", \"output_types\": [\"Text\"], \"name\": \"Text\"}",
|
||||||
=======
|
|
||||||
"sourceHandle": "{œbaseClassesœ:[œobjectœ,œTextœ,œstrœ],œdataTypeœ:œOpenAIModelœ,œidœ:œOpenAIModel-k39HSœ}",
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"target": "ChatOutput-njtka",
|
"target": "ChatOutput-njtka",
|
||||||
"targetHandle": "{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-njtkaœ,œinputTypesœ:[œTextœ],œtypeœ:œstrœ}",
|
"targetHandle": "{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-njtkaœ,œinputTypesœ:[œTextœ],œtypeœ:œstrœ}",
|
||||||
"data": {
|
"data": {
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "input_value",
|
"fieldName": "input_value",
|
||||||
"id": "ChatOutput-njtka",
|
"id": "ChatOutput-njtka",
|
||||||
<<<<<<< HEAD
|
|
||||||
"inputTypes": [
|
"inputTypes": [
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
"type": "str"
|
"type": "str"
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"dataType": "OpenAIModel",
|
"dataType": "OpenAIModel",
|
||||||
"id": "OpenAIModel-k39HS",
|
"id": "OpenAIModel-k39HS",
|
||||||
"output_types": [
|
"output_types": [
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
"name": "Text"
|
"name": "Text"
|
||||||
=======
|
}
|
||||||
"inputTypes": [
|
},
|
||||||
"Text"
|
"style": {
|
||||||
],
|
"stroke": "#555"
|
||||||
"type": "str"
|
},
|
||||||
},
|
"className": "stroke-gray-900 stroke-connection",
|
||||||
"sourceHandle": {
|
"id": "reactflow__edge-OpenAIModel-k39HS{œbaseClassesœ:[œobjectœ,œTextœ,œstrœ],œdataTypeœ:œOpenAIModelœ,œidœ:œOpenAIModel-k39HSœ}-ChatOutput-njtka{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-njtkaœ,œinputTypesœ:[œTextœ],œtypeœ:œstrœ}"
|
||||||
"baseClasses": [
|
},
|
||||||
"object",
|
{
|
||||||
"Text",
|
"source": "Prompt-uxBqP",
|
||||||
"str"
|
|
||||||
],
|
|
||||||
"dataType": "OpenAIModel",
|
|
||||||
"id": "OpenAIModel-k39HS"
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"style": {
|
|
||||||
"stroke": "#555"
|
|
||||||
},
|
|
||||||
"className": "stroke-gray-900 stroke-connection",
|
|
||||||
"id": "reactflow__edge-OpenAIModel-k39HS{œbaseClassesœ:[œobjectœ,œTextœ,œstrœ],œdataTypeœ:œOpenAIModelœ,œidœ:œOpenAIModel-k39HSœ}-ChatOutput-njtka{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-njtkaœ,œinputTypesœ:[œTextœ],œtypeœ:œstrœ}"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"source": "Prompt-uxBqP",
|
|
||||||
<<<<<<< HEAD
|
|
||||||
"sourceHandle": "{\"dataType\": \"Prompt\", \"id\": \"Prompt-uxBqP\", \"output_types\": [\"Text\"], \"name\": \"Text\"}",
|
"sourceHandle": "{\"dataType\": \"Prompt\", \"id\": \"Prompt-uxBqP\", \"output_types\": [\"Text\"], \"name\": \"Text\"}",
|
||||||
=======
|
|
||||||
"sourceHandle": "{œbaseClassesœ:[œobjectœ,œstrœ,œTextœ],œdataTypeœ:œPromptœ,œidœ:œPrompt-uxBqPœ}",
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"target": "OpenAIModel-k39HS",
|
"target": "OpenAIModel-k39HS",
|
||||||
"targetHandle": "{œfieldNameœ:œinput_valueœ,œidœ:œOpenAIModel-k39HSœ,œinputTypesœ:[œTextœ],œtypeœ:œstrœ}",
|
"targetHandle": "{œfieldNameœ:œinput_valueœ,œidœ:œOpenAIModel-k39HSœ,œinputTypesœ:[œTextœ],œtypeœ:œstrœ}",
|
||||||
"data": {
|
"data": {
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "input_value",
|
"fieldName": "input_value",
|
||||||
"id": "OpenAIModel-k39HS",
|
"id": "OpenAIModel-k39HS",
|
||||||
<<<<<<< HEAD
|
|
||||||
"inputTypes": [
|
"inputTypes": [
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
"type": "str"
|
"type": "str"
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"dataType": "Prompt",
|
"dataType": "Prompt",
|
||||||
"id": "Prompt-uxBqP",
|
"id": "Prompt-uxBqP",
|
||||||
"output_types": [
|
"output_types": [
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
"name": "Text"
|
"name": "Text"
|
||||||
=======
|
}
|
||||||
"inputTypes": [
|
},
|
||||||
"Text"
|
"style": {
|
||||||
],
|
"stroke": "#555"
|
||||||
"type": "str"
|
},
|
||||||
},
|
"className": "stroke-gray-900 stroke-connection",
|
||||||
"sourceHandle": {
|
"id": "reactflow__edge-Prompt-uxBqP{œbaseClassesœ:[œobjectœ,œstrœ,œTextœ],œdataTypeœ:œPromptœ,œidœ:œPrompt-uxBqPœ}-OpenAIModel-k39HS{œfieldNameœ:œinput_valueœ,œidœ:œOpenAIModel-k39HSœ,œinputTypesœ:[œTextœ],œtypeœ:œstrœ}"
|
||||||
"baseClasses": [
|
},
|
||||||
"object",
|
{
|
||||||
"str",
|
"source": "ChatInput-P3fgL",
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"dataType": "Prompt",
|
|
||||||
"id": "Prompt-uxBqP"
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"style": {
|
|
||||||
"stroke": "#555"
|
|
||||||
},
|
|
||||||
"className": "stroke-gray-900 stroke-connection",
|
|
||||||
"id": "reactflow__edge-Prompt-uxBqP{œbaseClassesœ:[œobjectœ,œstrœ,œTextœ],œdataTypeœ:œPromptœ,œidœ:œPrompt-uxBqPœ}-OpenAIModel-k39HS{œfieldNameœ:œinput_valueœ,œidœ:œOpenAIModel-k39HSœ,œinputTypesœ:[œTextœ],œtypeœ:œstrœ}"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"source": "ChatInput-P3fgL",
|
|
||||||
<<<<<<< HEAD
|
|
||||||
"sourceHandle": "{\"dataType\": \"ChatInput\", \"id\": \"ChatInput-P3fgL\", \"output_types\": [\"Text\"], \"name\": \"message\"}",
|
"sourceHandle": "{\"dataType\": \"ChatInput\", \"id\": \"ChatInput-P3fgL\", \"output_types\": [\"Text\"], \"name\": \"message\"}",
|
||||||
=======
|
|
||||||
"sourceHandle": "{œbaseClassesœ:[œobjectœ,œRecordœ,œstrœ,œTextœ],œdataTypeœ:œChatInputœ,œidœ:œChatInput-P3fgLœ}",
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"target": "Prompt-uxBqP",
|
"target": "Prompt-uxBqP",
|
||||||
"targetHandle": "{œfieldNameœ:œuser_inputœ,œidœ:œPrompt-uxBqPœ,œinputTypesœ:[œDocumentœ,œBaseOutputParserœ,œRecordœ,œTextœ],œtypeœ:œstrœ}",
|
"targetHandle": "{œfieldNameœ:œuser_inputœ,œidœ:œPrompt-uxBqPœ,œinputTypesœ:[œDocumentœ,œBaseOutputParserœ,œRecordœ,œTextœ],œtypeœ:œstrœ}",
|
||||||
"data": {
|
"data": {
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "user_input",
|
"fieldName": "user_input",
|
||||||
"id": "Prompt-uxBqP",
|
"id": "Prompt-uxBqP",
|
||||||
<<<<<<< HEAD
|
|
||||||
"inputTypes": [
|
"inputTypes": [
|
||||||
"Document",
|
"Document",
|
||||||
"BaseOutputParser",
|
"BaseOutputParser",
|
||||||
|
|
@ -1199,54 +879,31 @@
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
"type": "str"
|
"type": "str"
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"dataType": "ChatInput",
|
"dataType": "ChatInput",
|
||||||
"id": "ChatInput-P3fgL",
|
"id": "ChatInput-P3fgL",
|
||||||
"output_types": [
|
"output_types": [
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
"name": "message"
|
"name": "message"
|
||||||
=======
|
}
|
||||||
"inputTypes": [
|
},
|
||||||
"Document",
|
"style": {
|
||||||
"BaseOutputParser",
|
"stroke": "#555"
|
||||||
"Record",
|
},
|
||||||
"Text"
|
"className": "stroke-gray-900 stroke-connection",
|
||||||
|
"id": "reactflow__edge-ChatInput-P3fgL{œbaseClassesœ:[œobjectœ,œRecordœ,œstrœ,œTextœ],œdataTypeœ:œChatInputœ,œidœ:œChatInput-P3fgLœ}-Prompt-uxBqP{œfieldNameœ:œuser_inputœ,œidœ:œPrompt-uxBqPœ,œinputTypesœ:[œDocumentœ,œBaseOutputParserœ,œRecordœ,œTextœ],œtypeœ:œstrœ}"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"type": "str"
|
"viewport": {
|
||||||
},
|
"x": 260.58251815500563,
|
||||||
"sourceHandle": {
|
"y": 318.2261172111936,
|
||||||
"baseClasses": [
|
"zoom": 0.43514115784696294
|
||||||
"object",
|
}
|
||||||
"Record",
|
},
|
||||||
"str",
|
"description": "This flow will get you experimenting with the basics of the UI, the Chat and the Prompt component. \n\nTry changing the Template in it to see how the model behaves. \nYou can change it to this and a Text Input into the `type_of_person` variable : \"Answer the user as if you were a pirate.\n\nUser: {user_input}\n\nAnswer: \" ",
|
||||||
"Text"
|
"name": "Basic Prompting (Hello, World)",
|
||||||
],
|
"last_tested_version": "1.0.0a4",
|
||||||
"dataType": "ChatInput",
|
"is_component": false
|
||||||
"id": "ChatInput-P3fgL"
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"style": {
|
|
||||||
"stroke": "#555"
|
|
||||||
},
|
|
||||||
"className": "stroke-gray-900 stroke-connection",
|
|
||||||
"id": "reactflow__edge-ChatInput-P3fgL{œbaseClassesœ:[œobjectœ,œRecordœ,œstrœ,œTextœ],œdataTypeœ:œChatInputœ,œidœ:œChatInput-P3fgLœ}-Prompt-uxBqP{œfieldNameœ:œuser_inputœ,œidœ:œPrompt-uxBqPœ,œinputTypesœ:[œDocumentœ,œBaseOutputParserœ,œRecordœ,œTextœ],œtypeœ:œstrœ}"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"viewport": {
|
|
||||||
"x": 260.58251815500563,
|
|
||||||
"y": 318.2261172111936,
|
|
||||||
"zoom": 0.43514115784696294
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"description": "This flow will get you experimenting with the basics of the UI, the Chat and the Prompt component. \n\nTry changing the Template in it to see how the model behaves. \nYou can change it to this and a Text Input into the `type_of_person` variable : \"Answer the user as if you were a pirate.\n\nUser: {user_input}\n\nAnswer: \" ",
|
|
||||||
"name": "Basic Prompting (Hello, World)",
|
|
||||||
"last_tested_version": "1.0.0a4",
|
|
||||||
"is_component": false
|
|
||||||
<<<<<<< HEAD
|
|
||||||
}
|
|
||||||
=======
|
|
||||||
}
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
|
|
|
||||||
|
|
@ -20,11 +20,7 @@
|
||||||
"list": false,
|
"list": false,
|
||||||
"show": true,
|
"show": true,
|
||||||
"multiline": true,
|
"multiline": true,
|
||||||
<<<<<<< HEAD
|
|
||||||
"value": "from langchain_core.prompts import PromptTemplate\n\nfrom langflow.custom import CustomComponent\nfrom langflow.field_typing import Input, Prompt, Text\n\n\nclass PromptComponent(CustomComponent):\n display_name: str = \"Prompt\"\n description: str = \"Create a prompt template with dynamic variables.\"\n icon = \"prompts\"\n\n def build_config(self):\n return {\n \"template\": Input(display_name=\"Template\"),\n \"code\": Input(advanced=True),\n }\n\n def build(\n self,\n template: Prompt,\n **kwargs,\n ) -> Text:\n from langflow.base.prompts.utils import dict_values_to_string\n\n prompt_template = PromptTemplate.from_template(Text(template))\n kwargs = dict_values_to_string(kwargs)\n kwargs = {k: \"\\n\".join(v) if isinstance(v, list) else v for k, v in kwargs.items()}\n try:\n formated_prompt = prompt_template.format(**kwargs)\n except Exception as exc:\n raise ValueError(f\"Error formatting prompt: {exc}\") from exc\n self.status = f'Prompt:\\n\"{formated_prompt}\"'\n return formated_prompt\n",
|
"value": "from langchain_core.prompts import PromptTemplate\n\nfrom langflow.custom import CustomComponent\nfrom langflow.field_typing import Input, Prompt, Text\n\n\nclass PromptComponent(CustomComponent):\n display_name: str = \"Prompt\"\n description: str = \"Create a prompt template with dynamic variables.\"\n icon = \"prompts\"\n\n def build_config(self):\n return {\n \"template\": Input(display_name=\"Template\"),\n \"code\": Input(advanced=True),\n }\n\n def build(\n self,\n template: Prompt,\n **kwargs,\n ) -> Text:\n from langflow.base.prompts.utils import dict_values_to_string\n\n prompt_template = PromptTemplate.from_template(Text(template))\n kwargs = dict_values_to_string(kwargs)\n kwargs = {k: \"\\n\".join(v) if isinstance(v, list) else v for k, v in kwargs.items()}\n try:\n formated_prompt = prompt_template.format(**kwargs)\n except Exception as exc:\n raise ValueError(f\"Error formatting prompt: {exc}\") from exc\n self.status = f'Prompt:\\n\"{formated_prompt}\"'\n return formated_prompt\n",
|
||||||
=======
|
|
||||||
"value": "from langchain_core.prompts import PromptTemplate\n\nfrom langflow.custom import CustomComponent\nfrom langflow.field_typing import Prompt, TemplateField, Text\n\n\nclass PromptComponent(CustomComponent):\n display_name: str = \"Prompt\"\n description: str = \"Create a prompt template with dynamic variables.\"\n icon = \"prompts\"\n\n def build_config(self):\n return {\n \"template\": TemplateField(display_name=\"Template\"),\n \"code\": TemplateField(advanced=True),\n }\n\n def build(\n self,\n template: Prompt,\n **kwargs,\n ) -> Text:\n from langflow.base.prompts.utils import dict_values_to_string\n\n prompt_template = PromptTemplate.from_template(Text(template))\n kwargs = dict_values_to_string(kwargs)\n kwargs = {k: \"\\n\".join(v) if isinstance(v, list) else v for k, v in kwargs.items()}\n try:\n formated_prompt = prompt_template.format(**kwargs)\n except Exception as exc:\n raise ValueError(f\"Error formatting prompt: {exc}\") from exc\n self.status = f'Prompt:\\n\"{formated_prompt}\"'\n return formated_prompt\n",
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
|
|
@ -49,13 +45,9 @@
|
||||||
"name": "template",
|
"name": "template",
|
||||||
"display_name": "Template",
|
"display_name": "Template",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
=======
|
|
||||||
"input_types": ["Text"],
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
|
|
@ -146,20 +138,15 @@
|
||||||
"is_input": null,
|
"is_input": null,
|
||||||
"is_output": null,
|
"is_output": null,
|
||||||
"is_composition": null,
|
"is_composition": null,
|
||||||
<<<<<<< HEAD
|
|
||||||
"base_classes": [
|
"base_classes": [
|
||||||
"object",
|
"object",
|
||||||
"Text",
|
"Text",
|
||||||
"str"
|
"str"
|
||||||
],
|
],
|
||||||
=======
|
|
||||||
"base_classes": ["object", "Text", "str"],
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"name": "",
|
"name": "",
|
||||||
"display_name": "Prompt",
|
"display_name": "Prompt",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
<<<<<<< HEAD
|
|
||||||
"template": [
|
"template": [
|
||||||
"reference_1",
|
"reference_1",
|
||||||
"reference_2",
|
"reference_2",
|
||||||
|
|
@ -169,17 +156,11 @@
|
||||||
"output_types": [
|
"output_types": [
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
=======
|
|
||||||
"template": ["reference_1", "reference_2", "instructions"]
|
|
||||||
},
|
|
||||||
"output_types": ["Text"],
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"full_path": null,
|
"full_path": null,
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [],
|
"field_order": [],
|
||||||
"beta": false,
|
"beta": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"error": null,
|
"error": null,
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
|
|
@ -192,9 +173,6 @@
|
||||||
"method": null
|
"method": null
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"error": null
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"id": "Prompt-Rse03",
|
"id": "Prompt-Rse03",
|
||||||
"description": "Create a prompt template with dynamic variables.",
|
"description": "Create a prompt template with dynamic variables.",
|
||||||
|
|
@ -255,13 +233,9 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
=======
|
|
||||||
"input_types": ["Text"],
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"value": [
|
"value": [
|
||||||
"https://www.promptingguide.ai/techniques/prompt_chaining"
|
"https://www.promptingguide.ai/techniques/prompt_chaining"
|
||||||
]
|
]
|
||||||
|
|
@ -270,19 +244,14 @@
|
||||||
},
|
},
|
||||||
"description": "Fetch content from one or more URLs.",
|
"description": "Fetch content from one or more URLs.",
|
||||||
"icon": "layout-template",
|
"icon": "layout-template",
|
||||||
<<<<<<< HEAD
|
|
||||||
"base_classes": [
|
"base_classes": [
|
||||||
"Record"
|
"Record"
|
||||||
],
|
],
|
||||||
=======
|
|
||||||
"base_classes": ["Record"],
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"display_name": "URL",
|
"display_name": "URL",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
"urls": null
|
"urls": null
|
||||||
},
|
},
|
||||||
<<<<<<< HEAD
|
|
||||||
"output_types": [
|
"output_types": [
|
||||||
"Record"
|
"Record"
|
||||||
],
|
],
|
||||||
|
|
@ -301,13 +270,6 @@
|
||||||
"method": null
|
"method": null
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"output_types": ["Record"],
|
|
||||||
"field_formatters": {},
|
|
||||||
"frozen": false,
|
|
||||||
"field_order": [],
|
|
||||||
"beta": false
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"id": "URL-HYPkR"
|
"id": "URL-HYPkR"
|
||||||
},
|
},
|
||||||
|
|
@ -338,11 +300,7 @@
|
||||||
"list": false,
|
"list": false,
|
||||||
"show": true,
|
"show": true,
|
||||||
"multiline": true,
|
"multiline": true,
|
||||||
<<<<<<< HEAD
|
|
||||||
"value": "from langflow.base.io.chat import ChatComponent\nfrom langflow.field_typing import Text\nfrom langflow.schema import Record\nfrom langflow.template import Input, Output\n\n\nclass ChatOutput(ChatComponent):\n display_name = \"Chat Output\"\n description = \"Display a chat message in the Playground.\"\n icon = \"ChatOutput\"\n\n inputs = [\n Input(\n name=\"input_value\", type=str, display_name=\"Message\", multiline=True, info=\"Message to be passed as output.\"\n ),\n Input(\n name=\"sender\",\n type=str,\n display_name=\"Sender Type\",\n options=[\"Machine\", \"User\"],\n value=\"Machine\",\n advanced=True,\n info=\"Type of sender.\",\n ),\n Input(name=\"sender_name\", type=str, display_name=\"Sender Name\", info=\"Name of the sender.\", value=\"AI\"),\n Input(\n name=\"session_id\", type=str, display_name=\"Session ID\", info=\"Session ID for the message.\", advanced=True\n ),\n Input(\n name=\"record_template\",\n type=str,\n display_name=\"Record Template\",\n value=\"{text}\",\n advanced=True,\n info=\"Template to convert Record to Text. If left empty, it will be dynamically set to the Record's text key.\",\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"text_response\"),\n Output(display_name=\"Record\", name=\"record\", method=\"record_response\"),\n ]\n\n def text_response(self) -> Text:\n result = self.input_value\n if self.session_id and isinstance(result, (Record, str)):\n self.store_message(result, self.session_id, self.sender, self.sender_name)\n return result\n\n def record_response(self) -> Record:\n record = Record(\n data={\n \"message\": self.input_value,\n \"sender\": self.sender,\n \"sender_name\": self.sender_name,\n \"session_id\": self.session_id,\n \"template\": self.record_template or \"\",\n }\n )\n if self.session_id and isinstance(record, (Record, str)):\n self.store_message(record, self.session_id, self.sender, self.sender_name)\n return record\n",
|
"value": "from langflow.base.io.chat import ChatComponent\nfrom langflow.field_typing import Text\nfrom langflow.schema import Record\nfrom langflow.template import Input, Output\n\n\nclass ChatOutput(ChatComponent):\n display_name = \"Chat Output\"\n description = \"Display a chat message in the Playground.\"\n icon = \"ChatOutput\"\n\n inputs = [\n Input(\n name=\"input_value\", type=str, display_name=\"Message\", multiline=True, info=\"Message to be passed as output.\"\n ),\n Input(\n name=\"sender\",\n type=str,\n display_name=\"Sender Type\",\n options=[\"Machine\", \"User\"],\n value=\"Machine\",\n advanced=True,\n info=\"Type of sender.\",\n ),\n Input(name=\"sender_name\", type=str, display_name=\"Sender Name\", info=\"Name of the sender.\", value=\"AI\"),\n Input(\n name=\"session_id\", type=str, display_name=\"Session ID\", info=\"Session ID for the message.\", advanced=True\n ),\n Input(\n name=\"record_template\",\n type=str,\n display_name=\"Record Template\",\n value=\"{text}\",\n advanced=True,\n info=\"Template to convert Record to Text. If left empty, it will be dynamically set to the Record's text key.\",\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"text_response\"),\n Output(display_name=\"Record\", name=\"record\", method=\"record_response\"),\n ]\n\n def text_response(self) -> Text:\n result = self.input_value\n if self.session_id and isinstance(result, (Record, str)):\n self.store_message(result, self.session_id, self.sender, self.sender_name)\n return result\n\n def record_response(self) -> Record:\n record = Record(\n data={\n \"message\": self.input_value,\n \"sender\": self.sender,\n \"sender_name\": self.sender_name,\n \"session_id\": self.session_id,\n \"template\": self.record_template or \"\",\n }\n )\n if self.session_id and isinstance(record, (Record, str)):\n self.store_message(record, self.session_id, self.sender, self.sender_name)\n return record\n",
|
||||||
=======
|
|
||||||
"value": "from typing import Optional, Union\n\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.field_typing import Text\nfrom langflow.schema import Record\n\n\nclass ChatOutput(ChatComponent):\n display_name = \"Chat Output\"\n description = \"Display a chat message in the Playground.\"\n icon = \"ChatOutput\"\n\n def build(\n self,\n sender: Optional[str] = \"Machine\",\n sender_name: Optional[str] = \"AI\",\n input_value: Optional[str] = None,\n session_id: Optional[str] = None,\n return_record: Optional[bool] = False,\n record_template: Optional[str] = \"{text}\",\n ) -> Union[Text, Record]:\n return super().build_with_record(\n sender=sender,\n sender_name=sender_name,\n input_value=input_value,\n session_id=session_id,\n return_record=return_record,\n record_template=record_template or \"\",\n )\n",
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
|
|
@ -360,17 +318,13 @@
|
||||||
"list": false,
|
"list": false,
|
||||||
"show": true,
|
"show": true,
|
||||||
"multiline": true,
|
"multiline": true,
|
||||||
<<<<<<< HEAD
|
|
||||||
"value": "",
|
"value": "",
|
||||||
=======
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
"name": "input_value",
|
"name": "input_value",
|
||||||
"display_name": "Message",
|
"display_name": "Message",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "Message to be passed as output.",
|
"info": "Message to be passed as output.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
|
|
@ -378,13 +332,6 @@
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"input_types": ["Text"],
|
|
||||||
"dynamic": false,
|
|
||||||
"info": "",
|
|
||||||
"load_from_db": false,
|
|
||||||
"title_case": false
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"record_template": {
|
"record_template": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -392,13 +339,8 @@
|
||||||
"placeholder": "",
|
"placeholder": "",
|
||||||
"list": false,
|
"list": false,
|
||||||
"show": true,
|
"show": true,
|
||||||
<<<<<<< HEAD
|
|
||||||
"multiline": false,
|
"multiline": false,
|
||||||
"value": "",
|
"value": "",
|
||||||
=======
|
|
||||||
"multiline": true,
|
|
||||||
"value": "{text}",
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
|
|
@ -406,38 +348,12 @@
|
||||||
"display_name": "Record Template",
|
"display_name": "Record Template",
|
||||||
"advanced": true,
|
"advanced": true,
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"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.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"info": "In case of Message being a Record, this template will be used to convert it to text.",
|
|
||||||
"load_from_db": false,
|
|
||||||
"title_case": false,
|
|
||||||
"input_types": ["Text"]
|
|
||||||
},
|
|
||||||
"return_record": {
|
|
||||||
"type": "bool",
|
|
||||||
"required": false,
|
|
||||||
"placeholder": "",
|
|
||||||
"list": false,
|
|
||||||
"show": true,
|
|
||||||
"multiline": false,
|
|
||||||
"value": false,
|
|
||||||
"fileTypes": [],
|
|
||||||
"file_path": "",
|
|
||||||
"password": false,
|
|
||||||
"name": "return_record",
|
|
||||||
"display_name": "Return Record",
|
|
||||||
"advanced": true,
|
|
||||||
"dynamic": false,
|
|
||||||
"info": "Return the message as a record containing the sender, sender_name, and session_id.",
|
|
||||||
"load_from_db": false,
|
|
||||||
"title_case": false
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"sender": {
|
"sender": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -446,7 +362,6 @@
|
||||||
"list": true,
|
"list": true,
|
||||||
"show": true,
|
"show": true,
|
||||||
"multiline": false,
|
"multiline": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"value": "",
|
"value": "",
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
|
|
@ -455,30 +370,16 @@
|
||||||
"Machine",
|
"Machine",
|
||||||
"User"
|
"User"
|
||||||
],
|
],
|
||||||
=======
|
|
||||||
"value": "Machine",
|
|
||||||
"fileTypes": [],
|
|
||||||
"file_path": "",
|
|
||||||
"password": false,
|
|
||||||
"options": ["Machine", "User"],
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"name": "sender",
|
"name": "sender",
|
||||||
"display_name": "Sender Type",
|
"display_name": "Sender Type",
|
||||||
"advanced": true,
|
"advanced": true,
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"info": "Type of sender.",
|
"info": "Type of sender.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"info": "",
|
|
||||||
"load_from_db": false,
|
|
||||||
"title_case": false,
|
|
||||||
"input_types": ["Text"]
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"sender_name": {
|
"sender_name": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -487,11 +388,7 @@
|
||||||
"list": false,
|
"list": false,
|
||||||
"show": true,
|
"show": true,
|
||||||
"multiline": false,
|
"multiline": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"value": "",
|
"value": "",
|
||||||
=======
|
|
||||||
"value": "AI",
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
|
|
@ -499,19 +396,12 @@
|
||||||
"display_name": "Sender Name",
|
"display_name": "Sender Name",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"info": "Name of the sender.",
|
"info": "Name of the sender.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"info": "",
|
|
||||||
"load_from_db": false,
|
|
||||||
"title_case": false,
|
|
||||||
"input_types": ["Text"]
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"session_id": {
|
"session_id": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -520,10 +410,7 @@
|
||||||
"list": false,
|
"list": false,
|
||||||
"show": true,
|
"show": true,
|
||||||
"multiline": false,
|
"multiline": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"value": "",
|
"value": "",
|
||||||
=======
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
|
|
@ -531,7 +418,6 @@
|
||||||
"display_name": "Session ID",
|
"display_name": "Session ID",
|
||||||
"advanced": true,
|
"advanced": true,
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"info": "Session ID for the message.",
|
"info": "Session ID for the message.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
|
|
@ -549,18 +435,6 @@
|
||||||
"object",
|
"object",
|
||||||
"str"
|
"str"
|
||||||
],
|
],
|
||||||
=======
|
|
||||||
"info": "If provided, the message will be stored in the memory.",
|
|
||||||
"load_from_db": false,
|
|
||||||
"title_case": false,
|
|
||||||
"input_types": ["Text"]
|
|
||||||
},
|
|
||||||
"_type": "CustomComponent"
|
|
||||||
},
|
|
||||||
"description": "Display a chat message in the Playground.",
|
|
||||||
"icon": "ChatOutput",
|
|
||||||
"base_classes": ["Text", "Record", "object", "str"],
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"display_name": "Chat Output",
|
"display_name": "Chat Output",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
|
|
@ -571,7 +445,6 @@
|
||||||
"return_record": null,
|
"return_record": null,
|
||||||
"record_template": null
|
"record_template": null
|
||||||
},
|
},
|
||||||
<<<<<<< HEAD
|
|
||||||
"output_types": [
|
"output_types": [
|
||||||
"Text",
|
"Text",
|
||||||
"Record"
|
"Record"
|
||||||
|
|
@ -600,13 +473,6 @@
|
||||||
"method": "record_response"
|
"method": "record_response"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"output_types": ["Text", "Record"],
|
|
||||||
"field_formatters": {},
|
|
||||||
"frozen": false,
|
|
||||||
"field_order": [],
|
|
||||||
"beta": false
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"id": "ChatOutput-JPlxl"
|
"id": "ChatOutput-JPlxl"
|
||||||
},
|
},
|
||||||
|
|
@ -642,13 +508,9 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"input_types": ["Text"]
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"code": {
|
"code": {
|
||||||
"type": "code",
|
"type": "code",
|
||||||
|
|
@ -731,13 +593,9 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"input_types": ["Text"]
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"openai_api_base": {
|
"openai_api_base": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -756,13 +614,9 @@
|
||||||
"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.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"input_types": ["Text"]
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"openai_api_key": {
|
"openai_api_key": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -781,13 +635,9 @@
|
||||||
"info": "The OpenAI API Key to use for the OpenAI model.",
|
"info": "The OpenAI API Key to use for the OpenAI model.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
=======
|
|
||||||
"input_types": ["Text"],
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"value": "OPENAI_API_KEY"
|
"value": "OPENAI_API_KEY"
|
||||||
},
|
},
|
||||||
"stream": {
|
"stream": {
|
||||||
|
|
@ -826,13 +676,9 @@
|
||||||
"info": "System message to pass to the model.",
|
"info": "System message to pass to the model.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"input_types": ["Text"]
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"temperature": {
|
"temperature": {
|
||||||
"type": "float",
|
"type": "float",
|
||||||
|
|
@ -863,15 +709,11 @@
|
||||||
},
|
},
|
||||||
"description": "Generates text using OpenAI LLMs.",
|
"description": "Generates text using OpenAI LLMs.",
|
||||||
"icon": "OpenAI",
|
"icon": "OpenAI",
|
||||||
<<<<<<< HEAD
|
|
||||||
"base_classes": [
|
"base_classes": [
|
||||||
"str",
|
"str",
|
||||||
"Text",
|
"Text",
|
||||||
"object"
|
"object"
|
||||||
],
|
],
|
||||||
=======
|
|
||||||
"base_classes": ["str", "Text", "object"],
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"display_name": "OpenAI",
|
"display_name": "OpenAI",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
|
|
@ -885,13 +727,9 @@
|
||||||
"stream": null,
|
"stream": null,
|
||||||
"system_message": null
|
"system_message": null
|
||||||
},
|
},
|
||||||
<<<<<<< HEAD
|
|
||||||
"output_types": [
|
"output_types": [
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
=======
|
|
||||||
"output_types": ["Text"],
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [
|
"field_order": [
|
||||||
|
|
@ -905,7 +743,6 @@
|
||||||
"system_message",
|
"system_message",
|
||||||
"stream"
|
"stream"
|
||||||
],
|
],
|
||||||
<<<<<<< HEAD
|
|
||||||
"beta": false,
|
"beta": false,
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
|
|
@ -918,9 +755,6 @@
|
||||||
"method": null
|
"method": null
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"beta": false
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"id": "OpenAIModel-gi29P"
|
"id": "OpenAIModel-gi29P"
|
||||||
},
|
},
|
||||||
|
|
@ -979,35 +813,25 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
"value": [
|
"value": [
|
||||||
"https://www.promptingguide.ai/introduction/basics"
|
"https://www.promptingguide.ai/introduction/basics"
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"input_types": ["Text"],
|
|
||||||
"value": ["https://www.promptingguide.ai/introduction/basics"]
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"_type": "CustomComponent"
|
"_type": "CustomComponent"
|
||||||
},
|
},
|
||||||
"description": "Fetch content from one or more URLs.",
|
"description": "Fetch content from one or more URLs.",
|
||||||
"icon": "layout-template",
|
"icon": "layout-template",
|
||||||
<<<<<<< HEAD
|
|
||||||
"base_classes": [
|
"base_classes": [
|
||||||
"Record"
|
"Record"
|
||||||
],
|
],
|
||||||
=======
|
|
||||||
"base_classes": ["Record"],
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"display_name": "URL",
|
"display_name": "URL",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
"urls": null
|
"urls": null
|
||||||
},
|
},
|
||||||
<<<<<<< HEAD
|
|
||||||
"output_types": [
|
"output_types": [
|
||||||
"Record"
|
"Record"
|
||||||
],
|
],
|
||||||
|
|
@ -1026,13 +850,6 @@
|
||||||
"method": null
|
"method": null
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"output_types": ["Record"],
|
|
||||||
"field_formatters": {},
|
|
||||||
"frozen": false,
|
|
||||||
"field_order": [],
|
|
||||||
"beta": false
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"id": "URL-2cX90"
|
"id": "URL-2cX90"
|
||||||
},
|
},
|
||||||
|
|
@ -1088,14 +905,10 @@
|
||||||
"name": "input_value",
|
"name": "input_value",
|
||||||
"display_name": "Value",
|
"display_name": "Value",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Record",
|
"Record",
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
=======
|
|
||||||
"input_types": ["Record", "Text"],
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "Text or Record to be passed as input.",
|
"info": "Text or Record to be passed as input.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
|
|
@ -1119,34 +932,25 @@
|
||||||
"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.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"input_types": ["Text"]
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"_type": "CustomComponent"
|
"_type": "CustomComponent"
|
||||||
},
|
},
|
||||||
"description": "Get text inputs from the Playground.",
|
"description": "Get text inputs from the Playground.",
|
||||||
"icon": "type",
|
"icon": "type",
|
||||||
<<<<<<< HEAD
|
|
||||||
"base_classes": [
|
"base_classes": [
|
||||||
"object",
|
"object",
|
||||||
"Text",
|
"Text",
|
||||||
"str"
|
"str"
|
||||||
],
|
],
|
||||||
=======
|
|
||||||
"base_classes": ["object", "Text", "str"],
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"display_name": "Instructions",
|
"display_name": "Instructions",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
"input_value": null,
|
"input_value": null,
|
||||||
"record_template": null
|
"record_template": null
|
||||||
},
|
},
|
||||||
<<<<<<< HEAD
|
|
||||||
"output_types": [
|
"output_types": [
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
|
|
@ -1163,13 +967,6 @@
|
||||||
"name": "Text"
|
"name": "Text"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"output_types": ["Text"],
|
|
||||||
"field_formatters": {},
|
|
||||||
"frozen": false,
|
|
||||||
"field_order": [],
|
|
||||||
"beta": false
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"id": "TextInput-og8Or"
|
"id": "TextInput-og8Or"
|
||||||
},
|
},
|
||||||
|
|
@ -1187,18 +984,13 @@
|
||||||
{
|
{
|
||||||
"source": "URL-HYPkR",
|
"source": "URL-HYPkR",
|
||||||
"target": "Prompt-Rse03",
|
"target": "Prompt-Rse03",
|
||||||
<<<<<<< HEAD
|
|
||||||
"sourceHandle": "{\"dataType\": \"URL\", \"id\": \"URL-HYPkR\", \"output_types\": [\"Record\"], \"name\": \"Record\"}",
|
"sourceHandle": "{\"dataType\": \"URL\", \"id\": \"URL-HYPkR\", \"output_types\": [\"Record\"], \"name\": \"Record\"}",
|
||||||
=======
|
|
||||||
"sourceHandle": "{œbaseClassesœ:[œRecordœ],œdataTypeœ:œURLœ,œidœ:œURL-HYPkRœ}",
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"targetHandle": "{œfieldNameœ:œreference_2œ,œidœ:œPrompt-Rse03œ,œinputTypesœ:[œDocumentœ,œBaseOutputParserœ,œRecordœ,œTextœ],œtypeœ:œstrœ}",
|
"targetHandle": "{œfieldNameœ:œreference_2œ,œidœ:œPrompt-Rse03œ,œinputTypesœ:[œDocumentœ,œBaseOutputParserœ,œRecordœ,œTextœ],œtypeœ:œstrœ}",
|
||||||
"id": "reactflow__edge-URL-HYPkR{œbaseClassesœ:[œRecordœ],œdataTypeœ:œURLœ,œidœ:œURL-HYPkRœ}-Prompt-Rse03{œfieldNameœ:œreference_2œ,œidœ:œPrompt-Rse03œ,œinputTypesœ:[œDocumentœ,œBaseOutputParserœ,œRecordœ,œTextœ],œtypeœ:œstrœ}",
|
"id": "reactflow__edge-URL-HYPkR{œbaseClassesœ:[œRecordœ],œdataTypeœ:œURLœ,œidœ:œURL-HYPkRœ}-Prompt-Rse03{œfieldNameœ:œreference_2œ,œidœ:œPrompt-Rse03œ,œinputTypesœ:[œDocumentœ,œBaseOutputParserœ,œRecordœ,œTextœ],œtypeœ:œstrœ}",
|
||||||
"data": {
|
"data": {
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "reference_2",
|
"fieldName": "reference_2",
|
||||||
"id": "Prompt-Rse03",
|
"id": "Prompt-Rse03",
|
||||||
<<<<<<< HEAD
|
|
||||||
"inputTypes": [
|
"inputTypes": [
|
||||||
"Document",
|
"Document",
|
||||||
"BaseOutputParser",
|
"BaseOutputParser",
|
||||||
|
|
@ -1214,15 +1006,6 @@
|
||||||
"Record"
|
"Record"
|
||||||
],
|
],
|
||||||
"name": "Record"
|
"name": "Record"
|
||||||
=======
|
|
||||||
"inputTypes": ["Document", "BaseOutputParser", "Record", "Text"],
|
|
||||||
"type": "str"
|
|
||||||
},
|
|
||||||
"sourceHandle": {
|
|
||||||
"baseClasses": ["Record"],
|
|
||||||
"dataType": "URL",
|
|
||||||
"id": "URL-HYPkR"
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"style": {
|
"style": {
|
||||||
|
|
@ -1233,18 +1016,13 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "OpenAIModel-gi29P",
|
"source": "OpenAIModel-gi29P",
|
||||||
<<<<<<< HEAD
|
|
||||||
"sourceHandle": "{\"dataType\": \"OpenAIModel\", \"id\": \"OpenAIModel-gi29P\", \"output_types\": [\"Text\"], \"name\": \"Text\"}",
|
"sourceHandle": "{\"dataType\": \"OpenAIModel\", \"id\": \"OpenAIModel-gi29P\", \"output_types\": [\"Text\"], \"name\": \"Text\"}",
|
||||||
=======
|
|
||||||
"sourceHandle": "{œbaseClassesœ:[œstrœ,œTextœ,œobjectœ],œdataTypeœ:œOpenAIModelœ,œidœ:œOpenAIModel-gi29Pœ}",
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"target": "ChatOutput-JPlxl",
|
"target": "ChatOutput-JPlxl",
|
||||||
"targetHandle": "{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-JPlxlœ,œinputTypesœ:[œTextœ],œtypeœ:œstrœ}",
|
"targetHandle": "{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-JPlxlœ,œinputTypesœ:[œTextœ],œtypeœ:œstrœ}",
|
||||||
"data": {
|
"data": {
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "input_value",
|
"fieldName": "input_value",
|
||||||
"id": "ChatOutput-JPlxl",
|
"id": "ChatOutput-JPlxl",
|
||||||
<<<<<<< HEAD
|
|
||||||
"inputTypes": [
|
"inputTypes": [
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
|
|
@ -1257,15 +1035,6 @@
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
"name": "Text"
|
"name": "Text"
|
||||||
=======
|
|
||||||
"inputTypes": ["Text"],
|
|
||||||
"type": "str"
|
|
||||||
},
|
|
||||||
"sourceHandle": {
|
|
||||||
"baseClasses": ["str", "Text", "object"],
|
|
||||||
"dataType": "OpenAIModel",
|
|
||||||
"id": "OpenAIModel-gi29P"
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"style": {
|
"style": {
|
||||||
|
|
@ -1276,18 +1045,13 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "URL-2cX90",
|
"source": "URL-2cX90",
|
||||||
<<<<<<< HEAD
|
|
||||||
"sourceHandle": "{\"dataType\": \"URL\", \"id\": \"URL-2cX90\", \"output_types\": [\"Record\"], \"name\": \"Record\"}",
|
"sourceHandle": "{\"dataType\": \"URL\", \"id\": \"URL-2cX90\", \"output_types\": [\"Record\"], \"name\": \"Record\"}",
|
||||||
=======
|
|
||||||
"sourceHandle": "{œbaseClassesœ:[œRecordœ],œdataTypeœ:œURLœ,œidœ:œURL-2cX90œ}",
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"target": "Prompt-Rse03",
|
"target": "Prompt-Rse03",
|
||||||
"targetHandle": "{œfieldNameœ:œreference_1œ,œidœ:œPrompt-Rse03œ,œinputTypesœ:[œDocumentœ,œBaseOutputParserœ,œRecordœ,œTextœ],œtypeœ:œstrœ}",
|
"targetHandle": "{œfieldNameœ:œreference_1œ,œidœ:œPrompt-Rse03œ,œinputTypesœ:[œDocumentœ,œBaseOutputParserœ,œRecordœ,œTextœ],œtypeœ:œstrœ}",
|
||||||
"data": {
|
"data": {
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "reference_1",
|
"fieldName": "reference_1",
|
||||||
"id": "Prompt-Rse03",
|
"id": "Prompt-Rse03",
|
||||||
<<<<<<< HEAD
|
|
||||||
"inputTypes": [
|
"inputTypes": [
|
||||||
"Document",
|
"Document",
|
||||||
"BaseOutputParser",
|
"BaseOutputParser",
|
||||||
|
|
@ -1303,15 +1067,6 @@
|
||||||
"Record"
|
"Record"
|
||||||
],
|
],
|
||||||
"name": "Record"
|
"name": "Record"
|
||||||
=======
|
|
||||||
"inputTypes": ["Document", "BaseOutputParser", "Record", "Text"],
|
|
||||||
"type": "str"
|
|
||||||
},
|
|
||||||
"sourceHandle": {
|
|
||||||
"baseClasses": ["Record"],
|
|
||||||
"dataType": "URL",
|
|
||||||
"id": "URL-2cX90"
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"style": {
|
"style": {
|
||||||
|
|
@ -1322,18 +1077,13 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "TextInput-og8Or",
|
"source": "TextInput-og8Or",
|
||||||
<<<<<<< HEAD
|
|
||||||
"sourceHandle": "{\"dataType\": \"TextInput\", \"id\": \"TextInput-og8Or\", \"output_types\": [\"Text\"], \"name\": \"Text\"}",
|
"sourceHandle": "{\"dataType\": \"TextInput\", \"id\": \"TextInput-og8Or\", \"output_types\": [\"Text\"], \"name\": \"Text\"}",
|
||||||
=======
|
|
||||||
"sourceHandle": "{œbaseClassesœ:[œobjectœ,œTextœ,œstrœ],œdataTypeœ:œTextInputœ,œidœ:œTextInput-og8Orœ}",
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"target": "Prompt-Rse03",
|
"target": "Prompt-Rse03",
|
||||||
"targetHandle": "{œfieldNameœ:œinstructionsœ,œidœ:œPrompt-Rse03œ,œinputTypesœ:[œDocumentœ,œBaseOutputParserœ,œRecordœ,œTextœ],œtypeœ:œstrœ}",
|
"targetHandle": "{œfieldNameœ:œinstructionsœ,œidœ:œPrompt-Rse03œ,œinputTypesœ:[œDocumentœ,œBaseOutputParserœ,œRecordœ,œTextœ],œtypeœ:œstrœ}",
|
||||||
"data": {
|
"data": {
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "instructions",
|
"fieldName": "instructions",
|
||||||
"id": "Prompt-Rse03",
|
"id": "Prompt-Rse03",
|
||||||
<<<<<<< HEAD
|
|
||||||
"inputTypes": [
|
"inputTypes": [
|
||||||
"Document",
|
"Document",
|
||||||
"BaseOutputParser",
|
"BaseOutputParser",
|
||||||
|
|
@ -1349,15 +1099,6 @@
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
"name": "Text"
|
"name": "Text"
|
||||||
=======
|
|
||||||
"inputTypes": ["Document", "BaseOutputParser", "Record", "Text"],
|
|
||||||
"type": "str"
|
|
||||||
},
|
|
||||||
"sourceHandle": {
|
|
||||||
"baseClasses": ["object", "Text", "str"],
|
|
||||||
"dataType": "TextInput",
|
|
||||||
"id": "TextInput-og8Or"
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"style": {
|
"style": {
|
||||||
|
|
@ -1368,18 +1109,13 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "Prompt-Rse03",
|
"source": "Prompt-Rse03",
|
||||||
<<<<<<< HEAD
|
|
||||||
"sourceHandle": "{\"dataType\": \"Prompt\", \"id\": \"Prompt-Rse03\", \"output_types\": [\"Text\"], \"name\": \"Text\"}",
|
"sourceHandle": "{\"dataType\": \"Prompt\", \"id\": \"Prompt-Rse03\", \"output_types\": [\"Text\"], \"name\": \"Text\"}",
|
||||||
=======
|
|
||||||
"sourceHandle": "{œbaseClassesœ:[œobjectœ,œTextœ,œstrœ],œdataTypeœ:œPromptœ,œidœ:œPrompt-Rse03œ}",
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"target": "OpenAIModel-gi29P",
|
"target": "OpenAIModel-gi29P",
|
||||||
"targetHandle": "{œfieldNameœ:œinput_valueœ,œidœ:œOpenAIModel-gi29Pœ,œinputTypesœ:[œTextœ],œtypeœ:œstrœ}",
|
"targetHandle": "{œfieldNameœ:œinput_valueœ,œidœ:œOpenAIModel-gi29Pœ,œinputTypesœ:[œTextœ],œtypeœ:œstrœ}",
|
||||||
"data": {
|
"data": {
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "input_value",
|
"fieldName": "input_value",
|
||||||
"id": "OpenAIModel-gi29P",
|
"id": "OpenAIModel-gi29P",
|
||||||
<<<<<<< HEAD
|
|
||||||
"inputTypes": [
|
"inputTypes": [
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
|
|
@ -1392,15 +1128,6 @@
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
"name": "Text"
|
"name": "Text"
|
||||||
=======
|
|
||||||
"inputTypes": ["Text"],
|
|
||||||
"type": "str"
|
|
||||||
},
|
|
||||||
"sourceHandle": {
|
|
||||||
"baseClasses": ["object", "Text", "str"],
|
|
||||||
"dataType": "Prompt",
|
|
||||||
"id": "Prompt-Rse03"
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"style": {
|
"style": {
|
||||||
|
|
@ -1421,8 +1148,4 @@
|
||||||
"name": "Blog Writer",
|
"name": "Blog Writer",
|
||||||
"last_tested_version": "1.0.0a0",
|
"last_tested_version": "1.0.0a0",
|
||||||
"is_component": false
|
"is_component": false
|
||||||
<<<<<<< HEAD
|
|
||||||
}
|
}
|
||||||
=======
|
|
||||||
}
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
|
|
|
||||||
|
|
@ -20,11 +20,7 @@
|
||||||
"list": false,
|
"list": false,
|
||||||
"show": true,
|
"show": true,
|
||||||
"multiline": true,
|
"multiline": true,
|
||||||
<<<<<<< HEAD
|
|
||||||
"value": "from langchain_core.prompts import PromptTemplate\n\nfrom langflow.custom import CustomComponent\nfrom langflow.field_typing import Input, Prompt, Text\n\n\nclass PromptComponent(CustomComponent):\n display_name: str = \"Prompt\"\n description: str = \"Create a prompt template with dynamic variables.\"\n icon = \"prompts\"\n\n def build_config(self):\n return {\n \"template\": Input(display_name=\"Template\"),\n \"code\": Input(advanced=True),\n }\n\n def build(\n self,\n template: Prompt,\n **kwargs,\n ) -> Text:\n from langflow.base.prompts.utils import dict_values_to_string\n\n prompt_template = PromptTemplate.from_template(Text(template))\n kwargs = dict_values_to_string(kwargs)\n kwargs = {k: \"\\n\".join(v) if isinstance(v, list) else v for k, v in kwargs.items()}\n try:\n formated_prompt = prompt_template.format(**kwargs)\n except Exception as exc:\n raise ValueError(f\"Error formatting prompt: {exc}\") from exc\n self.status = f'Prompt:\\n\"{formated_prompt}\"'\n return formated_prompt\n",
|
"value": "from langchain_core.prompts import PromptTemplate\n\nfrom langflow.custom import CustomComponent\nfrom langflow.field_typing import Input, Prompt, Text\n\n\nclass PromptComponent(CustomComponent):\n display_name: str = \"Prompt\"\n description: str = \"Create a prompt template with dynamic variables.\"\n icon = \"prompts\"\n\n def build_config(self):\n return {\n \"template\": Input(display_name=\"Template\"),\n \"code\": Input(advanced=True),\n }\n\n def build(\n self,\n template: Prompt,\n **kwargs,\n ) -> Text:\n from langflow.base.prompts.utils import dict_values_to_string\n\n prompt_template = PromptTemplate.from_template(Text(template))\n kwargs = dict_values_to_string(kwargs)\n kwargs = {k: \"\\n\".join(v) if isinstance(v, list) else v for k, v in kwargs.items()}\n try:\n formated_prompt = prompt_template.format(**kwargs)\n except Exception as exc:\n raise ValueError(f\"Error formatting prompt: {exc}\") from exc\n self.status = f'Prompt:\\n\"{formated_prompt}\"'\n return formated_prompt\n",
|
||||||
=======
|
|
||||||
"value": "from langchain_core.prompts import PromptTemplate\n\nfrom langflow.custom import CustomComponent\nfrom langflow.field_typing import Prompt, TemplateField, Text\n\n\nclass PromptComponent(CustomComponent):\n display_name: str = \"Prompt\"\n description: str = \"Create a prompt template with dynamic variables.\"\n icon = \"prompts\"\n\n def build_config(self):\n return {\n \"template\": TemplateField(display_name=\"Template\"),\n \"code\": TemplateField(advanced=True),\n }\n\n def build(\n self,\n template: Prompt,\n **kwargs,\n ) -> Text:\n from langflow.base.prompts.utils import dict_values_to_string\n\n prompt_template = PromptTemplate.from_template(Text(template))\n kwargs = dict_values_to_string(kwargs)\n kwargs = {k: \"\\n\".join(v) if isinstance(v, list) else v for k, v in kwargs.items()}\n try:\n formated_prompt = prompt_template.format(**kwargs)\n except Exception as exc:\n raise ValueError(f\"Error formatting prompt: {exc}\") from exc\n self.status = f'Prompt:\\n\"{formated_prompt}\"'\n return formated_prompt\n",
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
|
|
@ -49,13 +45,9 @@
|
||||||
"name": "template",
|
"name": "template",
|
||||||
"display_name": "Template",
|
"display_name": "Template",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
=======
|
|
||||||
"input_types": ["Text"],
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
|
|
@ -120,20 +112,15 @@
|
||||||
"is_input": null,
|
"is_input": null,
|
||||||
"is_output": null,
|
"is_output": null,
|
||||||
"is_composition": null,
|
"is_composition": null,
|
||||||
<<<<<<< HEAD
|
|
||||||
"base_classes": [
|
"base_classes": [
|
||||||
"object",
|
"object",
|
||||||
"str",
|
"str",
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
=======
|
|
||||||
"base_classes": ["object", "str", "Text"],
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"name": "",
|
"name": "",
|
||||||
"display_name": "Prompt",
|
"display_name": "Prompt",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
<<<<<<< HEAD
|
|
||||||
"template": [
|
"template": [
|
||||||
"Document",
|
"Document",
|
||||||
"Question"
|
"Question"
|
||||||
|
|
@ -142,17 +129,11 @@
|
||||||
"output_types": [
|
"output_types": [
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
=======
|
|
||||||
"template": ["Document", "Question"]
|
|
||||||
},
|
|
||||||
"output_types": ["Text"],
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"full_path": null,
|
"full_path": null,
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [],
|
"field_order": [],
|
||||||
"beta": false,
|
"beta": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"error": null,
|
"error": null,
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
|
|
@ -165,9 +146,6 @@
|
||||||
"method": null
|
"method": null
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"error": null
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"id": "Prompt-tHwPf",
|
"id": "Prompt-tHwPf",
|
||||||
"description": "A component for creating prompt templates using dynamic variables.",
|
"description": "A component for creating prompt templates using dynamic variables.",
|
||||||
|
|
@ -264,20 +242,15 @@
|
||||||
"_type": "CustomComponent"
|
"_type": "CustomComponent"
|
||||||
},
|
},
|
||||||
"description": "A generic file loader.",
|
"description": "A generic file loader.",
|
||||||
<<<<<<< HEAD
|
|
||||||
"base_classes": [
|
"base_classes": [
|
||||||
"Record"
|
"Record"
|
||||||
],
|
],
|
||||||
=======
|
|
||||||
"base_classes": ["Record"],
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"display_name": "Files",
|
"display_name": "Files",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
"path": null,
|
"path": null,
|
||||||
"silent_errors": null
|
"silent_errors": null
|
||||||
},
|
},
|
||||||
<<<<<<< HEAD
|
|
||||||
"output_types": [
|
"output_types": [
|
||||||
"Record"
|
"Record"
|
||||||
],
|
],
|
||||||
|
|
@ -294,13 +267,6 @@
|
||||||
"name": "Record"
|
"name": "Record"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"output_types": ["Record"],
|
|
||||||
"field_formatters": {},
|
|
||||||
"frozen": false,
|
|
||||||
"field_order": [],
|
|
||||||
"beta": false
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"id": "File-6TEsD"
|
"id": "File-6TEsD"
|
||||||
},
|
},
|
||||||
|
|
@ -331,11 +297,7 @@
|
||||||
"list": false,
|
"list": false,
|
||||||
"show": true,
|
"show": true,
|
||||||
"multiline": true,
|
"multiline": true,
|
||||||
<<<<<<< HEAD
|
|
||||||
"value": "from langflow.base.io.chat import ChatComponent\nfrom langflow.field_typing import Text\nfrom langflow.schema import Record\nfrom langflow.template import Input, Output\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"ChatInput\"\n\n inputs = [\n Input(\n name=\"input_value\",\n type=str,\n display_name=\"Message\",\n multiline=True,\n input_types=[],\n info=\"Message to be passed as input.\",\n ),\n Input(\n name=\"sender\",\n type=str,\n display_name=\"Sender Type\",\n options=[\"Machine\", \"User\"],\n value=\"User\",\n info=\"Type of sender.\",\n advanced=True,\n ),\n Input(name=\"sender_name\", type=str, display_name=\"Sender Name\", info=\"Name of the sender.\", value=\"User\"),\n Input(\n name=\"session_id\", type=str, display_name=\"Session ID\", info=\"Session ID for the message.\", advanced=True\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"text_response\"),\n Output(display_name=\"Record\", name=\"record\", method=\"record_response\"),\n ]\n\n def text_response(self) -> Text:\n result = self.input_value\n if self.session_id and isinstance(result, (Record, str)):\n self.store_message(result, self.session_id, self.sender, self.sender_name)\n return result\n\n def record_response(self) -> Record:\n record = Record(\n data={\n \"text\": self.input_value,\n \"sender\": self.sender,\n \"sender_name\": self.sender_name,\n \"session_id\": self.session_id,\n },\n )\n if self.session_id and isinstance(record, (Record, str)):\n self.store_message(record, self.session_id, self.sender, self.sender_name)\n return record\n",
|
"value": "from langflow.base.io.chat import ChatComponent\nfrom langflow.field_typing import Text\nfrom langflow.schema import Record\nfrom langflow.template import Input, Output\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"ChatInput\"\n\n inputs = [\n Input(\n name=\"input_value\",\n type=str,\n display_name=\"Message\",\n multiline=True,\n input_types=[],\n info=\"Message to be passed as input.\",\n ),\n Input(\n name=\"sender\",\n type=str,\n display_name=\"Sender Type\",\n options=[\"Machine\", \"User\"],\n value=\"User\",\n info=\"Type of sender.\",\n advanced=True,\n ),\n Input(name=\"sender_name\", type=str, display_name=\"Sender Name\", info=\"Name of the sender.\", value=\"User\"),\n Input(\n name=\"session_id\", type=str, display_name=\"Session ID\", info=\"Session ID for the message.\", advanced=True\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"text_response\"),\n Output(display_name=\"Record\", name=\"record\", method=\"record_response\"),\n ]\n\n def text_response(self) -> Text:\n result = self.input_value\n if self.session_id and isinstance(result, (Record, str)):\n self.store_message(result, self.session_id, self.sender, self.sender_name)\n return result\n\n def record_response(self) -> Record:\n record = Record(\n data={\n \"text\": self.input_value,\n \"sender\": self.sender,\n \"sender_name\": self.sender_name,\n \"session_id\": self.session_id,\n },\n )\n if self.session_id and isinstance(record, (Record, str)):\n self.store_message(record, self.session_id, self.sender, self.sender_name)\n return record\n",
|
||||||
=======
|
|
||||||
"value": "from typing import Optional, Union\n\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.field_typing import Text\nfrom langflow.schema import Record\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\": \"Message\",\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 session_id: Optional[str] = None,\n return_record: Optional[bool] = False,\n ) -> Union[Text, Record]:\n return super().build_no_record(\n sender=sender,\n sender_name=sender_name,\n input_value=input_value,\n session_id=session_id,\n return_record=return_record,\n )\n",
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
|
|
@ -353,10 +315,7 @@
|
||||||
"list": false,
|
"list": false,
|
||||||
"show": true,
|
"show": true,
|
||||||
"multiline": true,
|
"multiline": true,
|
||||||
<<<<<<< HEAD
|
|
||||||
"value": "",
|
"value": "",
|
||||||
=======
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
|
|
@ -365,31 +324,7 @@
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
"input_types": [],
|
"input_types": [],
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"info": "Message to be passed as input.",
|
"info": "Message to be passed as input.",
|
||||||
=======
|
|
||||||
"info": "",
|
|
||||||
"load_from_db": false,
|
|
||||||
"title_case": false,
|
|
||||||
"value": ""
|
|
||||||
},
|
|
||||||
"return_record": {
|
|
||||||
"type": "bool",
|
|
||||||
"required": false,
|
|
||||||
"placeholder": "",
|
|
||||||
"list": false,
|
|
||||||
"show": true,
|
|
||||||
"multiline": false,
|
|
||||||
"value": false,
|
|
||||||
"fileTypes": [],
|
|
||||||
"file_path": "",
|
|
||||||
"password": false,
|
|
||||||
"name": "return_record",
|
|
||||||
"display_name": "Return Record",
|
|
||||||
"advanced": true,
|
|
||||||
"dynamic": false,
|
|
||||||
"info": "Return the message as a record containing the sender, sender_name, and session_id.",
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false
|
"title_case": false
|
||||||
},
|
},
|
||||||
|
|
@ -400,7 +335,6 @@
|
||||||
"list": true,
|
"list": true,
|
||||||
"show": true,
|
"show": true,
|
||||||
"multiline": false,
|
"multiline": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"value": "",
|
"value": "",
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
|
|
@ -409,30 +343,16 @@
|
||||||
"Machine",
|
"Machine",
|
||||||
"User"
|
"User"
|
||||||
],
|
],
|
||||||
=======
|
|
||||||
"value": "User",
|
|
||||||
"fileTypes": [],
|
|
||||||
"file_path": "",
|
|
||||||
"password": false,
|
|
||||||
"options": ["Machine", "User"],
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"name": "sender",
|
"name": "sender",
|
||||||
"display_name": "Sender Type",
|
"display_name": "Sender Type",
|
||||||
"advanced": true,
|
"advanced": true,
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"info": "Type of sender.",
|
"info": "Type of sender.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"info": "",
|
|
||||||
"load_from_db": false,
|
|
||||||
"title_case": false,
|
|
||||||
"input_types": ["Text"]
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"sender_name": {
|
"sender_name": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -441,11 +361,7 @@
|
||||||
"list": false,
|
"list": false,
|
||||||
"show": true,
|
"show": true,
|
||||||
"multiline": false,
|
"multiline": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"value": "",
|
"value": "",
|
||||||
=======
|
|
||||||
"value": "User",
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
|
|
@ -453,19 +369,12 @@
|
||||||
"display_name": "Sender Name",
|
"display_name": "Sender Name",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"info": "Name of the sender.",
|
"info": "Name of the sender.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"info": "",
|
|
||||||
"load_from_db": false,
|
|
||||||
"title_case": false,
|
|
||||||
"input_types": ["Text"]
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"session_id": {
|
"session_id": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -474,10 +383,7 @@
|
||||||
"list": false,
|
"list": false,
|
||||||
"show": true,
|
"show": true,
|
||||||
"multiline": false,
|
"multiline": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"value": "",
|
"value": "",
|
||||||
=======
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
|
|
@ -485,7 +391,6 @@
|
||||||
"display_name": "Session ID",
|
"display_name": "Session ID",
|
||||||
"advanced": true,
|
"advanced": true,
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"info": "Session ID for the message.",
|
"info": "Session ID for the message.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
|
|
@ -503,18 +408,6 @@
|
||||||
"Text",
|
"Text",
|
||||||
"object"
|
"object"
|
||||||
],
|
],
|
||||||
=======
|
|
||||||
"info": "If provided, the message will be stored in the memory.",
|
|
||||||
"load_from_db": false,
|
|
||||||
"title_case": false,
|
|
||||||
"input_types": ["Text"]
|
|
||||||
},
|
|
||||||
"_type": "CustomComponent"
|
|
||||||
},
|
|
||||||
"description": "Get chat inputs from the Playground.",
|
|
||||||
"icon": "ChatInput",
|
|
||||||
"base_classes": ["str", "Record", "Text", "object"],
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"display_name": "Chat Input",
|
"display_name": "Chat Input",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
|
|
@ -524,7 +417,6 @@
|
||||||
"session_id": null,
|
"session_id": null,
|
||||||
"return_record": null
|
"return_record": null
|
||||||
},
|
},
|
||||||
<<<<<<< HEAD
|
|
||||||
"output_types": [
|
"output_types": [
|
||||||
"Text",
|
"Text",
|
||||||
"Record"
|
"Record"
|
||||||
|
|
@ -553,13 +445,6 @@
|
||||||
"method": "record_response"
|
"method": "record_response"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"output_types": ["Text", "Record"],
|
|
||||||
"field_formatters": {},
|
|
||||||
"frozen": false,
|
|
||||||
"field_order": [],
|
|
||||||
"beta": false
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"id": "ChatInput-MsSJ9"
|
"id": "ChatInput-MsSJ9"
|
||||||
},
|
},
|
||||||
|
|
@ -590,11 +475,7 @@
|
||||||
"list": false,
|
"list": false,
|
||||||
"show": true,
|
"show": true,
|
||||||
"multiline": true,
|
"multiline": true,
|
||||||
<<<<<<< HEAD
|
|
||||||
"value": "from langflow.base.io.chat import ChatComponent\nfrom langflow.field_typing import Text\nfrom langflow.schema import Record\nfrom langflow.template import Input, Output\n\n\nclass ChatOutput(ChatComponent):\n display_name = \"Chat Output\"\n description = \"Display a chat message in the Playground.\"\n icon = \"ChatOutput\"\n\n inputs = [\n Input(\n name=\"input_value\", type=str, display_name=\"Message\", multiline=True, info=\"Message to be passed as output.\"\n ),\n Input(\n name=\"sender\",\n type=str,\n display_name=\"Sender Type\",\n options=[\"Machine\", \"User\"],\n value=\"Machine\",\n advanced=True,\n info=\"Type of sender.\",\n ),\n Input(name=\"sender_name\", type=str, display_name=\"Sender Name\", info=\"Name of the sender.\", value=\"AI\"),\n Input(\n name=\"session_id\", type=str, display_name=\"Session ID\", info=\"Session ID for the message.\", advanced=True\n ),\n Input(\n name=\"record_template\",\n type=str,\n display_name=\"Record Template\",\n value=\"{text}\",\n advanced=True,\n info=\"Template to convert Record to Text. If left empty, it will be dynamically set to the Record's text key.\",\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"text_response\"),\n Output(display_name=\"Record\", name=\"record\", method=\"record_response\"),\n ]\n\n def text_response(self) -> Text:\n result = self.input_value\n if self.session_id and isinstance(result, (Record, str)):\n self.store_message(result, self.session_id, self.sender, self.sender_name)\n return result\n\n def record_response(self) -> Record:\n record = Record(\n data={\n \"message\": self.input_value,\n \"sender\": self.sender,\n \"sender_name\": self.sender_name,\n \"session_id\": self.session_id,\n \"template\": self.record_template or \"\",\n }\n )\n if self.session_id and isinstance(record, (Record, str)):\n self.store_message(record, self.session_id, self.sender, self.sender_name)\n return record\n",
|
"value": "from langflow.base.io.chat import ChatComponent\nfrom langflow.field_typing import Text\nfrom langflow.schema import Record\nfrom langflow.template import Input, Output\n\n\nclass ChatOutput(ChatComponent):\n display_name = \"Chat Output\"\n description = \"Display a chat message in the Playground.\"\n icon = \"ChatOutput\"\n\n inputs = [\n Input(\n name=\"input_value\", type=str, display_name=\"Message\", multiline=True, info=\"Message to be passed as output.\"\n ),\n Input(\n name=\"sender\",\n type=str,\n display_name=\"Sender Type\",\n options=[\"Machine\", \"User\"],\n value=\"Machine\",\n advanced=True,\n info=\"Type of sender.\",\n ),\n Input(name=\"sender_name\", type=str, display_name=\"Sender Name\", info=\"Name of the sender.\", value=\"AI\"),\n Input(\n name=\"session_id\", type=str, display_name=\"Session ID\", info=\"Session ID for the message.\", advanced=True\n ),\n Input(\n name=\"record_template\",\n type=str,\n display_name=\"Record Template\",\n value=\"{text}\",\n advanced=True,\n info=\"Template to convert Record to Text. If left empty, it will be dynamically set to the Record's text key.\",\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"text_response\"),\n Output(display_name=\"Record\", name=\"record\", method=\"record_response\"),\n ]\n\n def text_response(self) -> Text:\n result = self.input_value\n if self.session_id and isinstance(result, (Record, str)):\n self.store_message(result, self.session_id, self.sender, self.sender_name)\n return result\n\n def record_response(self) -> Record:\n record = Record(\n data={\n \"message\": self.input_value,\n \"sender\": self.sender,\n \"sender_name\": self.sender_name,\n \"session_id\": self.session_id,\n \"template\": self.record_template or \"\",\n }\n )\n if self.session_id and isinstance(record, (Record, str)):\n self.store_message(record, self.session_id, self.sender, self.sender_name)\n return record\n",
|
||||||
=======
|
|
||||||
"value": "from typing import Optional, Union\n\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.field_typing import Text\nfrom langflow.schema import Record\n\n\nclass ChatOutput(ChatComponent):\n display_name = \"Chat Output\"\n description = \"Display a chat message in the Playground.\"\n icon = \"ChatOutput\"\n\n def build(\n self,\n sender: Optional[str] = \"Machine\",\n sender_name: Optional[str] = \"AI\",\n input_value: Optional[str] = None,\n session_id: Optional[str] = None,\n return_record: Optional[bool] = False,\n record_template: Optional[str] = \"{text}\",\n ) -> Union[Text, Record]:\n return super().build_with_record(\n sender=sender,\n sender_name=sender_name,\n input_value=input_value,\n session_id=session_id,\n return_record=return_record,\n record_template=record_template or \"\",\n )\n",
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
|
|
@ -612,17 +493,13 @@
|
||||||
"list": false,
|
"list": false,
|
||||||
"show": true,
|
"show": true,
|
||||||
"multiline": true,
|
"multiline": true,
|
||||||
<<<<<<< HEAD
|
|
||||||
"value": "",
|
"value": "",
|
||||||
=======
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
"name": "input_value",
|
"name": "input_value",
|
||||||
"display_name": "Message",
|
"display_name": "Message",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "Message to be passed as output.",
|
"info": "Message to be passed as output.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
|
|
@ -633,22 +510,11 @@
|
||||||
},
|
},
|
||||||
"record_template": {
|
"record_template": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
=======
|
|
||||||
"input_types": ["Text"],
|
|
||||||
"dynamic": false,
|
|
||||||
"info": "",
|
|
||||||
"load_from_db": false,
|
|
||||||
"title_case": false
|
|
||||||
},
|
|
||||||
"return_record": {
|
|
||||||
"type": "bool",
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"required": false,
|
"required": false,
|
||||||
"placeholder": "",
|
"placeholder": "",
|
||||||
"list": false,
|
"list": false,
|
||||||
"show": true,
|
"show": true,
|
||||||
"multiline": false,
|
"multiline": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"value": "",
|
"value": "",
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
|
|
@ -663,19 +529,6 @@
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"value": false,
|
|
||||||
"fileTypes": [],
|
|
||||||
"file_path": "",
|
|
||||||
"password": false,
|
|
||||||
"name": "return_record",
|
|
||||||
"display_name": "Return Record",
|
|
||||||
"advanced": true,
|
|
||||||
"dynamic": false,
|
|
||||||
"info": "Return the message as a record containing the sender, sender_name, and session_id.",
|
|
||||||
"load_from_db": false,
|
|
||||||
"title_case": false
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"sender": {
|
"sender": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -684,7 +537,6 @@
|
||||||
"list": true,
|
"list": true,
|
||||||
"show": true,
|
"show": true,
|
||||||
"multiline": false,
|
"multiline": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"value": "",
|
"value": "",
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
|
|
@ -693,30 +545,16 @@
|
||||||
"Machine",
|
"Machine",
|
||||||
"User"
|
"User"
|
||||||
],
|
],
|
||||||
=======
|
|
||||||
"value": "Machine",
|
|
||||||
"fileTypes": [],
|
|
||||||
"file_path": "",
|
|
||||||
"password": false,
|
|
||||||
"options": ["Machine", "User"],
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"name": "sender",
|
"name": "sender",
|
||||||
"display_name": "Sender Type",
|
"display_name": "Sender Type",
|
||||||
"advanced": true,
|
"advanced": true,
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"info": "Type of sender.",
|
"info": "Type of sender.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"info": "",
|
|
||||||
"load_from_db": false,
|
|
||||||
"title_case": false,
|
|
||||||
"input_types": ["Text"]
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"sender_name": {
|
"sender_name": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -725,11 +563,7 @@
|
||||||
"list": false,
|
"list": false,
|
||||||
"show": true,
|
"show": true,
|
||||||
"multiline": false,
|
"multiline": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"value": "",
|
"value": "",
|
||||||
=======
|
|
||||||
"value": "AI",
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
|
|
@ -737,19 +571,12 @@
|
||||||
"display_name": "Sender Name",
|
"display_name": "Sender Name",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"info": "Name of the sender.",
|
"info": "Name of the sender.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"info": "",
|
|
||||||
"load_from_db": false,
|
|
||||||
"title_case": false,
|
|
||||||
"input_types": ["Text"]
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"session_id": {
|
"session_id": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -758,10 +585,7 @@
|
||||||
"list": false,
|
"list": false,
|
||||||
"show": true,
|
"show": true,
|
||||||
"multiline": false,
|
"multiline": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"value": "",
|
"value": "",
|
||||||
=======
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
|
|
@ -769,7 +593,6 @@
|
||||||
"display_name": "Session ID",
|
"display_name": "Session ID",
|
||||||
"advanced": true,
|
"advanced": true,
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"info": "Session ID for the message.",
|
"info": "Session ID for the message.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
|
|
@ -787,18 +610,6 @@
|
||||||
"Text",
|
"Text",
|
||||||
"object"
|
"object"
|
||||||
],
|
],
|
||||||
=======
|
|
||||||
"info": "If provided, the message will be stored in the memory.",
|
|
||||||
"load_from_db": false,
|
|
||||||
"title_case": false,
|
|
||||||
"input_types": ["Text"]
|
|
||||||
},
|
|
||||||
"_type": "CustomComponent"
|
|
||||||
},
|
|
||||||
"description": "Display a chat message in the Playground.",
|
|
||||||
"icon": "ChatOutput",
|
|
||||||
"base_classes": ["str", "Record", "Text", "object"],
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"display_name": "Chat Output",
|
"display_name": "Chat Output",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
|
|
@ -808,7 +619,6 @@
|
||||||
"session_id": null,
|
"session_id": null,
|
||||||
"return_record": null
|
"return_record": null
|
||||||
},
|
},
|
||||||
<<<<<<< HEAD
|
|
||||||
"output_types": [
|
"output_types": [
|
||||||
"Text",
|
"Text",
|
||||||
"Record"
|
"Record"
|
||||||
|
|
@ -837,13 +647,6 @@
|
||||||
"method": "record_response"
|
"method": "record_response"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"output_types": ["Text", "Record"],
|
|
||||||
"field_formatters": {},
|
|
||||||
"frozen": false,
|
|
||||||
"field_order": [],
|
|
||||||
"beta": false
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"id": "ChatOutput-F5Awj"
|
"id": "ChatOutput-F5Awj"
|
||||||
},
|
},
|
||||||
|
|
@ -884,13 +687,9 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"input_types": ["Text"]
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"code": {
|
"code": {
|
||||||
"type": "code",
|
"type": "code",
|
||||||
|
|
@ -973,13 +772,9 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"input_types": ["Text"]
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"openai_api_base": {
|
"openai_api_base": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -998,13 +793,9 @@
|
||||||
"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.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"input_types": ["Text"]
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"openai_api_key": {
|
"openai_api_key": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -1023,13 +814,9 @@
|
||||||
"info": "The OpenAI API Key to use for the OpenAI model.",
|
"info": "The OpenAI API Key to use for the OpenAI model.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
=======
|
|
||||||
"input_types": ["Text"],
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"value": "OPENAI_API_KEY"
|
"value": "OPENAI_API_KEY"
|
||||||
},
|
},
|
||||||
"stream": {
|
"stream": {
|
||||||
|
|
@ -1045,11 +832,7 @@
|
||||||
"password": false,
|
"password": false,
|
||||||
"name": "stream",
|
"name": "stream",
|
||||||
"display_name": "Stream",
|
"display_name": "Stream",
|
||||||
<<<<<<< HEAD
|
|
||||||
"advanced": true,
|
"advanced": true,
|
||||||
=======
|
|
||||||
"advanced": false,
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "Stream the response from the model. Streaming works only in Chat.",
|
"info": "Stream the response from the model. Streaming works only in Chat.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
|
|
@ -1072,13 +855,9 @@
|
||||||
"info": "System message to pass to the model.",
|
"info": "System message to pass to the model.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"input_types": ["Text"]
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"temperature": {
|
"temperature": {
|
||||||
"type": "float",
|
"type": "float",
|
||||||
|
|
@ -1109,15 +888,11 @@
|
||||||
},
|
},
|
||||||
"description": "Generates text using OpenAI LLMs.",
|
"description": "Generates text using OpenAI LLMs.",
|
||||||
"icon": "OpenAI",
|
"icon": "OpenAI",
|
||||||
<<<<<<< HEAD
|
|
||||||
"base_classes": [
|
"base_classes": [
|
||||||
"object",
|
"object",
|
||||||
"str",
|
"str",
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
=======
|
|
||||||
"base_classes": ["object", "str", "Text"],
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"display_name": "OpenAI",
|
"display_name": "OpenAI",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
|
|
@ -1131,13 +906,9 @@
|
||||||
"stream": null,
|
"stream": null,
|
||||||
"system_message": null
|
"system_message": null
|
||||||
},
|
},
|
||||||
<<<<<<< HEAD
|
|
||||||
"output_types": [
|
"output_types": [
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
=======
|
|
||||||
"output_types": ["Text"],
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [
|
"field_order": [
|
||||||
|
|
@ -1151,7 +922,6 @@
|
||||||
"system_message",
|
"system_message",
|
||||||
"stream"
|
"stream"
|
||||||
],
|
],
|
||||||
<<<<<<< HEAD
|
|
||||||
"beta": false,
|
"beta": false,
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
|
|
@ -1164,9 +934,6 @@
|
||||||
"method": null
|
"method": null
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"beta": false
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"id": "OpenAIModel-Bt067"
|
"id": "OpenAIModel-Bt067"
|
||||||
},
|
},
|
||||||
|
|
@ -1183,18 +950,13 @@
|
||||||
"edges": [
|
"edges": [
|
||||||
{
|
{
|
||||||
"source": "ChatInput-MsSJ9",
|
"source": "ChatInput-MsSJ9",
|
||||||
<<<<<<< HEAD
|
|
||||||
"sourceHandle": "{\"dataType\": \"ChatInput\", \"id\": \"ChatInput-MsSJ9\", \"output_types\": [\"Text\"], \"name\": \"message\"}",
|
"sourceHandle": "{\"dataType\": \"ChatInput\", \"id\": \"ChatInput-MsSJ9\", \"output_types\": [\"Text\"], \"name\": \"message\"}",
|
||||||
=======
|
|
||||||
"sourceHandle": "{œbaseClassesœ:[œstrœ,œRecordœ,œTextœ,œobjectœ],œdataTypeœ:œChatInputœ,œidœ:œChatInput-MsSJ9œ}",
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"target": "Prompt-tHwPf",
|
"target": "Prompt-tHwPf",
|
||||||
"targetHandle": "{œfieldNameœ:œQuestionœ,œidœ:œPrompt-tHwPfœ,œinputTypesœ:[œDocumentœ,œBaseOutputParserœ,œRecordœ,œTextœ],œtypeœ:œstrœ}",
|
"targetHandle": "{œfieldNameœ:œQuestionœ,œidœ:œPrompt-tHwPfœ,œinputTypesœ:[œDocumentœ,œBaseOutputParserœ,œRecordœ,œTextœ],œtypeœ:œstrœ}",
|
||||||
"data": {
|
"data": {
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "Question",
|
"fieldName": "Question",
|
||||||
"id": "Prompt-tHwPf",
|
"id": "Prompt-tHwPf",
|
||||||
<<<<<<< HEAD
|
|
||||||
"inputTypes": [
|
"inputTypes": [
|
||||||
"Document",
|
"Document",
|
||||||
"BaseOutputParser",
|
"BaseOutputParser",
|
||||||
|
|
@ -1210,15 +972,6 @@
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
"name": "message"
|
"name": "message"
|
||||||
=======
|
|
||||||
"inputTypes": ["Document", "BaseOutputParser", "Record", "Text"],
|
|
||||||
"type": "str"
|
|
||||||
},
|
|
||||||
"sourceHandle": {
|
|
||||||
"baseClasses": ["str", "Record", "Text", "object"],
|
|
||||||
"dataType": "ChatInput",
|
|
||||||
"id": "ChatInput-MsSJ9"
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"style": {
|
"style": {
|
||||||
|
|
@ -1229,18 +982,13 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "File-6TEsD",
|
"source": "File-6TEsD",
|
||||||
<<<<<<< HEAD
|
|
||||||
"sourceHandle": "{\"dataType\": \"File\", \"id\": \"File-6TEsD\", \"output_types\": [\"Record\"], \"name\": \"Record\"}",
|
"sourceHandle": "{\"dataType\": \"File\", \"id\": \"File-6TEsD\", \"output_types\": [\"Record\"], \"name\": \"Record\"}",
|
||||||
=======
|
|
||||||
"sourceHandle": "{œbaseClassesœ:[œRecordœ],œdataTypeœ:œFileœ,œidœ:œFile-6TEsDœ}",
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"target": "Prompt-tHwPf",
|
"target": "Prompt-tHwPf",
|
||||||
"targetHandle": "{œfieldNameœ:œDocumentœ,œidœ:œPrompt-tHwPfœ,œinputTypesœ:[œDocumentœ,œBaseOutputParserœ,œRecordœ,œTextœ],œtypeœ:œstrœ}",
|
"targetHandle": "{œfieldNameœ:œDocumentœ,œidœ:œPrompt-tHwPfœ,œinputTypesœ:[œDocumentœ,œBaseOutputParserœ,œRecordœ,œTextœ],œtypeœ:œstrœ}",
|
||||||
"data": {
|
"data": {
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "Document",
|
"fieldName": "Document",
|
||||||
"id": "Prompt-tHwPf",
|
"id": "Prompt-tHwPf",
|
||||||
<<<<<<< HEAD
|
|
||||||
"inputTypes": [
|
"inputTypes": [
|
||||||
"Document",
|
"Document",
|
||||||
"BaseOutputParser",
|
"BaseOutputParser",
|
||||||
|
|
@ -1256,15 +1004,6 @@
|
||||||
"Record"
|
"Record"
|
||||||
],
|
],
|
||||||
"name": "Record"
|
"name": "Record"
|
||||||
=======
|
|
||||||
"inputTypes": ["Document", "BaseOutputParser", "Record", "Text"],
|
|
||||||
"type": "str"
|
|
||||||
},
|
|
||||||
"sourceHandle": {
|
|
||||||
"baseClasses": ["Record"],
|
|
||||||
"dataType": "File",
|
|
||||||
"id": "File-6TEsD"
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"style": {
|
"style": {
|
||||||
|
|
@ -1275,18 +1014,13 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "Prompt-tHwPf",
|
"source": "Prompt-tHwPf",
|
||||||
<<<<<<< HEAD
|
|
||||||
"sourceHandle": "{\"dataType\": \"Prompt\", \"id\": \"Prompt-tHwPf\", \"output_types\": [\"Text\"], \"name\": \"Text\"}",
|
"sourceHandle": "{\"dataType\": \"Prompt\", \"id\": \"Prompt-tHwPf\", \"output_types\": [\"Text\"], \"name\": \"Text\"}",
|
||||||
=======
|
|
||||||
"sourceHandle": "{œbaseClassesœ:[œobjectœ,œstrœ,œTextœ],œdataTypeœ:œPromptœ,œidœ:œPrompt-tHwPfœ}",
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"target": "OpenAIModel-Bt067",
|
"target": "OpenAIModel-Bt067",
|
||||||
"targetHandle": "{œfieldNameœ:œinput_valueœ,œidœ:œOpenAIModel-Bt067œ,œinputTypesœ:[œTextœ],œtypeœ:œstrœ}",
|
"targetHandle": "{œfieldNameœ:œinput_valueœ,œidœ:œOpenAIModel-Bt067œ,œinputTypesœ:[œTextœ],œtypeœ:œstrœ}",
|
||||||
"data": {
|
"data": {
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "input_value",
|
"fieldName": "input_value",
|
||||||
"id": "OpenAIModel-Bt067",
|
"id": "OpenAIModel-Bt067",
|
||||||
<<<<<<< HEAD
|
|
||||||
"inputTypes": [
|
"inputTypes": [
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
|
|
@ -1299,15 +1033,6 @@
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
"name": "Text"
|
"name": "Text"
|
||||||
=======
|
|
||||||
"inputTypes": ["Text"],
|
|
||||||
"type": "str"
|
|
||||||
},
|
|
||||||
"sourceHandle": {
|
|
||||||
"baseClasses": ["object", "str", "Text"],
|
|
||||||
"dataType": "Prompt",
|
|
||||||
"id": "Prompt-tHwPf"
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"style": {
|
"style": {
|
||||||
|
|
@ -1318,18 +1043,13 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "OpenAIModel-Bt067",
|
"source": "OpenAIModel-Bt067",
|
||||||
<<<<<<< HEAD
|
|
||||||
"sourceHandle": "{\"dataType\": \"OpenAIModel\", \"id\": \"OpenAIModel-Bt067\", \"output_types\": [\"Text\"], \"name\": \"Text\"}",
|
"sourceHandle": "{\"dataType\": \"OpenAIModel\", \"id\": \"OpenAIModel-Bt067\", \"output_types\": [\"Text\"], \"name\": \"Text\"}",
|
||||||
=======
|
|
||||||
"sourceHandle": "{œbaseClassesœ:[œobjectœ,œstrœ,œTextœ],œdataTypeœ:œOpenAIModelœ,œidœ:œOpenAIModel-Bt067œ}",
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"target": "ChatOutput-F5Awj",
|
"target": "ChatOutput-F5Awj",
|
||||||
"targetHandle": "{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-F5Awjœ,œinputTypesœ:[œTextœ],œtypeœ:œstrœ}",
|
"targetHandle": "{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-F5Awjœ,œinputTypesœ:[œTextœ],œtypeœ:œstrœ}",
|
||||||
"data": {
|
"data": {
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "input_value",
|
"fieldName": "input_value",
|
||||||
"id": "ChatOutput-F5Awj",
|
"id": "ChatOutput-F5Awj",
|
||||||
<<<<<<< HEAD
|
|
||||||
"inputTypes": [
|
"inputTypes": [
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
|
|
@ -1342,15 +1062,6 @@
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
"name": "Text"
|
"name": "Text"
|
||||||
=======
|
|
||||||
"inputTypes": ["Text"],
|
|
||||||
"type": "str"
|
|
||||||
},
|
|
||||||
"sourceHandle": {
|
|
||||||
"baseClasses": ["object", "str", "Text"],
|
|
||||||
"dataType": "OpenAIModel",
|
|
||||||
"id": "OpenAIModel-Bt067"
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"style": {
|
"style": {
|
||||||
|
|
@ -1370,8 +1081,4 @@
|
||||||
"name": "Document QA",
|
"name": "Document QA",
|
||||||
"last_tested_version": "1.0.0a0",
|
"last_tested_version": "1.0.0a0",
|
||||||
"is_component": false
|
"is_component": false
|
||||||
<<<<<<< HEAD
|
|
||||||
}
|
}
|
||||||
=======
|
|
||||||
}
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
|
|
|
||||||
|
|
@ -22,11 +22,7 @@
|
||||||
"list": false,
|
"list": false,
|
||||||
"show": true,
|
"show": true,
|
||||||
"multiline": true,
|
"multiline": true,
|
||||||
<<<<<<< HEAD
|
|
||||||
"value": "from langflow.base.io.chat import ChatComponent\nfrom langflow.field_typing import Text\nfrom langflow.schema import Record\nfrom langflow.template import Input, Output\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"ChatInput\"\n\n inputs = [\n Input(\n name=\"input_value\",\n type=str,\n display_name=\"Message\",\n multiline=True,\n input_types=[],\n info=\"Message to be passed as input.\",\n ),\n Input(\n name=\"sender\",\n type=str,\n display_name=\"Sender Type\",\n options=[\"Machine\", \"User\"],\n value=\"User\",\n info=\"Type of sender.\",\n advanced=True,\n ),\n Input(name=\"sender_name\", type=str, display_name=\"Sender Name\", info=\"Name of the sender.\", value=\"User\"),\n Input(\n name=\"session_id\", type=str, display_name=\"Session ID\", info=\"Session ID for the message.\", advanced=True\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"text_response\"),\n Output(display_name=\"Record\", name=\"record\", method=\"record_response\"),\n ]\n\n def text_response(self) -> Text:\n result = self.input_value\n if self.session_id and isinstance(result, (Record, str)):\n self.store_message(result, self.session_id, self.sender, self.sender_name)\n return result\n\n def record_response(self) -> Record:\n record = Record(\n data={\n \"text\": self.input_value,\n \"sender\": self.sender,\n \"sender_name\": self.sender_name,\n \"session_id\": self.session_id,\n },\n )\n if self.session_id and isinstance(record, (Record, str)):\n self.store_message(record, self.session_id, self.sender, self.sender_name)\n return record\n",
|
"value": "from langflow.base.io.chat import ChatComponent\nfrom langflow.field_typing import Text\nfrom langflow.schema import Record\nfrom langflow.template import Input, Output\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"ChatInput\"\n\n inputs = [\n Input(\n name=\"input_value\",\n type=str,\n display_name=\"Message\",\n multiline=True,\n input_types=[],\n info=\"Message to be passed as input.\",\n ),\n Input(\n name=\"sender\",\n type=str,\n display_name=\"Sender Type\",\n options=[\"Machine\", \"User\"],\n value=\"User\",\n info=\"Type of sender.\",\n advanced=True,\n ),\n Input(name=\"sender_name\", type=str, display_name=\"Sender Name\", info=\"Name of the sender.\", value=\"User\"),\n Input(\n name=\"session_id\", type=str, display_name=\"Session ID\", info=\"Session ID for the message.\", advanced=True\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"text_response\"),\n Output(display_name=\"Record\", name=\"record\", method=\"record_response\"),\n ]\n\n def text_response(self) -> Text:\n result = self.input_value\n if self.session_id and isinstance(result, (Record, str)):\n self.store_message(result, self.session_id, self.sender, self.sender_name)\n return result\n\n def record_response(self) -> Record:\n record = Record(\n data={\n \"text\": self.input_value,\n \"sender\": self.sender,\n \"sender_name\": self.sender_name,\n \"session_id\": self.session_id,\n },\n )\n if self.session_id and isinstance(record, (Record, str)):\n self.store_message(record, self.session_id, self.sender, self.sender_name)\n return record\n",
|
||||||
=======
|
|
||||||
"value": "from typing import Optional, Union\n\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.field_typing import Text\nfrom langflow.schema import Record\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\": \"Message\",\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 session_id: Optional[str] = None,\n return_record: Optional[bool] = False,\n ) -> Union[Text, Record]:\n return super().build_no_record(\n sender=sender,\n sender_name=sender_name,\n input_value=input_value,\n session_id=session_id,\n return_record=return_record,\n )\n",
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
|
|
@ -44,10 +40,7 @@
|
||||||
"list": false,
|
"list": false,
|
||||||
"show": true,
|
"show": true,
|
||||||
"multiline": true,
|
"multiline": true,
|
||||||
<<<<<<< HEAD
|
|
||||||
"value": "",
|
"value": "",
|
||||||
=======
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
|
|
@ -56,31 +49,7 @@
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
"input_types": [],
|
"input_types": [],
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"info": "Message to be passed as input.",
|
"info": "Message to be passed as input.",
|
||||||
=======
|
|
||||||
"info": "",
|
|
||||||
"load_from_db": false,
|
|
||||||
"title_case": false,
|
|
||||||
"value": ""
|
|
||||||
},
|
|
||||||
"return_record": {
|
|
||||||
"type": "bool",
|
|
||||||
"required": false,
|
|
||||||
"placeholder": "",
|
|
||||||
"list": false,
|
|
||||||
"show": true,
|
|
||||||
"multiline": false,
|
|
||||||
"value": false,
|
|
||||||
"fileTypes": [],
|
|
||||||
"file_path": "",
|
|
||||||
"password": false,
|
|
||||||
"name": "return_record",
|
|
||||||
"display_name": "Return Record",
|
|
||||||
"advanced": true,
|
|
||||||
"dynamic": false,
|
|
||||||
"info": "Return the message as a record containing the sender, sender_name, and session_id.",
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false
|
"title_case": false
|
||||||
},
|
},
|
||||||
|
|
@ -91,7 +60,6 @@
|
||||||
"list": true,
|
"list": true,
|
||||||
"show": true,
|
"show": true,
|
||||||
"multiline": false,
|
"multiline": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"value": "",
|
"value": "",
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
|
|
@ -100,30 +68,16 @@
|
||||||
"Machine",
|
"Machine",
|
||||||
"User"
|
"User"
|
||||||
],
|
],
|
||||||
=======
|
|
||||||
"value": "User",
|
|
||||||
"fileTypes": [],
|
|
||||||
"file_path": "",
|
|
||||||
"password": false,
|
|
||||||
"options": ["Machine", "User"],
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"name": "sender",
|
"name": "sender",
|
||||||
"display_name": "Sender Type",
|
"display_name": "Sender Type",
|
||||||
"advanced": true,
|
"advanced": true,
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"info": "Type of sender.",
|
"info": "Type of sender.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"info": "",
|
|
||||||
"load_from_db": false,
|
|
||||||
"title_case": false,
|
|
||||||
"input_types": ["Text"]
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"sender_name": {
|
"sender_name": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -132,11 +86,7 @@
|
||||||
"list": false,
|
"list": false,
|
||||||
"show": true,
|
"show": true,
|
||||||
"multiline": false,
|
"multiline": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"value": "",
|
"value": "",
|
||||||
=======
|
|
||||||
"value": "User",
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
|
|
@ -144,19 +94,12 @@
|
||||||
"display_name": "Sender Name",
|
"display_name": "Sender Name",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"info": "Name of the sender.",
|
"info": "Name of the sender.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"info": "",
|
|
||||||
"load_from_db": false,
|
|
||||||
"title_case": false,
|
|
||||||
"input_types": ["Text"]
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"session_id": {
|
"session_id": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -165,16 +108,12 @@
|
||||||
"list": false,
|
"list": false,
|
||||||
"show": true,
|
"show": true,
|
||||||
"multiline": false,
|
"multiline": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"value": "",
|
"value": "",
|
||||||
=======
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
"name": "session_id",
|
"name": "session_id",
|
||||||
"display_name": "Session ID",
|
"display_name": "Session ID",
|
||||||
<<<<<<< HEAD
|
|
||||||
"advanced": true,
|
"advanced": true,
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "Session ID for the message.",
|
"info": "Session ID for the message.",
|
||||||
|
|
@ -194,21 +133,6 @@
|
||||||
"Record",
|
"Record",
|
||||||
"str"
|
"str"
|
||||||
],
|
],
|
||||||
=======
|
|
||||||
"advanced": false,
|
|
||||||
"dynamic": false,
|
|
||||||
"info": "If provided, the message will be stored in the memory.",
|
|
||||||
"load_from_db": false,
|
|
||||||
"title_case": false,
|
|
||||||
"input_types": ["Text"],
|
|
||||||
"value": "MySessionID"
|
|
||||||
},
|
|
||||||
"_type": "CustomComponent"
|
|
||||||
},
|
|
||||||
"description": "Get chat inputs from the Playground.",
|
|
||||||
"icon": "ChatInput",
|
|
||||||
"base_classes": ["Text", "object", "Record", "str"],
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"display_name": "Chat Input",
|
"display_name": "Chat Input",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
|
|
@ -218,7 +142,6 @@
|
||||||
"session_id": null,
|
"session_id": null,
|
||||||
"return_record": null
|
"return_record": null
|
||||||
},
|
},
|
||||||
<<<<<<< HEAD
|
|
||||||
"output_types": [
|
"output_types": [
|
||||||
"Text",
|
"Text",
|
||||||
"Record"
|
"Record"
|
||||||
|
|
@ -247,13 +170,6 @@
|
||||||
"method": "record_response"
|
"method": "record_response"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"output_types": ["Text", "Record"],
|
|
||||||
"field_formatters": {},
|
|
||||||
"frozen": false,
|
|
||||||
"field_order": [],
|
|
||||||
"beta": false
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"id": "ChatInput-t7F8v"
|
"id": "ChatInput-t7F8v"
|
||||||
},
|
},
|
||||||
|
|
@ -284,11 +200,7 @@
|
||||||
"list": false,
|
"list": false,
|
||||||
"show": true,
|
"show": true,
|
||||||
"multiline": true,
|
"multiline": true,
|
||||||
<<<<<<< HEAD
|
|
||||||
"value": "from langflow.base.io.chat import ChatComponent\nfrom langflow.field_typing import Text\nfrom langflow.schema import Record\nfrom langflow.template import Input, Output\n\n\nclass ChatOutput(ChatComponent):\n display_name = \"Chat Output\"\n description = \"Display a chat message in the Playground.\"\n icon = \"ChatOutput\"\n\n inputs = [\n Input(\n name=\"input_value\", type=str, display_name=\"Message\", multiline=True, info=\"Message to be passed as output.\"\n ),\n Input(\n name=\"sender\",\n type=str,\n display_name=\"Sender Type\",\n options=[\"Machine\", \"User\"],\n value=\"Machine\",\n advanced=True,\n info=\"Type of sender.\",\n ),\n Input(name=\"sender_name\", type=str, display_name=\"Sender Name\", info=\"Name of the sender.\", value=\"AI\"),\n Input(\n name=\"session_id\", type=str, display_name=\"Session ID\", info=\"Session ID for the message.\", advanced=True\n ),\n Input(\n name=\"record_template\",\n type=str,\n display_name=\"Record Template\",\n value=\"{text}\",\n advanced=True,\n info=\"Template to convert Record to Text. If left empty, it will be dynamically set to the Record's text key.\",\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"text_response\"),\n Output(display_name=\"Record\", name=\"record\", method=\"record_response\"),\n ]\n\n def text_response(self) -> Text:\n result = self.input_value\n if self.session_id and isinstance(result, (Record, str)):\n self.store_message(result, self.session_id, self.sender, self.sender_name)\n return result\n\n def record_response(self) -> Record:\n record = Record(\n data={\n \"message\": self.input_value,\n \"sender\": self.sender,\n \"sender_name\": self.sender_name,\n \"session_id\": self.session_id,\n \"template\": self.record_template or \"\",\n }\n )\n if self.session_id and isinstance(record, (Record, str)):\n self.store_message(record, self.session_id, self.sender, self.sender_name)\n return record\n",
|
"value": "from langflow.base.io.chat import ChatComponent\nfrom langflow.field_typing import Text\nfrom langflow.schema import Record\nfrom langflow.template import Input, Output\n\n\nclass ChatOutput(ChatComponent):\n display_name = \"Chat Output\"\n description = \"Display a chat message in the Playground.\"\n icon = \"ChatOutput\"\n\n inputs = [\n Input(\n name=\"input_value\", type=str, display_name=\"Message\", multiline=True, info=\"Message to be passed as output.\"\n ),\n Input(\n name=\"sender\",\n type=str,\n display_name=\"Sender Type\",\n options=[\"Machine\", \"User\"],\n value=\"Machine\",\n advanced=True,\n info=\"Type of sender.\",\n ),\n Input(name=\"sender_name\", type=str, display_name=\"Sender Name\", info=\"Name of the sender.\", value=\"AI\"),\n Input(\n name=\"session_id\", type=str, display_name=\"Session ID\", info=\"Session ID for the message.\", advanced=True\n ),\n Input(\n name=\"record_template\",\n type=str,\n display_name=\"Record Template\",\n value=\"{text}\",\n advanced=True,\n info=\"Template to convert Record to Text. If left empty, it will be dynamically set to the Record's text key.\",\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"text_response\"),\n Output(display_name=\"Record\", name=\"record\", method=\"record_response\"),\n ]\n\n def text_response(self) -> Text:\n result = self.input_value\n if self.session_id and isinstance(result, (Record, str)):\n self.store_message(result, self.session_id, self.sender, self.sender_name)\n return result\n\n def record_response(self) -> Record:\n record = Record(\n data={\n \"message\": self.input_value,\n \"sender\": self.sender,\n \"sender_name\": self.sender_name,\n \"session_id\": self.session_id,\n \"template\": self.record_template or \"\",\n }\n )\n if self.session_id and isinstance(record, (Record, str)):\n self.store_message(record, self.session_id, self.sender, self.sender_name)\n return record\n",
|
||||||
=======
|
|
||||||
"value": "from typing import Optional, Union\n\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.field_typing import Text\nfrom langflow.schema import Record\n\n\nclass ChatOutput(ChatComponent):\n display_name = \"Chat Output\"\n description = \"Display a chat message in the Playground.\"\n icon = \"ChatOutput\"\n\n def build(\n self,\n sender: Optional[str] = \"Machine\",\n sender_name: Optional[str] = \"AI\",\n input_value: Optional[str] = None,\n session_id: Optional[str] = None,\n return_record: Optional[bool] = False,\n record_template: Optional[str] = \"{text}\",\n ) -> Union[Text, Record]:\n return super().build_with_record(\n sender=sender,\n sender_name=sender_name,\n input_value=input_value,\n session_id=session_id,\n return_record=return_record,\n record_template=record_template or \"\",\n )\n",
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
|
|
@ -306,17 +218,13 @@
|
||||||
"list": false,
|
"list": false,
|
||||||
"show": true,
|
"show": true,
|
||||||
"multiline": true,
|
"multiline": true,
|
||||||
<<<<<<< HEAD
|
|
||||||
"value": "",
|
"value": "",
|
||||||
=======
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
"name": "input_value",
|
"name": "input_value",
|
||||||
"display_name": "Message",
|
"display_name": "Message",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "Message to be passed as output.",
|
"info": "Message to be passed as output.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
|
|
@ -327,22 +235,11 @@
|
||||||
},
|
},
|
||||||
"record_template": {
|
"record_template": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
=======
|
|
||||||
"input_types": ["Text"],
|
|
||||||
"dynamic": false,
|
|
||||||
"info": "",
|
|
||||||
"load_from_db": false,
|
|
||||||
"title_case": false
|
|
||||||
},
|
|
||||||
"return_record": {
|
|
||||||
"type": "bool",
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"required": false,
|
"required": false,
|
||||||
"placeholder": "",
|
"placeholder": "",
|
||||||
"list": false,
|
"list": false,
|
||||||
"show": true,
|
"show": true,
|
||||||
"multiline": false,
|
"multiline": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"value": "",
|
"value": "",
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
|
|
@ -357,19 +254,6 @@
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"value": false,
|
|
||||||
"fileTypes": [],
|
|
||||||
"file_path": "",
|
|
||||||
"password": false,
|
|
||||||
"name": "return_record",
|
|
||||||
"display_name": "Return Record",
|
|
||||||
"advanced": true,
|
|
||||||
"dynamic": false,
|
|
||||||
"info": "Return the message as a record containing the sender, sender_name, and session_id.",
|
|
||||||
"load_from_db": false,
|
|
||||||
"title_case": false
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"sender": {
|
"sender": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -378,7 +262,6 @@
|
||||||
"list": true,
|
"list": true,
|
||||||
"show": true,
|
"show": true,
|
||||||
"multiline": false,
|
"multiline": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"value": "",
|
"value": "",
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
|
|
@ -387,30 +270,16 @@
|
||||||
"Machine",
|
"Machine",
|
||||||
"User"
|
"User"
|
||||||
],
|
],
|
||||||
=======
|
|
||||||
"value": "Machine",
|
|
||||||
"fileTypes": [],
|
|
||||||
"file_path": "",
|
|
||||||
"password": false,
|
|
||||||
"options": ["Machine", "User"],
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"name": "sender",
|
"name": "sender",
|
||||||
"display_name": "Sender Type",
|
"display_name": "Sender Type",
|
||||||
"advanced": true,
|
"advanced": true,
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"info": "Type of sender.",
|
"info": "Type of sender.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"info": "",
|
|
||||||
"load_from_db": false,
|
|
||||||
"title_case": false,
|
|
||||||
"input_types": ["Text"]
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"sender_name": {
|
"sender_name": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -419,11 +288,7 @@
|
||||||
"list": false,
|
"list": false,
|
||||||
"show": true,
|
"show": true,
|
||||||
"multiline": false,
|
"multiline": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"value": "",
|
"value": "",
|
||||||
=======
|
|
||||||
"value": "AI",
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
|
|
@ -431,19 +296,12 @@
|
||||||
"display_name": "Sender Name",
|
"display_name": "Sender Name",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"info": "Name of the sender.",
|
"info": "Name of the sender.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"info": "",
|
|
||||||
"load_from_db": false,
|
|
||||||
"title_case": false,
|
|
||||||
"input_types": ["Text"]
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"session_id": {
|
"session_id": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -452,16 +310,12 @@
|
||||||
"list": false,
|
"list": false,
|
||||||
"show": true,
|
"show": true,
|
||||||
"multiline": false,
|
"multiline": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"value": "",
|
"value": "",
|
||||||
=======
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
"name": "session_id",
|
"name": "session_id",
|
||||||
"display_name": "Session ID",
|
"display_name": "Session ID",
|
||||||
<<<<<<< HEAD
|
|
||||||
"advanced": true,
|
"advanced": true,
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "Session ID for the message.",
|
"info": "Session ID for the message.",
|
||||||
|
|
@ -481,21 +335,6 @@
|
||||||
"Record",
|
"Record",
|
||||||
"str"
|
"str"
|
||||||
],
|
],
|
||||||
=======
|
|
||||||
"advanced": false,
|
|
||||||
"dynamic": false,
|
|
||||||
"info": "If provided, the message will be stored in the memory.",
|
|
||||||
"load_from_db": false,
|
|
||||||
"title_case": false,
|
|
||||||
"input_types": ["Text"],
|
|
||||||
"value": "MySessionID"
|
|
||||||
},
|
|
||||||
"_type": "CustomComponent"
|
|
||||||
},
|
|
||||||
"description": "Display a chat message in the Playground.",
|
|
||||||
"icon": "ChatOutput",
|
|
||||||
"base_classes": ["Text", "object", "Record", "str"],
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"display_name": "Chat Output",
|
"display_name": "Chat Output",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
|
|
@ -505,7 +344,6 @@
|
||||||
"session_id": null,
|
"session_id": null,
|
||||||
"return_record": null
|
"return_record": null
|
||||||
},
|
},
|
||||||
<<<<<<< HEAD
|
|
||||||
"output_types": [
|
"output_types": [
|
||||||
"Text",
|
"Text",
|
||||||
"Record"
|
"Record"
|
||||||
|
|
@ -534,13 +372,6 @@
|
||||||
"method": "record_response"
|
"method": "record_response"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"output_types": ["Text", "Record"],
|
|
||||||
"field_formatters": {},
|
|
||||||
"frozen": false,
|
|
||||||
"field_order": [],
|
|
||||||
"beta": false
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"id": "ChatOutput-P1jEe"
|
"id": "ChatOutput-P1jEe"
|
||||||
},
|
},
|
||||||
|
|
@ -612,14 +443,10 @@
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"options": [
|
"options": [
|
||||||
"Ascending",
|
"Ascending",
|
||||||
"Descending"
|
"Descending"
|
||||||
],
|
],
|
||||||
=======
|
|
||||||
"options": ["Ascending", "Descending"],
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"name": "order",
|
"name": "order",
|
||||||
"display_name": "Order",
|
"display_name": "Order",
|
||||||
"advanced": true,
|
"advanced": true,
|
||||||
|
|
@ -627,13 +454,9 @@
|
||||||
"info": "Order of the messages.",
|
"info": "Order of the messages.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"input_types": ["Text"]
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"record_template": {
|
"record_template": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -653,13 +476,9 @@
|
||||||
"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.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"input_types": ["Text"]
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"sender": {
|
"sender": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -672,15 +491,11 @@
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"options": [
|
"options": [
|
||||||
"Machine",
|
"Machine",
|
||||||
"User",
|
"User",
|
||||||
"Machine and User"
|
"Machine and User"
|
||||||
],
|
],
|
||||||
=======
|
|
||||||
"options": ["Machine", "User", "Machine and User"],
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"name": "sender",
|
"name": "sender",
|
||||||
"display_name": "Sender Type",
|
"display_name": "Sender Type",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
|
|
@ -688,13 +503,9 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"input_types": ["Text"]
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"sender_name": {
|
"sender_name": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -713,13 +524,9 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"input_types": ["Text"]
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"session_id": {
|
"session_id": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -734,13 +541,9 @@
|
||||||
"name": "session_id",
|
"name": "session_id",
|
||||||
"display_name": "Session ID",
|
"display_name": "Session ID",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
=======
|
|
||||||
"input_types": ["Text"],
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "Session ID of the chat history.",
|
"info": "Session ID of the chat history.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
|
|
@ -751,15 +554,11 @@
|
||||||
},
|
},
|
||||||
"description": "Retrieves stored chat messages given a specific Session ID.",
|
"description": "Retrieves stored chat messages given a specific Session ID.",
|
||||||
"icon": "history",
|
"icon": "history",
|
||||||
<<<<<<< HEAD
|
|
||||||
"base_classes": [
|
"base_classes": [
|
||||||
"str",
|
"str",
|
||||||
"Text",
|
"Text",
|
||||||
"object"
|
"object"
|
||||||
],
|
],
|
||||||
=======
|
|
||||||
"base_classes": ["str", "Text", "object"],
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"display_name": "Chat Memory",
|
"display_name": "Chat Memory",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
|
|
@ -770,7 +569,6 @@
|
||||||
"order": null,
|
"order": null,
|
||||||
"record_template": null
|
"record_template": null
|
||||||
},
|
},
|
||||||
<<<<<<< HEAD
|
|
||||||
"output_types": [
|
"output_types": [
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
|
|
@ -789,13 +587,6 @@
|
||||||
"method": null
|
"method": null
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"output_types": ["Text"],
|
|
||||||
"field_formatters": {},
|
|
||||||
"frozen": false,
|
|
||||||
"field_order": [],
|
|
||||||
"beta": true
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"id": "MemoryComponent-cdA1J",
|
"id": "MemoryComponent-cdA1J",
|
||||||
"description": "Retrieves stored chat messages given a specific Session ID.",
|
"description": "Retrieves stored chat messages given a specific Session ID.",
|
||||||
|
|
@ -828,11 +619,7 @@
|
||||||
"list": false,
|
"list": false,
|
||||||
"show": true,
|
"show": true,
|
||||||
"multiline": true,
|
"multiline": true,
|
||||||
<<<<<<< HEAD
|
|
||||||
"value": "from langchain_core.prompts import PromptTemplate\n\nfrom langflow.custom import CustomComponent\nfrom langflow.field_typing import Input, Prompt, Text\n\n\nclass PromptComponent(CustomComponent):\n display_name: str = \"Prompt\"\n description: str = \"Create a prompt template with dynamic variables.\"\n icon = \"prompts\"\n\n def build_config(self):\n return {\n \"template\": Input(display_name=\"Template\"),\n \"code\": Input(advanced=True),\n }\n\n def build(\n self,\n template: Prompt,\n **kwargs,\n ) -> Text:\n from langflow.base.prompts.utils import dict_values_to_string\n\n prompt_template = PromptTemplate.from_template(Text(template))\n kwargs = dict_values_to_string(kwargs)\n kwargs = {k: \"\\n\".join(v) if isinstance(v, list) else v for k, v in kwargs.items()}\n try:\n formated_prompt = prompt_template.format(**kwargs)\n except Exception as exc:\n raise ValueError(f\"Error formatting prompt: {exc}\") from exc\n self.status = f'Prompt:\\n\"{formated_prompt}\"'\n return formated_prompt\n",
|
"value": "from langchain_core.prompts import PromptTemplate\n\nfrom langflow.custom import CustomComponent\nfrom langflow.field_typing import Input, Prompt, Text\n\n\nclass PromptComponent(CustomComponent):\n display_name: str = \"Prompt\"\n description: str = \"Create a prompt template with dynamic variables.\"\n icon = \"prompts\"\n\n def build_config(self):\n return {\n \"template\": Input(display_name=\"Template\"),\n \"code\": Input(advanced=True),\n }\n\n def build(\n self,\n template: Prompt,\n **kwargs,\n ) -> Text:\n from langflow.base.prompts.utils import dict_values_to_string\n\n prompt_template = PromptTemplate.from_template(Text(template))\n kwargs = dict_values_to_string(kwargs)\n kwargs = {k: \"\\n\".join(v) if isinstance(v, list) else v for k, v in kwargs.items()}\n try:\n formated_prompt = prompt_template.format(**kwargs)\n except Exception as exc:\n raise ValueError(f\"Error formatting prompt: {exc}\") from exc\n self.status = f'Prompt:\\n\"{formated_prompt}\"'\n return formated_prompt\n",
|
||||||
=======
|
|
||||||
"value": "from langchain_core.prompts import PromptTemplate\n\nfrom langflow.custom import CustomComponent\nfrom langflow.field_typing import Prompt, TemplateField, Text\n\n\nclass PromptComponent(CustomComponent):\n display_name: str = \"Prompt\"\n description: str = \"Create a prompt template with dynamic variables.\"\n icon = \"prompts\"\n\n def build_config(self):\n return {\n \"template\": TemplateField(display_name=\"Template\"),\n \"code\": TemplateField(advanced=True),\n }\n\n def build(\n self,\n template: Prompt,\n **kwargs,\n ) -> Text:\n from langflow.base.prompts.utils import dict_values_to_string\n\n prompt_template = PromptTemplate.from_template(Text(template))\n kwargs = dict_values_to_string(kwargs)\n kwargs = {k: \"\\n\".join(v) if isinstance(v, list) else v for k, v in kwargs.items()}\n try:\n formated_prompt = prompt_template.format(**kwargs)\n except Exception as exc:\n raise ValueError(f\"Error formatting prompt: {exc}\") from exc\n self.status = f'Prompt:\\n\"{formated_prompt}\"'\n return formated_prompt\n",
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
|
|
@ -857,13 +644,9 @@
|
||||||
"name": "template",
|
"name": "template",
|
||||||
"display_name": "Template",
|
"display_name": "Template",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
=======
|
|
||||||
"input_types": ["Text"],
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
|
|
@ -928,20 +711,15 @@
|
||||||
"is_input": null,
|
"is_input": null,
|
||||||
"is_output": null,
|
"is_output": null,
|
||||||
"is_composition": null,
|
"is_composition": null,
|
||||||
<<<<<<< HEAD
|
|
||||||
"base_classes": [
|
"base_classes": [
|
||||||
"Text",
|
"Text",
|
||||||
"str",
|
"str",
|
||||||
"object"
|
"object"
|
||||||
],
|
],
|
||||||
=======
|
|
||||||
"base_classes": ["Text", "str", "object"],
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"name": "",
|
"name": "",
|
||||||
"display_name": "Prompt",
|
"display_name": "Prompt",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
<<<<<<< HEAD
|
|
||||||
"template": [
|
"template": [
|
||||||
"context",
|
"context",
|
||||||
"user_message"
|
"user_message"
|
||||||
|
|
@ -950,17 +728,11 @@
|
||||||
"output_types": [
|
"output_types": [
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
=======
|
|
||||||
"template": ["context", "user_message"]
|
|
||||||
},
|
|
||||||
"output_types": ["Text"],
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"full_path": null,
|
"full_path": null,
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [],
|
"field_order": [],
|
||||||
"beta": false,
|
"beta": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"error": null,
|
"error": null,
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
|
|
@ -973,9 +745,6 @@
|
||||||
"method": null
|
"method": null
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"error": null
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"id": "Prompt-ODkUx",
|
"id": "Prompt-ODkUx",
|
||||||
"description": "A component for creating prompt templates using dynamic variables.",
|
"description": "A component for creating prompt templates using dynamic variables.",
|
||||||
|
|
@ -1018,13 +787,9 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"input_types": ["Text"]
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"code": {
|
"code": {
|
||||||
"type": "code",
|
"type": "code",
|
||||||
|
|
@ -1107,13 +872,9 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"input_types": ["Text"]
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"openai_api_base": {
|
"openai_api_base": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -1132,13 +893,9 @@
|
||||||
"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.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"input_types": ["Text"]
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"openai_api_key": {
|
"openai_api_key": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -1157,13 +914,9 @@
|
||||||
"info": "The OpenAI API Key to use for the OpenAI model.",
|
"info": "The OpenAI API Key to use for the OpenAI model.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
=======
|
|
||||||
"input_types": ["Text"],
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"value": "OPENAI_API_KEY"
|
"value": "OPENAI_API_KEY"
|
||||||
},
|
},
|
||||||
"stream": {
|
"stream": {
|
||||||
|
|
@ -1202,13 +955,9 @@
|
||||||
"info": "System message to pass to the model.",
|
"info": "System message to pass to the model.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"input_types": ["Text"]
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"temperature": {
|
"temperature": {
|
||||||
"type": "float",
|
"type": "float",
|
||||||
|
|
@ -1239,15 +988,11 @@
|
||||||
},
|
},
|
||||||
"description": "Generates text using OpenAI LLMs.",
|
"description": "Generates text using OpenAI LLMs.",
|
||||||
"icon": "OpenAI",
|
"icon": "OpenAI",
|
||||||
<<<<<<< HEAD
|
|
||||||
"base_classes": [
|
"base_classes": [
|
||||||
"str",
|
"str",
|
||||||
"object",
|
"object",
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
=======
|
|
||||||
"base_classes": ["str", "object", "Text"],
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"display_name": "OpenAI",
|
"display_name": "OpenAI",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
|
|
@ -1261,13 +1006,9 @@
|
||||||
"stream": null,
|
"stream": null,
|
||||||
"system_message": null
|
"system_message": null
|
||||||
},
|
},
|
||||||
<<<<<<< HEAD
|
|
||||||
"output_types": [
|
"output_types": [
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
=======
|
|
||||||
"output_types": ["Text"],
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [
|
"field_order": [
|
||||||
|
|
@ -1281,7 +1022,6 @@
|
||||||
"system_message",
|
"system_message",
|
||||||
"stream"
|
"stream"
|
||||||
],
|
],
|
||||||
<<<<<<< HEAD
|
|
||||||
"beta": false,
|
"beta": false,
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
|
|
@ -1294,9 +1034,6 @@
|
||||||
"method": null
|
"method": null
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"beta": false
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"id": "OpenAIModel-9RykF"
|
"id": "OpenAIModel-9RykF"
|
||||||
},
|
},
|
||||||
|
|
@ -1334,14 +1071,10 @@
|
||||||
"name": "input_value",
|
"name": "input_value",
|
||||||
"display_name": "Value",
|
"display_name": "Value",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Record",
|
"Record",
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
=======
|
|
||||||
"input_types": ["Record", "Text"],
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "Text or Record to be passed as output.",
|
"info": "Text or Record to be passed as output.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
|
|
@ -1383,40 +1116,28 @@
|
||||||
"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.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
<<<<<<< HEAD
|
|
||||||
"input_types": [
|
"input_types": [
|
||||||
"Text"
|
"Text"
|
||||||
]
|
]
|
||||||
=======
|
|
||||||
"input_types": ["Text"]
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
},
|
},
|
||||||
"_type": "CustomComponent"
|
"_type": "CustomComponent"
|
||||||
},
|
},
|
||||||
"description": "Display a text output in the Playground.",
|
"description": "Display a text output in the Playground.",
|
||||||
"icon": "type",
|
"icon": "type",
|
||||||
<<<<<<< HEAD
|
|
||||||
"base_classes": [
|
"base_classes": [
|
||||||
"str",
|
"str",
|
||||||
"object",
|
"object",
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
=======
|
|
||||||
"base_classes": ["str", "object", "Text"],
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"display_name": "Inspect Memory",
|
"display_name": "Inspect Memory",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
"input_value": null,
|
"input_value": null,
|
||||||
"record_template": null
|
"record_template": null
|
||||||
},
|
},
|
||||||
<<<<<<< HEAD
|
|
||||||
"output_types": [
|
"output_types": [
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
=======
|
|
||||||
"output_types": ["Text"],
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [],
|
"field_order": [],
|
||||||
|
|
@ -1437,17 +1158,12 @@
|
||||||
"edges": [
|
"edges": [
|
||||||
{
|
{
|
||||||
"source": "MemoryComponent-cdA1J",
|
"source": "MemoryComponent-cdA1J",
|
||||||
<<<<<<< HEAD
|
|
||||||
"sourceHandle": "{\"dataType\": \"MemoryComponent\", \"id\": \"MemoryComponent-cdA1J\", \"output_types\": [\"Text\"], \"name\": \"Text\"}",
|
"sourceHandle": "{\"dataType\": \"MemoryComponent\", \"id\": \"MemoryComponent-cdA1J\", \"output_types\": [\"Text\"], \"name\": \"Text\"}",
|
||||||
=======
|
|
||||||
"sourceHandle": "{œbaseClassesœ:[œstrœ,œTextœ,œobjectœ],œdataTypeœ:œMemoryComponentœ,œidœ:œMemoryComponent-cdA1Jœ}",
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"target": "Prompt-ODkUx",
|
"target": "Prompt-ODkUx",
|
||||||
"targetHandle": "{œfieldNameœ:œcontextœ,œidœ:œPrompt-ODkUxœ,œinputTypesœ:[œDocumentœ,œBaseOutputParserœ,œRecordœ,œTextœ],œtypeœ:œstrœ}",
|
"targetHandle": "{œfieldNameœ:œcontextœ,œidœ:œPrompt-ODkUxœ,œinputTypesœ:[œDocumentœ,œBaseOutputParserœ,œRecordœ,œTextœ],œtypeœ:œstrœ}",
|
||||||
"data": {
|
"data": {
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "context",
|
"fieldName": "context",
|
||||||
<<<<<<< HEAD
|
|
||||||
"id": "Prompt-ODkUx",
|
"id": "Prompt-ODkUx",
|
||||||
"inputTypes": [
|
"inputTypes": [
|
||||||
"Document",
|
"Document",
|
||||||
|
|
@ -1464,16 +1180,6 @@
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
"name": "Text"
|
"name": "Text"
|
||||||
=======
|
|
||||||
"type": "str",
|
|
||||||
"id": "Prompt-ODkUx",
|
|
||||||
"inputTypes": ["Document", "BaseOutputParser", "Record", "Text"]
|
|
||||||
},
|
|
||||||
"sourceHandle": {
|
|
||||||
"baseClasses": ["str", "Text", "object"],
|
|
||||||
"dataType": "MemoryComponent",
|
|
||||||
"id": "MemoryComponent-cdA1J"
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"style": {
|
"style": {
|
||||||
|
|
@ -1485,17 +1191,12 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "ChatInput-t7F8v",
|
"source": "ChatInput-t7F8v",
|
||||||
<<<<<<< HEAD
|
|
||||||
"sourceHandle": "{\"dataType\": \"ChatInput\", \"id\": \"ChatInput-t7F8v\", \"output_types\": [\"Text\"], \"name\": \"message\"}",
|
"sourceHandle": "{\"dataType\": \"ChatInput\", \"id\": \"ChatInput-t7F8v\", \"output_types\": [\"Text\"], \"name\": \"message\"}",
|
||||||
=======
|
|
||||||
"sourceHandle": "{œbaseClassesœ:[œTextœ,œobjectœ,œRecordœ,œstrœ],œdataTypeœ:œChatInputœ,œidœ:œChatInput-t7F8vœ}",
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"target": "Prompt-ODkUx",
|
"target": "Prompt-ODkUx",
|
||||||
"targetHandle": "{œfieldNameœ:œuser_messageœ,œidœ:œPrompt-ODkUxœ,œinputTypesœ:[œDocumentœ,œBaseOutputParserœ,œRecordœ,œTextœ],œtypeœ:œstrœ}",
|
"targetHandle": "{œfieldNameœ:œuser_messageœ,œidœ:œPrompt-ODkUxœ,œinputTypesœ:[œDocumentœ,œBaseOutputParserœ,œRecordœ,œTextœ],œtypeœ:œstrœ}",
|
||||||
"data": {
|
"data": {
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "user_message",
|
"fieldName": "user_message",
|
||||||
<<<<<<< HEAD
|
|
||||||
"id": "Prompt-ODkUx",
|
"id": "Prompt-ODkUx",
|
||||||
"inputTypes": [
|
"inputTypes": [
|
||||||
"Document",
|
"Document",
|
||||||
|
|
@ -1512,16 +1213,6 @@
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
"name": "message"
|
"name": "message"
|
||||||
=======
|
|
||||||
"type": "str",
|
|
||||||
"id": "Prompt-ODkUx",
|
|
||||||
"inputTypes": ["Document", "BaseOutputParser", "Record", "Text"]
|
|
||||||
},
|
|
||||||
"sourceHandle": {
|
|
||||||
"baseClasses": ["Text", "object", "Record", "str"],
|
|
||||||
"dataType": "ChatInput",
|
|
||||||
"id": "ChatInput-t7F8v"
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"style": {
|
"style": {
|
||||||
|
|
@ -1533,18 +1224,13 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "Prompt-ODkUx",
|
"source": "Prompt-ODkUx",
|
||||||
<<<<<<< HEAD
|
|
||||||
"sourceHandle": "{\"dataType\": \"Prompt\", \"id\": \"Prompt-ODkUx\", \"output_types\": [\"Text\"], \"name\": \"Text\"}",
|
"sourceHandle": "{\"dataType\": \"Prompt\", \"id\": \"Prompt-ODkUx\", \"output_types\": [\"Text\"], \"name\": \"Text\"}",
|
||||||
=======
|
|
||||||
"sourceHandle": "{œbaseClassesœ:[œTextœ,œstrœ,œobjectœ],œdataTypeœ:œPromptœ,œidœ:œPrompt-ODkUxœ}",
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"target": "OpenAIModel-9RykF",
|
"target": "OpenAIModel-9RykF",
|
||||||
"targetHandle": "{œfieldNameœ:œinput_valueœ,œidœ:œOpenAIModel-9RykFœ,œinputTypesœ:[œTextœ],œtypeœ:œstrœ}",
|
"targetHandle": "{œfieldNameœ:œinput_valueœ,œidœ:œOpenAIModel-9RykFœ,œinputTypesœ:[œTextœ],œtypeœ:œstrœ}",
|
||||||
"data": {
|
"data": {
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "input_value",
|
"fieldName": "input_value",
|
||||||
"id": "OpenAIModel-9RykF",
|
"id": "OpenAIModel-9RykF",
|
||||||
<<<<<<< HEAD
|
|
||||||
"inputTypes": [
|
"inputTypes": [
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
|
|
@ -1557,15 +1243,6 @@
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
"name": "Text"
|
"name": "Text"
|
||||||
=======
|
|
||||||
"inputTypes": ["Text"],
|
|
||||||
"type": "str"
|
|
||||||
},
|
|
||||||
"sourceHandle": {
|
|
||||||
"baseClasses": ["Text", "str", "object"],
|
|
||||||
"dataType": "Prompt",
|
|
||||||
"id": "Prompt-ODkUx"
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"style": {
|
"style": {
|
||||||
|
|
@ -1576,18 +1253,13 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "OpenAIModel-9RykF",
|
"source": "OpenAIModel-9RykF",
|
||||||
<<<<<<< HEAD
|
|
||||||
"sourceHandle": "{\"dataType\": \"OpenAIModel\", \"id\": \"OpenAIModel-9RykF\", \"output_types\": [\"Text\"], \"name\": \"Text\"}",
|
"sourceHandle": "{\"dataType\": \"OpenAIModel\", \"id\": \"OpenAIModel-9RykF\", \"output_types\": [\"Text\"], \"name\": \"Text\"}",
|
||||||
=======
|
|
||||||
"sourceHandle": "{œbaseClassesœ:[œstrœ,œobjectœ,œTextœ],œdataTypeœ:œOpenAIModelœ,œidœ:œOpenAIModel-9RykFœ}",
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"target": "ChatOutput-P1jEe",
|
"target": "ChatOutput-P1jEe",
|
||||||
"targetHandle": "{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-P1jEeœ,œinputTypesœ:[œTextœ],œtypeœ:œstrœ}",
|
"targetHandle": "{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-P1jEeœ,œinputTypesœ:[œTextœ],œtypeœ:œstrœ}",
|
||||||
"data": {
|
"data": {
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "input_value",
|
"fieldName": "input_value",
|
||||||
"id": "ChatOutput-P1jEe",
|
"id": "ChatOutput-P1jEe",
|
||||||
<<<<<<< HEAD
|
|
||||||
"inputTypes": [
|
"inputTypes": [
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
|
|
@ -1600,15 +1272,6 @@
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
"name": "Text"
|
"name": "Text"
|
||||||
=======
|
|
||||||
"inputTypes": ["Text"],
|
|
||||||
"type": "str"
|
|
||||||
},
|
|
||||||
"sourceHandle": {
|
|
||||||
"baseClasses": ["str", "object", "Text"],
|
|
||||||
"dataType": "OpenAIModel",
|
|
||||||
"id": "OpenAIModel-9RykF"
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"style": {
|
"style": {
|
||||||
|
|
@ -1619,18 +1282,13 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "MemoryComponent-cdA1J",
|
"source": "MemoryComponent-cdA1J",
|
||||||
<<<<<<< HEAD
|
|
||||||
"sourceHandle": "{\"dataType\": \"MemoryComponent\", \"id\": \"MemoryComponent-cdA1J\", \"output_types\": [\"Text\"], \"name\": \"Text\"}",
|
"sourceHandle": "{\"dataType\": \"MemoryComponent\", \"id\": \"MemoryComponent-cdA1J\", \"output_types\": [\"Text\"], \"name\": \"Text\"}",
|
||||||
=======
|
|
||||||
"sourceHandle": "{œbaseClassesœ:[œstrœ,œTextœ,œobjectœ],œdataTypeœ:œMemoryComponentœ,œidœ:œMemoryComponent-cdA1Jœ}",
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
"target": "TextOutput-vrs6T",
|
"target": "TextOutput-vrs6T",
|
||||||
"targetHandle": "{œfieldNameœ:œinput_valueœ,œidœ:œTextOutput-vrs6Tœ,œinputTypesœ:[œRecordœ,œTextœ],œtypeœ:œstrœ}",
|
"targetHandle": "{œfieldNameœ:œinput_valueœ,œidœ:œTextOutput-vrs6Tœ,œinputTypesœ:[œRecordœ,œTextœ],œtypeœ:œstrœ}",
|
||||||
"data": {
|
"data": {
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "input_value",
|
"fieldName": "input_value",
|
||||||
"id": "TextOutput-vrs6T",
|
"id": "TextOutput-vrs6T",
|
||||||
<<<<<<< HEAD
|
|
||||||
"inputTypes": [
|
"inputTypes": [
|
||||||
"Record",
|
"Record",
|
||||||
"Text"
|
"Text"
|
||||||
|
|
@ -1644,15 +1302,6 @@
|
||||||
"Text"
|
"Text"
|
||||||
],
|
],
|
||||||
"name": "Text"
|
"name": "Text"
|
||||||
=======
|
|
||||||
"inputTypes": ["Record", "Text"],
|
|
||||||
"type": "str"
|
|
||||||
},
|
|
||||||
"sourceHandle": {
|
|
||||||
"baseClasses": ["str", "Text", "object"],
|
|
||||||
"dataType": "MemoryComponent",
|
|
||||||
"id": "MemoryComponent-cdA1J"
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"style": {
|
"style": {
|
||||||
|
|
@ -1672,8 +1321,4 @@
|
||||||
"name": "Memory Chatbot",
|
"name": "Memory Chatbot",
|
||||||
"last_tested_version": "1.0.0a0",
|
"last_tested_version": "1.0.0a0",
|
||||||
"is_component": false
|
"is_component": false
|
||||||
<<<<<<< HEAD
|
|
||||||
}
|
}
|
||||||
=======
|
|
||||||
}
|
|
||||||
>>>>>>> origin/dev
|
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue