update json formatting
This commit is contained in:
parent
9c9a7f4aa1
commit
0bb19d8933
6 changed files with 9405 additions and 8540 deletions
|
|
@ -45,7 +45,9 @@
|
||||||
"name": "template",
|
"name": "template",
|
||||||
"display_name": "Template",
|
"display_name": "Template",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
"input_types": ["Text"],
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
|
|
@ -84,14 +86,22 @@
|
||||||
"is_input": null,
|
"is_input": null,
|
||||||
"is_output": null,
|
"is_output": null,
|
||||||
"is_composition": null,
|
"is_composition": null,
|
||||||
"base_classes": ["object", "str", "Text"],
|
"base_classes": [
|
||||||
|
"object",
|
||||||
|
"str",
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"name": "",
|
"name": "",
|
||||||
"display_name": "Prompt",
|
"display_name": "Prompt",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
"template": ["user_input"]
|
"template": [
|
||||||
|
"user_input"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"output_types": ["Text"],
|
"output_types": [
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"full_path": null,
|
"full_path": null,
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
|
|
@ -140,7 +150,9 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"code": {
|
"code": {
|
||||||
"type": "code",
|
"type": "code",
|
||||||
|
|
@ -223,7 +235,9 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"openai_api_base": {
|
"openai_api_base": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -242,7 +256,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,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"openai_api_key": {
|
"openai_api_key": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -261,7 +277,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,
|
||||||
"input_types": ["Text"],
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"value": "OPENAI_API_KEY"
|
"value": "OPENAI_API_KEY"
|
||||||
},
|
},
|
||||||
"stream": {
|
"stream": {
|
||||||
|
|
@ -300,7 +318,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,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"temperature": {
|
"temperature": {
|
||||||
"type": "float",
|
"type": "float",
|
||||||
|
|
@ -331,7 +351,11 @@
|
||||||
},
|
},
|
||||||
"description": "Generates text using OpenAI LLMs.",
|
"description": "Generates text using OpenAI LLMs.",
|
||||||
"icon": "OpenAI",
|
"icon": "OpenAI",
|
||||||
"base_classes": ["object", "Text", "str"],
|
"base_classes": [
|
||||||
|
"object",
|
||||||
|
"Text",
|
||||||
|
"str"
|
||||||
|
],
|
||||||
"display_name": "OpenAI",
|
"display_name": "OpenAI",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
|
|
@ -345,7 +369,9 @@
|
||||||
"stream": null,
|
"stream": null,
|
||||||
"system_message": null
|
"system_message": null
|
||||||
},
|
},
|
||||||
"output_types": ["Text"],
|
"output_types": [
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [
|
"field_order": [
|
||||||
|
|
@ -392,7 +418,7 @@
|
||||||
"list": false,
|
"list": false,
|
||||||
"show": true,
|
"show": true,
|
||||||
"multiline": true,
|
"multiline": true,
|
||||||
"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",
|
"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 files: Optional[list[str]] = None,\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 files=files,\n )\n",
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
|
|
@ -416,7 +442,9 @@
|
||||||
"name": "input_value",
|
"name": "input_value",
|
||||||
"display_name": "Message",
|
"display_name": "Message",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
"input_types": ["Text"],
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
|
|
@ -440,7 +468,9 @@
|
||||||
"info": "In case of Message being a Record, this template will be used to convert it to text.",
|
"info": "In case of Message being a Record, this template will be used to convert it to text.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"return_record": {
|
"return_record": {
|
||||||
"type": "bool",
|
"type": "bool",
|
||||||
|
|
@ -472,7 +502,10 @@
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
"options": ["Machine", "User"],
|
"options": [
|
||||||
|
"Machine",
|
||||||
|
"User"
|
||||||
|
],
|
||||||
"name": "sender",
|
"name": "sender",
|
||||||
"display_name": "Sender Type",
|
"display_name": "Sender Type",
|
||||||
"advanced": true,
|
"advanced": true,
|
||||||
|
|
@ -480,7 +513,9 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"sender_name": {
|
"sender_name": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -500,7 +535,9 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"session_id": {
|
"session_id": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -519,13 +556,20 @@
|
||||||
"info": "If provided, the message will be stored in the memory.",
|
"info": "If provided, the message will be stored in the memory.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"_type": "CustomComponent"
|
"_type": "CustomComponent"
|
||||||
},
|
},
|
||||||
"description": "Display a chat message in the Playground.",
|
"description": "Display a chat message in the Playground.",
|
||||||
"icon": "ChatOutput",
|
"icon": "ChatOutput",
|
||||||
"base_classes": ["Record", "Text", "str", "object"],
|
"base_classes": [
|
||||||
|
"Record",
|
||||||
|
"Text",
|
||||||
|
"str",
|
||||||
|
"object"
|
||||||
|
],
|
||||||
"display_name": "Chat Output",
|
"display_name": "Chat Output",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
|
|
@ -536,7 +580,10 @@
|
||||||
"return_record": null,
|
"return_record": null,
|
||||||
"record_template": null
|
"record_template": null
|
||||||
},
|
},
|
||||||
"output_types": ["Text", "Record"],
|
"output_types": [
|
||||||
|
"Text",
|
||||||
|
"Record"
|
||||||
|
],
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [],
|
"field_order": [],
|
||||||
|
|
@ -571,7 +618,7 @@
|
||||||
"list": false,
|
"list": false,
|
||||||
"show": true,
|
"show": true,
|
||||||
"multiline": true,
|
"multiline": true,
|
||||||
"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",
|
"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 files: Optional[list[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 files=files,\n session_id=session_id,\n return_record=return_record,\n )\n",
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
|
|
@ -632,7 +679,10 @@
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
"options": ["Machine", "User"],
|
"options": [
|
||||||
|
"Machine",
|
||||||
|
"User"
|
||||||
|
],
|
||||||
"name": "sender",
|
"name": "sender",
|
||||||
"display_name": "Sender Type",
|
"display_name": "Sender Type",
|
||||||
"advanced": true,
|
"advanced": true,
|
||||||
|
|
@ -640,7 +690,9 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"sender_name": {
|
"sender_name": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -660,7 +712,9 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"session_id": {
|
"session_id": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -679,13 +733,20 @@
|
||||||
"info": "If provided, the message will be stored in the memory.",
|
"info": "If provided, the message will be stored in the memory.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"_type": "CustomComponent"
|
"_type": "CustomComponent"
|
||||||
},
|
},
|
||||||
"description": "Get chat inputs from the Playground.",
|
"description": "Get chat inputs from the Playground.",
|
||||||
"icon": "ChatInput",
|
"icon": "ChatInput",
|
||||||
"base_classes": ["object", "Record", "str", "Text"],
|
"base_classes": [
|
||||||
|
"object",
|
||||||
|
"Record",
|
||||||
|
"str",
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"display_name": "Chat Input",
|
"display_name": "Chat Input",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
|
|
@ -695,7 +756,10 @@
|
||||||
"session_id": null,
|
"session_id": null,
|
||||||
"return_record": null
|
"return_record": null
|
||||||
},
|
},
|
||||||
"output_types": ["Text", "Record"],
|
"output_types": [
|
||||||
|
"Text",
|
||||||
|
"Record"
|
||||||
|
],
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [],
|
"field_order": [],
|
||||||
|
|
@ -723,11 +787,17 @@
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "input_value",
|
"fieldName": "input_value",
|
||||||
"id": "ChatOutput-njtka",
|
"id": "ChatOutput-njtka",
|
||||||
"inputTypes": ["Text"],
|
"inputTypes": [
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"type": "str"
|
"type": "str"
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"baseClasses": ["object", "Text", "str"],
|
"baseClasses": [
|
||||||
|
"object",
|
||||||
|
"Text",
|
||||||
|
"str"
|
||||||
|
],
|
||||||
"dataType": "OpenAIModel",
|
"dataType": "OpenAIModel",
|
||||||
"id": "OpenAIModel-k39HS"
|
"id": "OpenAIModel-k39HS"
|
||||||
}
|
}
|
||||||
|
|
@ -747,11 +817,17 @@
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "input_value",
|
"fieldName": "input_value",
|
||||||
"id": "OpenAIModel-k39HS",
|
"id": "OpenAIModel-k39HS",
|
||||||
"inputTypes": ["Text"],
|
"inputTypes": [
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"type": "str"
|
"type": "str"
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"baseClasses": ["object", "str", "Text"],
|
"baseClasses": [
|
||||||
|
"object",
|
||||||
|
"str",
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"dataType": "Prompt",
|
"dataType": "Prompt",
|
||||||
"id": "Prompt-uxBqP"
|
"id": "Prompt-uxBqP"
|
||||||
}
|
}
|
||||||
|
|
@ -771,11 +847,21 @@
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "user_input",
|
"fieldName": "user_input",
|
||||||
"id": "Prompt-uxBqP",
|
"id": "Prompt-uxBqP",
|
||||||
"inputTypes": ["Document", "BaseOutputParser", "Record", "Text"],
|
"inputTypes": [
|
||||||
|
"Document",
|
||||||
|
"BaseOutputParser",
|
||||||
|
"Record",
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"type": "str"
|
"type": "str"
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"baseClasses": ["object", "Record", "str", "Text"],
|
"baseClasses": [
|
||||||
|
"object",
|
||||||
|
"Record",
|
||||||
|
"str",
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"dataType": "ChatInput",
|
"dataType": "ChatInput",
|
||||||
"id": "ChatInput-P3fgL"
|
"id": "ChatInput-P3fgL"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,9 @@
|
||||||
"name": "template",
|
"name": "template",
|
||||||
"display_name": "Template",
|
"display_name": "Template",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
"input_types": ["Text"],
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
|
|
@ -136,14 +138,24 @@
|
||||||
"is_input": null,
|
"is_input": null,
|
||||||
"is_output": null,
|
"is_output": null,
|
||||||
"is_composition": null,
|
"is_composition": null,
|
||||||
"base_classes": ["object", "Text", "str"],
|
"base_classes": [
|
||||||
|
"object",
|
||||||
|
"Text",
|
||||||
|
"str"
|
||||||
|
],
|
||||||
"name": "",
|
"name": "",
|
||||||
"display_name": "Prompt",
|
"display_name": "Prompt",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
"template": ["reference_1", "reference_2", "instructions"]
|
"template": [
|
||||||
|
"reference_1",
|
||||||
|
"reference_2",
|
||||||
|
"instructions"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"output_types": ["Text"],
|
"output_types": [
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"full_path": null,
|
"full_path": null,
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
|
|
@ -210,7 +222,9 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": ["Text"],
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"value": [
|
"value": [
|
||||||
"https://www.promptingguide.ai/techniques/prompt_chaining"
|
"https://www.promptingguide.ai/techniques/prompt_chaining"
|
||||||
]
|
]
|
||||||
|
|
@ -219,13 +233,17 @@
|
||||||
},
|
},
|
||||||
"description": "Fetch content from one or more URLs.",
|
"description": "Fetch content from one or more URLs.",
|
||||||
"icon": "layout-template",
|
"icon": "layout-template",
|
||||||
"base_classes": ["Record"],
|
"base_classes": [
|
||||||
|
"Record"
|
||||||
|
],
|
||||||
"display_name": "URL",
|
"display_name": "URL",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
"urls": null
|
"urls": null
|
||||||
},
|
},
|
||||||
"output_types": ["Record"],
|
"output_types": [
|
||||||
|
"Record"
|
||||||
|
],
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [],
|
"field_order": [],
|
||||||
|
|
@ -260,7 +278,7 @@
|
||||||
"list": false,
|
"list": false,
|
||||||
"show": true,
|
"show": true,
|
||||||
"multiline": true,
|
"multiline": true,
|
||||||
"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",
|
"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 files: Optional[list[str]] = None,\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 files=files,\n )\n",
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
|
|
@ -284,7 +302,9 @@
|
||||||
"name": "input_value",
|
"name": "input_value",
|
||||||
"display_name": "Message",
|
"display_name": "Message",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
"input_types": ["Text"],
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
|
|
@ -308,7 +328,9 @@
|
||||||
"info": "In case of Message being a Record, this template will be used to convert it to text.",
|
"info": "In case of Message being a Record, this template will be used to convert it to text.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"return_record": {
|
"return_record": {
|
||||||
"type": "bool",
|
"type": "bool",
|
||||||
|
|
@ -340,7 +362,10 @@
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
"options": ["Machine", "User"],
|
"options": [
|
||||||
|
"Machine",
|
||||||
|
"User"
|
||||||
|
],
|
||||||
"name": "sender",
|
"name": "sender",
|
||||||
"display_name": "Sender Type",
|
"display_name": "Sender Type",
|
||||||
"advanced": true,
|
"advanced": true,
|
||||||
|
|
@ -348,7 +373,9 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"sender_name": {
|
"sender_name": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -368,7 +395,9 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"session_id": {
|
"session_id": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -387,13 +416,20 @@
|
||||||
"info": "If provided, the message will be stored in the memory.",
|
"info": "If provided, the message will be stored in the memory.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"_type": "CustomComponent"
|
"_type": "CustomComponent"
|
||||||
},
|
},
|
||||||
"description": "Display a chat message in the Playground.",
|
"description": "Display a chat message in the Playground.",
|
||||||
"icon": "ChatOutput",
|
"icon": "ChatOutput",
|
||||||
"base_classes": ["Text", "Record", "object", "str"],
|
"base_classes": [
|
||||||
|
"Text",
|
||||||
|
"Record",
|
||||||
|
"object",
|
||||||
|
"str"
|
||||||
|
],
|
||||||
"display_name": "Chat Output",
|
"display_name": "Chat Output",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
|
|
@ -404,7 +440,10 @@
|
||||||
"return_record": null,
|
"return_record": null,
|
||||||
"record_template": null
|
"record_template": null
|
||||||
},
|
},
|
||||||
"output_types": ["Text", "Record"],
|
"output_types": [
|
||||||
|
"Text",
|
||||||
|
"Record"
|
||||||
|
],
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [],
|
"field_order": [],
|
||||||
|
|
@ -444,7 +483,9 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"code": {
|
"code": {
|
||||||
"type": "code",
|
"type": "code",
|
||||||
|
|
@ -527,7 +568,9 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"openai_api_base": {
|
"openai_api_base": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -546,7 +589,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,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"openai_api_key": {
|
"openai_api_key": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -565,7 +610,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,
|
||||||
"input_types": ["Text"],
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"value": "OPENAI_API_KEY"
|
"value": "OPENAI_API_KEY"
|
||||||
},
|
},
|
||||||
"stream": {
|
"stream": {
|
||||||
|
|
@ -604,7 +651,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,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"temperature": {
|
"temperature": {
|
||||||
"type": "float",
|
"type": "float",
|
||||||
|
|
@ -635,7 +684,11 @@
|
||||||
},
|
},
|
||||||
"description": "Generates text using OpenAI LLMs.",
|
"description": "Generates text using OpenAI LLMs.",
|
||||||
"icon": "OpenAI",
|
"icon": "OpenAI",
|
||||||
"base_classes": ["str", "Text", "object"],
|
"base_classes": [
|
||||||
|
"str",
|
||||||
|
"Text",
|
||||||
|
"object"
|
||||||
|
],
|
||||||
"display_name": "OpenAI",
|
"display_name": "OpenAI",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
|
|
@ -649,7 +702,9 @@
|
||||||
"stream": null,
|
"stream": null,
|
||||||
"system_message": null
|
"system_message": null
|
||||||
},
|
},
|
||||||
"output_types": ["Text"],
|
"output_types": [
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [
|
"field_order": [
|
||||||
|
|
@ -722,20 +777,28 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": ["Text"],
|
"input_types": [
|
||||||
"value": ["https://www.promptingguide.ai/introduction/basics"]
|
"Text"
|
||||||
|
],
|
||||||
|
"value": [
|
||||||
|
"https://www.promptingguide.ai/introduction/basics"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"_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",
|
||||||
"base_classes": ["Record"],
|
"base_classes": [
|
||||||
|
"Record"
|
||||||
|
],
|
||||||
"display_name": "URL",
|
"display_name": "URL",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
"urls": null
|
"urls": null
|
||||||
},
|
},
|
||||||
"output_types": ["Record"],
|
"output_types": [
|
||||||
|
"Record"
|
||||||
|
],
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [],
|
"field_order": [],
|
||||||
|
|
@ -795,7 +858,10 @@
|
||||||
"name": "input_value",
|
"name": "input_value",
|
||||||
"display_name": "Value",
|
"display_name": "Value",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
"input_types": ["Record", "Text"],
|
"input_types": [
|
||||||
|
"Record",
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"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,
|
||||||
|
|
@ -819,20 +885,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,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"_type": "CustomComponent"
|
"_type": "CustomComponent"
|
||||||
},
|
},
|
||||||
"description": "Get text inputs from the Playground.",
|
"description": "Get text inputs from the Playground.",
|
||||||
"icon": "type",
|
"icon": "type",
|
||||||
"base_classes": ["object", "Text", "str"],
|
"base_classes": [
|
||||||
|
"object",
|
||||||
|
"Text",
|
||||||
|
"str"
|
||||||
|
],
|
||||||
"display_name": "Instructions",
|
"display_name": "Instructions",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
"input_value": null,
|
"input_value": null,
|
||||||
"record_template": null
|
"record_template": null
|
||||||
},
|
},
|
||||||
"output_types": ["Text"],
|
"output_types": [
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [],
|
"field_order": [],
|
||||||
|
|
@ -861,11 +935,18 @@
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "reference_2",
|
"fieldName": "reference_2",
|
||||||
"id": "Prompt-Rse03",
|
"id": "Prompt-Rse03",
|
||||||
"inputTypes": ["Document", "BaseOutputParser", "Record", "Text"],
|
"inputTypes": [
|
||||||
|
"Document",
|
||||||
|
"BaseOutputParser",
|
||||||
|
"Record",
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"type": "str"
|
"type": "str"
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"baseClasses": ["Record"],
|
"baseClasses": [
|
||||||
|
"Record"
|
||||||
|
],
|
||||||
"dataType": "URL",
|
"dataType": "URL",
|
||||||
"id": "URL-HYPkR"
|
"id": "URL-HYPkR"
|
||||||
}
|
}
|
||||||
|
|
@ -885,11 +966,17 @@
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "input_value",
|
"fieldName": "input_value",
|
||||||
"id": "ChatOutput-JPlxl",
|
"id": "ChatOutput-JPlxl",
|
||||||
"inputTypes": ["Text"],
|
"inputTypes": [
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"type": "str"
|
"type": "str"
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"baseClasses": ["str", "Text", "object"],
|
"baseClasses": [
|
||||||
|
"str",
|
||||||
|
"Text",
|
||||||
|
"object"
|
||||||
|
],
|
||||||
"dataType": "OpenAIModel",
|
"dataType": "OpenAIModel",
|
||||||
"id": "OpenAIModel-gi29P"
|
"id": "OpenAIModel-gi29P"
|
||||||
}
|
}
|
||||||
|
|
@ -909,11 +996,18 @@
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "reference_1",
|
"fieldName": "reference_1",
|
||||||
"id": "Prompt-Rse03",
|
"id": "Prompt-Rse03",
|
||||||
"inputTypes": ["Document", "BaseOutputParser", "Record", "Text"],
|
"inputTypes": [
|
||||||
|
"Document",
|
||||||
|
"BaseOutputParser",
|
||||||
|
"Record",
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"type": "str"
|
"type": "str"
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"baseClasses": ["Record"],
|
"baseClasses": [
|
||||||
|
"Record"
|
||||||
|
],
|
||||||
"dataType": "URL",
|
"dataType": "URL",
|
||||||
"id": "URL-2cX90"
|
"id": "URL-2cX90"
|
||||||
}
|
}
|
||||||
|
|
@ -933,11 +1027,20 @@
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "instructions",
|
"fieldName": "instructions",
|
||||||
"id": "Prompt-Rse03",
|
"id": "Prompt-Rse03",
|
||||||
"inputTypes": ["Document", "BaseOutputParser", "Record", "Text"],
|
"inputTypes": [
|
||||||
|
"Document",
|
||||||
|
"BaseOutputParser",
|
||||||
|
"Record",
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"type": "str"
|
"type": "str"
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"baseClasses": ["object", "Text", "str"],
|
"baseClasses": [
|
||||||
|
"object",
|
||||||
|
"Text",
|
||||||
|
"str"
|
||||||
|
],
|
||||||
"dataType": "TextInput",
|
"dataType": "TextInput",
|
||||||
"id": "TextInput-og8Or"
|
"id": "TextInput-og8Or"
|
||||||
}
|
}
|
||||||
|
|
@ -957,11 +1060,17 @@
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "input_value",
|
"fieldName": "input_value",
|
||||||
"id": "OpenAIModel-gi29P",
|
"id": "OpenAIModel-gi29P",
|
||||||
"inputTypes": ["Text"],
|
"inputTypes": [
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"type": "str"
|
"type": "str"
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"baseClasses": ["object", "Text", "str"],
|
"baseClasses": [
|
||||||
|
"object",
|
||||||
|
"Text",
|
||||||
|
"str"
|
||||||
|
],
|
||||||
"dataType": "Prompt",
|
"dataType": "Prompt",
|
||||||
"id": "Prompt-Rse03"
|
"id": "Prompt-Rse03"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,9 @@
|
||||||
"name": "template",
|
"name": "template",
|
||||||
"display_name": "Template",
|
"display_name": "Template",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
"input_types": ["Text"],
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
|
|
@ -110,14 +112,23 @@
|
||||||
"is_input": null,
|
"is_input": null,
|
||||||
"is_output": null,
|
"is_output": null,
|
||||||
"is_composition": null,
|
"is_composition": null,
|
||||||
"base_classes": ["object", "str", "Text"],
|
"base_classes": [
|
||||||
|
"object",
|
||||||
|
"str",
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"name": "",
|
"name": "",
|
||||||
"display_name": "Prompt",
|
"display_name": "Prompt",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
"template": ["Document", "Question"]
|
"template": [
|
||||||
|
"Document",
|
||||||
|
"Question"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"output_types": ["Text"],
|
"output_types": [
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"full_path": null,
|
"full_path": null,
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
|
|
@ -220,14 +231,18 @@
|
||||||
"_type": "CustomComponent"
|
"_type": "CustomComponent"
|
||||||
},
|
},
|
||||||
"description": "A generic file loader.",
|
"description": "A generic file loader.",
|
||||||
"base_classes": ["Record"],
|
"base_classes": [
|
||||||
|
"Record"
|
||||||
|
],
|
||||||
"display_name": "Files",
|
"display_name": "Files",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
"path": null,
|
"path": null,
|
||||||
"silent_errors": null
|
"silent_errors": null
|
||||||
},
|
},
|
||||||
"output_types": ["Record"],
|
"output_types": [
|
||||||
|
"Record"
|
||||||
|
],
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [],
|
"field_order": [],
|
||||||
|
|
@ -262,7 +277,7 @@
|
||||||
"list": false,
|
"list": false,
|
||||||
"show": true,
|
"show": true,
|
||||||
"multiline": true,
|
"multiline": true,
|
||||||
"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",
|
"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 files: Optional[list[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 files=files,\n session_id=session_id,\n return_record=return_record,\n )\n",
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
|
|
@ -323,7 +338,10 @@
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
"options": ["Machine", "User"],
|
"options": [
|
||||||
|
"Machine",
|
||||||
|
"User"
|
||||||
|
],
|
||||||
"name": "sender",
|
"name": "sender",
|
||||||
"display_name": "Sender Type",
|
"display_name": "Sender Type",
|
||||||
"advanced": true,
|
"advanced": true,
|
||||||
|
|
@ -331,7 +349,9 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"sender_name": {
|
"sender_name": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -351,7 +371,9 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"session_id": {
|
"session_id": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -370,13 +392,20 @@
|
||||||
"info": "If provided, the message will be stored in the memory.",
|
"info": "If provided, the message will be stored in the memory.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"_type": "CustomComponent"
|
"_type": "CustomComponent"
|
||||||
},
|
},
|
||||||
"description": "Get chat inputs from the Playground.",
|
"description": "Get chat inputs from the Playground.",
|
||||||
"icon": "ChatInput",
|
"icon": "ChatInput",
|
||||||
"base_classes": ["str", "Record", "Text", "object"],
|
"base_classes": [
|
||||||
|
"str",
|
||||||
|
"Record",
|
||||||
|
"Text",
|
||||||
|
"object"
|
||||||
|
],
|
||||||
"display_name": "Chat Input",
|
"display_name": "Chat Input",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
|
|
@ -386,7 +415,10 @@
|
||||||
"session_id": null,
|
"session_id": null,
|
||||||
"return_record": null
|
"return_record": null
|
||||||
},
|
},
|
||||||
"output_types": ["Text", "Record"],
|
"output_types": [
|
||||||
|
"Text",
|
||||||
|
"Record"
|
||||||
|
],
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [],
|
"field_order": [],
|
||||||
|
|
@ -421,7 +453,7 @@
|
||||||
"list": false,
|
"list": false,
|
||||||
"show": true,
|
"show": true,
|
||||||
"multiline": true,
|
"multiline": true,
|
||||||
"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",
|
"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 files: Optional[list[str]] = None,\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 files=files,\n )\n",
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
|
|
@ -445,7 +477,9 @@
|
||||||
"name": "input_value",
|
"name": "input_value",
|
||||||
"display_name": "Message",
|
"display_name": "Message",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
"input_types": ["Text"],
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
|
|
@ -481,7 +515,10 @@
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
"options": ["Machine", "User"],
|
"options": [
|
||||||
|
"Machine",
|
||||||
|
"User"
|
||||||
|
],
|
||||||
"name": "sender",
|
"name": "sender",
|
||||||
"display_name": "Sender Type",
|
"display_name": "Sender Type",
|
||||||
"advanced": true,
|
"advanced": true,
|
||||||
|
|
@ -489,7 +526,9 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"sender_name": {
|
"sender_name": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -509,7 +548,9 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"session_id": {
|
"session_id": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -528,13 +569,20 @@
|
||||||
"info": "If provided, the message will be stored in the memory.",
|
"info": "If provided, the message will be stored in the memory.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"_type": "CustomComponent"
|
"_type": "CustomComponent"
|
||||||
},
|
},
|
||||||
"description": "Display a chat message in the Playground.",
|
"description": "Display a chat message in the Playground.",
|
||||||
"icon": "ChatOutput",
|
"icon": "ChatOutput",
|
||||||
"base_classes": ["str", "Record", "Text", "object"],
|
"base_classes": [
|
||||||
|
"str",
|
||||||
|
"Record",
|
||||||
|
"Text",
|
||||||
|
"object"
|
||||||
|
],
|
||||||
"display_name": "Chat Output",
|
"display_name": "Chat Output",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
|
|
@ -544,7 +592,10 @@
|
||||||
"session_id": null,
|
"session_id": null,
|
||||||
"return_record": null
|
"return_record": null
|
||||||
},
|
},
|
||||||
"output_types": ["Text", "Record"],
|
"output_types": [
|
||||||
|
"Text",
|
||||||
|
"Record"
|
||||||
|
],
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [],
|
"field_order": [],
|
||||||
|
|
@ -589,7 +640,9 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"code": {
|
"code": {
|
||||||
"type": "code",
|
"type": "code",
|
||||||
|
|
@ -672,7 +725,9 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"openai_api_base": {
|
"openai_api_base": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -691,7 +746,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,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"openai_api_key": {
|
"openai_api_key": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -710,7 +767,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,
|
||||||
"input_types": ["Text"],
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"value": "OPENAI_API_KEY"
|
"value": "OPENAI_API_KEY"
|
||||||
},
|
},
|
||||||
"stream": {
|
"stream": {
|
||||||
|
|
@ -749,7 +808,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,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"temperature": {
|
"temperature": {
|
||||||
"type": "float",
|
"type": "float",
|
||||||
|
|
@ -780,7 +841,11 @@
|
||||||
},
|
},
|
||||||
"description": "Generates text using OpenAI LLMs.",
|
"description": "Generates text using OpenAI LLMs.",
|
||||||
"icon": "OpenAI",
|
"icon": "OpenAI",
|
||||||
"base_classes": ["object", "str", "Text"],
|
"base_classes": [
|
||||||
|
"object",
|
||||||
|
"str",
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"display_name": "OpenAI",
|
"display_name": "OpenAI",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
|
|
@ -794,7 +859,9 @@
|
||||||
"stream": null,
|
"stream": null,
|
||||||
"system_message": null
|
"system_message": null
|
||||||
},
|
},
|
||||||
"output_types": ["Text"],
|
"output_types": [
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [
|
"field_order": [
|
||||||
|
|
@ -832,11 +899,21 @@
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "Question",
|
"fieldName": "Question",
|
||||||
"id": "Prompt-tHwPf",
|
"id": "Prompt-tHwPf",
|
||||||
"inputTypes": ["Document", "BaseOutputParser", "Record", "Text"],
|
"inputTypes": [
|
||||||
|
"Document",
|
||||||
|
"BaseOutputParser",
|
||||||
|
"Record",
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"type": "str"
|
"type": "str"
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"baseClasses": ["str", "Record", "Text", "object"],
|
"baseClasses": [
|
||||||
|
"str",
|
||||||
|
"Record",
|
||||||
|
"Text",
|
||||||
|
"object"
|
||||||
|
],
|
||||||
"dataType": "ChatInput",
|
"dataType": "ChatInput",
|
||||||
"id": "ChatInput-MsSJ9"
|
"id": "ChatInput-MsSJ9"
|
||||||
}
|
}
|
||||||
|
|
@ -856,11 +933,18 @@
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "Document",
|
"fieldName": "Document",
|
||||||
"id": "Prompt-tHwPf",
|
"id": "Prompt-tHwPf",
|
||||||
"inputTypes": ["Document", "BaseOutputParser", "Record", "Text"],
|
"inputTypes": [
|
||||||
|
"Document",
|
||||||
|
"BaseOutputParser",
|
||||||
|
"Record",
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"type": "str"
|
"type": "str"
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"baseClasses": ["Record"],
|
"baseClasses": [
|
||||||
|
"Record"
|
||||||
|
],
|
||||||
"dataType": "File",
|
"dataType": "File",
|
||||||
"id": "File-6TEsD"
|
"id": "File-6TEsD"
|
||||||
}
|
}
|
||||||
|
|
@ -880,11 +964,17 @@
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "input_value",
|
"fieldName": "input_value",
|
||||||
"id": "OpenAIModel-Bt067",
|
"id": "OpenAIModel-Bt067",
|
||||||
"inputTypes": ["Text"],
|
"inputTypes": [
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"type": "str"
|
"type": "str"
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"baseClasses": ["object", "str", "Text"],
|
"baseClasses": [
|
||||||
|
"object",
|
||||||
|
"str",
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"dataType": "Prompt",
|
"dataType": "Prompt",
|
||||||
"id": "Prompt-tHwPf"
|
"id": "Prompt-tHwPf"
|
||||||
}
|
}
|
||||||
|
|
@ -904,11 +994,17 @@
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "input_value",
|
"fieldName": "input_value",
|
||||||
"id": "ChatOutput-F5Awj",
|
"id": "ChatOutput-F5Awj",
|
||||||
"inputTypes": ["Text"],
|
"inputTypes": [
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"type": "str"
|
"type": "str"
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"baseClasses": ["object", "str", "Text"],
|
"baseClasses": [
|
||||||
|
"object",
|
||||||
|
"str",
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"dataType": "OpenAIModel",
|
"dataType": "OpenAIModel",
|
||||||
"id": "OpenAIModel-Bt067"
|
"id": "OpenAIModel-Bt067"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
"list": false,
|
"list": false,
|
||||||
"show": true,
|
"show": true,
|
||||||
"multiline": true,
|
"multiline": true,
|
||||||
"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",
|
"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 files: Optional[list[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 files=files,\n session_id=session_id,\n return_record=return_record,\n )\n",
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
|
|
@ -83,7 +83,10 @@
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
"options": ["Machine", "User"],
|
"options": [
|
||||||
|
"Machine",
|
||||||
|
"User"
|
||||||
|
],
|
||||||
"name": "sender",
|
"name": "sender",
|
||||||
"display_name": "Sender Type",
|
"display_name": "Sender Type",
|
||||||
"advanced": true,
|
"advanced": true,
|
||||||
|
|
@ -91,7 +94,9 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"sender_name": {
|
"sender_name": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -111,7 +116,9 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"session_id": {
|
"session_id": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -130,14 +137,21 @@
|
||||||
"info": "If provided, the message will be stored in the memory.",
|
"info": "If provided, the message will be stored in the memory.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": ["Text"],
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"value": "MySessionID"
|
"value": "MySessionID"
|
||||||
},
|
},
|
||||||
"_type": "CustomComponent"
|
"_type": "CustomComponent"
|
||||||
},
|
},
|
||||||
"description": "Get chat inputs from the Playground.",
|
"description": "Get chat inputs from the Playground.",
|
||||||
"icon": "ChatInput",
|
"icon": "ChatInput",
|
||||||
"base_classes": ["Text", "object", "Record", "str"],
|
"base_classes": [
|
||||||
|
"Text",
|
||||||
|
"object",
|
||||||
|
"Record",
|
||||||
|
"str"
|
||||||
|
],
|
||||||
"display_name": "Chat Input",
|
"display_name": "Chat Input",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
|
|
@ -147,7 +161,10 @@
|
||||||
"session_id": null,
|
"session_id": null,
|
||||||
"return_record": null
|
"return_record": null
|
||||||
},
|
},
|
||||||
"output_types": ["Text", "Record"],
|
"output_types": [
|
||||||
|
"Text",
|
||||||
|
"Record"
|
||||||
|
],
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [],
|
"field_order": [],
|
||||||
|
|
@ -182,7 +199,7 @@
|
||||||
"list": false,
|
"list": false,
|
||||||
"show": true,
|
"show": true,
|
||||||
"multiline": true,
|
"multiline": true,
|
||||||
"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",
|
"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 files: Optional[list[str]] = None,\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 files=files,\n )\n",
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
|
|
@ -206,7 +223,9 @@
|
||||||
"name": "input_value",
|
"name": "input_value",
|
||||||
"display_name": "Message",
|
"display_name": "Message",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
"input_types": ["Text"],
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
|
|
@ -242,7 +261,10 @@
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
"options": ["Machine", "User"],
|
"options": [
|
||||||
|
"Machine",
|
||||||
|
"User"
|
||||||
|
],
|
||||||
"name": "sender",
|
"name": "sender",
|
||||||
"display_name": "Sender Type",
|
"display_name": "Sender Type",
|
||||||
"advanced": true,
|
"advanced": true,
|
||||||
|
|
@ -250,7 +272,9 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"sender_name": {
|
"sender_name": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -270,7 +294,9 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"session_id": {
|
"session_id": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -289,14 +315,21 @@
|
||||||
"info": "If provided, the message will be stored in the memory.",
|
"info": "If provided, the message will be stored in the memory.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": ["Text"],
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"value": "MySessionID"
|
"value": "MySessionID"
|
||||||
},
|
},
|
||||||
"_type": "CustomComponent"
|
"_type": "CustomComponent"
|
||||||
},
|
},
|
||||||
"description": "Display a chat message in the Playground.",
|
"description": "Display a chat message in the Playground.",
|
||||||
"icon": "ChatOutput",
|
"icon": "ChatOutput",
|
||||||
"base_classes": ["Text", "object", "Record", "str"],
|
"base_classes": [
|
||||||
|
"Text",
|
||||||
|
"object",
|
||||||
|
"Record",
|
||||||
|
"str"
|
||||||
|
],
|
||||||
"display_name": "Chat Output",
|
"display_name": "Chat Output",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
|
|
@ -306,7 +339,10 @@
|
||||||
"session_id": null,
|
"session_id": null,
|
||||||
"return_record": null
|
"return_record": null
|
||||||
},
|
},
|
||||||
"output_types": ["Text", "Record"],
|
"output_types": [
|
||||||
|
"Text",
|
||||||
|
"Record"
|
||||||
|
],
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [],
|
"field_order": [],
|
||||||
|
|
@ -382,7 +418,10 @@
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
"options": ["Ascending", "Descending"],
|
"options": [
|
||||||
|
"Ascending",
|
||||||
|
"Descending"
|
||||||
|
],
|
||||||
"name": "order",
|
"name": "order",
|
||||||
"display_name": "Order",
|
"display_name": "Order",
|
||||||
"advanced": true,
|
"advanced": true,
|
||||||
|
|
@ -390,7 +429,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,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"record_template": {
|
"record_template": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -410,7 +451,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,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"sender": {
|
"sender": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -423,7 +466,11 @@
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
"options": ["Machine", "User", "Machine and User"],
|
"options": [
|
||||||
|
"Machine",
|
||||||
|
"User",
|
||||||
|
"Machine and User"
|
||||||
|
],
|
||||||
"name": "sender",
|
"name": "sender",
|
||||||
"display_name": "Sender Type",
|
"display_name": "Sender Type",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
|
|
@ -431,7 +478,9 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"sender_name": {
|
"sender_name": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -450,7 +499,9 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"session_id": {
|
"session_id": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -465,7 +516,9 @@
|
||||||
"name": "session_id",
|
"name": "session_id",
|
||||||
"display_name": "Session ID",
|
"display_name": "Session ID",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
"input_types": ["Text"],
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"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,
|
||||||
|
|
@ -476,7 +529,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",
|
||||||
"base_classes": ["str", "Text", "object"],
|
"base_classes": [
|
||||||
|
"str",
|
||||||
|
"Text",
|
||||||
|
"object"
|
||||||
|
],
|
||||||
"display_name": "Chat Memory",
|
"display_name": "Chat Memory",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
|
|
@ -487,7 +544,9 @@
|
||||||
"order": null,
|
"order": null,
|
||||||
"record_template": null
|
"record_template": null
|
||||||
},
|
},
|
||||||
"output_types": ["Text"],
|
"output_types": [
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [],
|
"field_order": [],
|
||||||
|
|
@ -549,7 +608,9 @@
|
||||||
"name": "template",
|
"name": "template",
|
||||||
"display_name": "Template",
|
"display_name": "Template",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
"input_types": ["Text"],
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
|
|
@ -614,14 +675,23 @@
|
||||||
"is_input": null,
|
"is_input": null,
|
||||||
"is_output": null,
|
"is_output": null,
|
||||||
"is_composition": null,
|
"is_composition": null,
|
||||||
"base_classes": ["Text", "str", "object"],
|
"base_classes": [
|
||||||
|
"Text",
|
||||||
|
"str",
|
||||||
|
"object"
|
||||||
|
],
|
||||||
"name": "",
|
"name": "",
|
||||||
"display_name": "Prompt",
|
"display_name": "Prompt",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
"template": ["context", "user_message"]
|
"template": [
|
||||||
|
"context",
|
||||||
|
"user_message"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"output_types": ["Text"],
|
"output_types": [
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"full_path": null,
|
"full_path": null,
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
|
|
@ -670,7 +740,9 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"code": {
|
"code": {
|
||||||
"type": "code",
|
"type": "code",
|
||||||
|
|
@ -753,7 +825,9 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"openai_api_base": {
|
"openai_api_base": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -772,7 +846,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,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"openai_api_key": {
|
"openai_api_key": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -791,7 +867,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,
|
||||||
"input_types": ["Text"],
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"value": "OPENAI_API_KEY"
|
"value": "OPENAI_API_KEY"
|
||||||
},
|
},
|
||||||
"stream": {
|
"stream": {
|
||||||
|
|
@ -830,7 +908,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,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"temperature": {
|
"temperature": {
|
||||||
"type": "float",
|
"type": "float",
|
||||||
|
|
@ -861,7 +941,11 @@
|
||||||
},
|
},
|
||||||
"description": "Generates text using OpenAI LLMs.",
|
"description": "Generates text using OpenAI LLMs.",
|
||||||
"icon": "OpenAI",
|
"icon": "OpenAI",
|
||||||
"base_classes": ["str", "object", "Text"],
|
"base_classes": [
|
||||||
|
"str",
|
||||||
|
"object",
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"display_name": "OpenAI",
|
"display_name": "OpenAI",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
|
|
@ -875,7 +959,9 @@
|
||||||
"stream": null,
|
"stream": null,
|
||||||
"system_message": null
|
"system_message": null
|
||||||
},
|
},
|
||||||
"output_types": ["Text"],
|
"output_types": [
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [
|
"field_order": [
|
||||||
|
|
@ -927,7 +1013,10 @@
|
||||||
"name": "input_value",
|
"name": "input_value",
|
||||||
"display_name": "Value",
|
"display_name": "Value",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
"input_types": ["Record", "Text"],
|
"input_types": [
|
||||||
|
"Record",
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"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,
|
||||||
|
|
@ -969,20 +1058,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,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"_type": "CustomComponent"
|
"_type": "CustomComponent"
|
||||||
},
|
},
|
||||||
"description": "Display a text output in the Playground.",
|
"description": "Display a text output in the Playground.",
|
||||||
"icon": "type",
|
"icon": "type",
|
||||||
"base_classes": ["str", "object", "Text"],
|
"base_classes": [
|
||||||
|
"str",
|
||||||
|
"object",
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"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
|
||||||
},
|
},
|
||||||
"output_types": ["Text"],
|
"output_types": [
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [],
|
"field_order": [],
|
||||||
|
|
@ -1011,10 +1108,19 @@
|
||||||
"fieldName": "context",
|
"fieldName": "context",
|
||||||
"type": "str",
|
"type": "str",
|
||||||
"id": "Prompt-ODkUx",
|
"id": "Prompt-ODkUx",
|
||||||
"inputTypes": ["Document", "BaseOutputParser", "Record", "Text"]
|
"inputTypes": [
|
||||||
|
"Document",
|
||||||
|
"BaseOutputParser",
|
||||||
|
"Record",
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"baseClasses": ["str", "Text", "object"],
|
"baseClasses": [
|
||||||
|
"str",
|
||||||
|
"Text",
|
||||||
|
"object"
|
||||||
|
],
|
||||||
"dataType": "MemoryComponent",
|
"dataType": "MemoryComponent",
|
||||||
"id": "MemoryComponent-cdA1J"
|
"id": "MemoryComponent-cdA1J"
|
||||||
}
|
}
|
||||||
|
|
@ -1036,10 +1142,20 @@
|
||||||
"fieldName": "user_message",
|
"fieldName": "user_message",
|
||||||
"type": "str",
|
"type": "str",
|
||||||
"id": "Prompt-ODkUx",
|
"id": "Prompt-ODkUx",
|
||||||
"inputTypes": ["Document", "BaseOutputParser", "Record", "Text"]
|
"inputTypes": [
|
||||||
|
"Document",
|
||||||
|
"BaseOutputParser",
|
||||||
|
"Record",
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"baseClasses": ["Text", "object", "Record", "str"],
|
"baseClasses": [
|
||||||
|
"Text",
|
||||||
|
"object",
|
||||||
|
"Record",
|
||||||
|
"str"
|
||||||
|
],
|
||||||
"dataType": "ChatInput",
|
"dataType": "ChatInput",
|
||||||
"id": "ChatInput-t7F8v"
|
"id": "ChatInput-t7F8v"
|
||||||
}
|
}
|
||||||
|
|
@ -1060,11 +1176,17 @@
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "input_value",
|
"fieldName": "input_value",
|
||||||
"id": "OpenAIModel-9RykF",
|
"id": "OpenAIModel-9RykF",
|
||||||
"inputTypes": ["Text"],
|
"inputTypes": [
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"type": "str"
|
"type": "str"
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"baseClasses": ["Text", "str", "object"],
|
"baseClasses": [
|
||||||
|
"Text",
|
||||||
|
"str",
|
||||||
|
"object"
|
||||||
|
],
|
||||||
"dataType": "Prompt",
|
"dataType": "Prompt",
|
||||||
"id": "Prompt-ODkUx"
|
"id": "Prompt-ODkUx"
|
||||||
}
|
}
|
||||||
|
|
@ -1084,11 +1206,17 @@
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "input_value",
|
"fieldName": "input_value",
|
||||||
"id": "ChatOutput-P1jEe",
|
"id": "ChatOutput-P1jEe",
|
||||||
"inputTypes": ["Text"],
|
"inputTypes": [
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"type": "str"
|
"type": "str"
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"baseClasses": ["str", "object", "Text"],
|
"baseClasses": [
|
||||||
|
"str",
|
||||||
|
"object",
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"dataType": "OpenAIModel",
|
"dataType": "OpenAIModel",
|
||||||
"id": "OpenAIModel-9RykF"
|
"id": "OpenAIModel-9RykF"
|
||||||
}
|
}
|
||||||
|
|
@ -1108,11 +1236,18 @@
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "input_value",
|
"fieldName": "input_value",
|
||||||
"id": "TextOutput-vrs6T",
|
"id": "TextOutput-vrs6T",
|
||||||
"inputTypes": ["Record", "Text"],
|
"inputTypes": [
|
||||||
|
"Record",
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"type": "str"
|
"type": "str"
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"baseClasses": ["str", "Text", "object"],
|
"baseClasses": [
|
||||||
|
"str",
|
||||||
|
"Text",
|
||||||
|
"object"
|
||||||
|
],
|
||||||
"dataType": "MemoryComponent",
|
"dataType": "MemoryComponent",
|
||||||
"id": "MemoryComponent-cdA1J"
|
"id": "MemoryComponent-cdA1J"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,9 @@
|
||||||
"name": "template",
|
"name": "template",
|
||||||
"display_name": "Template",
|
"display_name": "Template",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
"input_types": ["Text"],
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
|
|
@ -84,14 +86,22 @@
|
||||||
"is_input": null,
|
"is_input": null,
|
||||||
"is_output": null,
|
"is_output": null,
|
||||||
"is_composition": null,
|
"is_composition": null,
|
||||||
"base_classes": ["object", "str", "Text"],
|
"base_classes": [
|
||||||
|
"object",
|
||||||
|
"str",
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"name": "",
|
"name": "",
|
||||||
"display_name": "Prompt",
|
"display_name": "Prompt",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
"template": ["document"]
|
"template": [
|
||||||
|
"document"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"output_types": ["Text"],
|
"output_types": [
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"full_path": null,
|
"full_path": null,
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
|
|
@ -155,7 +165,9 @@
|
||||||
"name": "template",
|
"name": "template",
|
||||||
"display_name": "Template",
|
"display_name": "Template",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
"input_types": ["Text"],
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
|
|
@ -194,14 +206,22 @@
|
||||||
"is_input": null,
|
"is_input": null,
|
||||||
"is_output": null,
|
"is_output": null,
|
||||||
"is_composition": null,
|
"is_composition": null,
|
||||||
"base_classes": ["object", "str", "Text"],
|
"base_classes": [
|
||||||
|
"object",
|
||||||
|
"str",
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"name": "",
|
"name": "",
|
||||||
"display_name": "Prompt",
|
"display_name": "Prompt",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
"template": ["summary"]
|
"template": [
|
||||||
|
"summary"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"output_types": ["Text"],
|
"output_types": [
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"full_path": null,
|
"full_path": null,
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
|
|
@ -236,7 +256,7 @@
|
||||||
"list": false,
|
"list": false,
|
||||||
"show": true,
|
"show": true,
|
||||||
"multiline": true,
|
"multiline": true,
|
||||||
"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",
|
"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 files: Optional[list[str]] = None,\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 files=files,\n )\n",
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
|
|
@ -260,7 +280,9 @@
|
||||||
"name": "input_value",
|
"name": "input_value",
|
||||||
"display_name": "Message",
|
"display_name": "Message",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
"input_types": ["Text"],
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
|
|
@ -284,7 +306,9 @@
|
||||||
"info": "In case of Message being a Record, this template will be used to convert it to text.",
|
"info": "In case of Message being a Record, this template will be used to convert it to text.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"return_record": {
|
"return_record": {
|
||||||
"type": "bool",
|
"type": "bool",
|
||||||
|
|
@ -316,7 +340,10 @@
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
"options": ["Machine", "User"],
|
"options": [
|
||||||
|
"Machine",
|
||||||
|
"User"
|
||||||
|
],
|
||||||
"name": "sender",
|
"name": "sender",
|
||||||
"display_name": "Sender Type",
|
"display_name": "Sender Type",
|
||||||
"advanced": true,
|
"advanced": true,
|
||||||
|
|
@ -324,7 +351,9 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"sender_name": {
|
"sender_name": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -344,7 +373,9 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"session_id": {
|
"session_id": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -363,13 +394,20 @@
|
||||||
"info": "If provided, the message will be stored in the memory.",
|
"info": "If provided, the message will be stored in the memory.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"_type": "CustomComponent"
|
"_type": "CustomComponent"
|
||||||
},
|
},
|
||||||
"description": "Display a chat message in the Playground.",
|
"description": "Display a chat message in the Playground.",
|
||||||
"icon": "ChatOutput",
|
"icon": "ChatOutput",
|
||||||
"base_classes": ["object", "Record", "Text", "str"],
|
"base_classes": [
|
||||||
|
"object",
|
||||||
|
"Record",
|
||||||
|
"Text",
|
||||||
|
"str"
|
||||||
|
],
|
||||||
"display_name": "Chat Output",
|
"display_name": "Chat Output",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
|
|
@ -380,7 +418,10 @@
|
||||||
"return_record": null,
|
"return_record": null,
|
||||||
"record_template": null
|
"record_template": null
|
||||||
},
|
},
|
||||||
"output_types": ["Text", "Record"],
|
"output_types": [
|
||||||
|
"Text",
|
||||||
|
"Record"
|
||||||
|
],
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [],
|
"field_order": [],
|
||||||
|
|
@ -411,7 +452,7 @@
|
||||||
"list": false,
|
"list": false,
|
||||||
"show": true,
|
"show": true,
|
||||||
"multiline": true,
|
"multiline": true,
|
||||||
"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",
|
"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 files: Optional[list[str]] = None,\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 files=files,\n )\n",
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
|
|
@ -435,7 +476,9 @@
|
||||||
"name": "input_value",
|
"name": "input_value",
|
||||||
"display_name": "Message",
|
"display_name": "Message",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
"input_types": ["Text"],
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
|
|
@ -459,7 +502,9 @@
|
||||||
"info": "In case of Message being a Record, this template will be used to convert it to text.",
|
"info": "In case of Message being a Record, this template will be used to convert it to text.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"return_record": {
|
"return_record": {
|
||||||
"type": "bool",
|
"type": "bool",
|
||||||
|
|
@ -491,7 +536,10 @@
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
"options": ["Machine", "User"],
|
"options": [
|
||||||
|
"Machine",
|
||||||
|
"User"
|
||||||
|
],
|
||||||
"name": "sender",
|
"name": "sender",
|
||||||
"display_name": "Sender Type",
|
"display_name": "Sender Type",
|
||||||
"advanced": true,
|
"advanced": true,
|
||||||
|
|
@ -499,7 +547,9 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"sender_name": {
|
"sender_name": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -519,7 +569,9 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"session_id": {
|
"session_id": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -538,13 +590,20 @@
|
||||||
"info": "If provided, the message will be stored in the memory.",
|
"info": "If provided, the message will be stored in the memory.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"_type": "CustomComponent"
|
"_type": "CustomComponent"
|
||||||
},
|
},
|
||||||
"description": "Display a chat message in the Playground.",
|
"description": "Display a chat message in the Playground.",
|
||||||
"icon": "ChatOutput",
|
"icon": "ChatOutput",
|
||||||
"base_classes": ["object", "Record", "Text", "str"],
|
"base_classes": [
|
||||||
|
"object",
|
||||||
|
"Record",
|
||||||
|
"Text",
|
||||||
|
"str"
|
||||||
|
],
|
||||||
"display_name": "Chat Output",
|
"display_name": "Chat Output",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
|
|
@ -555,7 +614,10 @@
|
||||||
"return_record": null,
|
"return_record": null,
|
||||||
"record_template": null
|
"record_template": null
|
||||||
},
|
},
|
||||||
"output_types": ["Text", "Record"],
|
"output_types": [
|
||||||
|
"Text",
|
||||||
|
"Record"
|
||||||
|
],
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [],
|
"field_order": [],
|
||||||
|
|
@ -610,7 +672,10 @@
|
||||||
"name": "input_value",
|
"name": "input_value",
|
||||||
"display_name": "Value",
|
"display_name": "Value",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
"input_types": ["Record", "Text"],
|
"input_types": [
|
||||||
|
"Record",
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"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,
|
||||||
|
|
@ -634,20 +699,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,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"_type": "CustomComponent"
|
"_type": "CustomComponent"
|
||||||
},
|
},
|
||||||
"description": "Get text inputs from the Playground.",
|
"description": "Get text inputs from the Playground.",
|
||||||
"icon": "type",
|
"icon": "type",
|
||||||
"base_classes": ["str", "Text", "object"],
|
"base_classes": [
|
||||||
|
"str",
|
||||||
|
"Text",
|
||||||
|
"object"
|
||||||
|
],
|
||||||
"display_name": "Text Input",
|
"display_name": "Text Input",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
"input_value": null,
|
"input_value": null,
|
||||||
"record_template": null
|
"record_template": null
|
||||||
},
|
},
|
||||||
"output_types": ["Text"],
|
"output_types": [
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [],
|
"field_order": [],
|
||||||
|
|
@ -689,7 +762,10 @@
|
||||||
"name": "input_value",
|
"name": "input_value",
|
||||||
"display_name": "Value",
|
"display_name": "Value",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
"input_types": ["Record", "Text"],
|
"input_types": [
|
||||||
|
"Record",
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"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,
|
||||||
|
|
@ -731,20 +807,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,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"_type": "CustomComponent"
|
"_type": "CustomComponent"
|
||||||
},
|
},
|
||||||
"description": "Display a text output in the Playground.",
|
"description": "Display a text output in the Playground.",
|
||||||
"icon": "type",
|
"icon": "type",
|
||||||
"base_classes": ["str", "Text", "object"],
|
"base_classes": [
|
||||||
|
"str",
|
||||||
|
"Text",
|
||||||
|
"object"
|
||||||
|
],
|
||||||
"display_name": "First Prompt",
|
"display_name": "First Prompt",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
"input_value": null,
|
"input_value": null,
|
||||||
"record_template": null
|
"record_template": null
|
||||||
},
|
},
|
||||||
"output_types": ["Text"],
|
"output_types": [
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [],
|
"field_order": [],
|
||||||
|
|
@ -789,7 +873,9 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"code": {
|
"code": {
|
||||||
"type": "code",
|
"type": "code",
|
||||||
|
|
@ -872,7 +958,9 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"openai_api_base": {
|
"openai_api_base": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -891,7 +979,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,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"openai_api_key": {
|
"openai_api_key": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -910,7 +1000,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,
|
||||||
"input_types": ["Text"],
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"value": "OPENAI_API_KEY"
|
"value": "OPENAI_API_KEY"
|
||||||
},
|
},
|
||||||
"stream": {
|
"stream": {
|
||||||
|
|
@ -949,7 +1041,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,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"temperature": {
|
"temperature": {
|
||||||
"type": "float",
|
"type": "float",
|
||||||
|
|
@ -980,7 +1074,11 @@
|
||||||
},
|
},
|
||||||
"description": "Generates text using OpenAI LLMs.",
|
"description": "Generates text using OpenAI LLMs.",
|
||||||
"icon": "OpenAI",
|
"icon": "OpenAI",
|
||||||
"base_classes": ["str", "Text", "object"],
|
"base_classes": [
|
||||||
|
"str",
|
||||||
|
"Text",
|
||||||
|
"object"
|
||||||
|
],
|
||||||
"display_name": "OpenAI",
|
"display_name": "OpenAI",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
|
|
@ -994,7 +1092,9 @@
|
||||||
"stream": null,
|
"stream": null,
|
||||||
"system_message": null
|
"system_message": null
|
||||||
},
|
},
|
||||||
"output_types": ["Text"],
|
"output_types": [
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [
|
"field_order": [
|
||||||
|
|
@ -1046,7 +1146,10 @@
|
||||||
"name": "input_value",
|
"name": "input_value",
|
||||||
"display_name": "Value",
|
"display_name": "Value",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
"input_types": ["Record", "Text"],
|
"input_types": [
|
||||||
|
"Record",
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"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,
|
||||||
|
|
@ -1088,20 +1191,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,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"_type": "CustomComponent"
|
"_type": "CustomComponent"
|
||||||
},
|
},
|
||||||
"description": "Display a text output in the Playground.",
|
"description": "Display a text output in the Playground.",
|
||||||
"icon": "type",
|
"icon": "type",
|
||||||
"base_classes": ["str", "Text", "object"],
|
"base_classes": [
|
||||||
|
"str",
|
||||||
|
"Text",
|
||||||
|
"object"
|
||||||
|
],
|
||||||
"display_name": "Second Prompt",
|
"display_name": "Second Prompt",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
"input_value": null,
|
"input_value": null,
|
||||||
"record_template": null
|
"record_template": null
|
||||||
},
|
},
|
||||||
"output_types": ["Text"],
|
"output_types": [
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [],
|
"field_order": [],
|
||||||
|
|
@ -1146,7 +1257,9 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"code": {
|
"code": {
|
||||||
"type": "code",
|
"type": "code",
|
||||||
|
|
@ -1229,7 +1342,9 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"openai_api_base": {
|
"openai_api_base": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -1248,7 +1363,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,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"openai_api_key": {
|
"openai_api_key": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -1267,7 +1384,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,
|
||||||
"input_types": ["Text"],
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"value": ""
|
"value": ""
|
||||||
},
|
},
|
||||||
"stream": {
|
"stream": {
|
||||||
|
|
@ -1306,7 +1425,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,
|
||||||
"input_types": ["Text"]
|
"input_types": [
|
||||||
|
"Text"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"temperature": {
|
"temperature": {
|
||||||
"type": "float",
|
"type": "float",
|
||||||
|
|
@ -1337,7 +1458,11 @@
|
||||||
},
|
},
|
||||||
"description": "Generates text using OpenAI LLMs.",
|
"description": "Generates text using OpenAI LLMs.",
|
||||||
"icon": "OpenAI",
|
"icon": "OpenAI",
|
||||||
"base_classes": ["str", "Text", "object"],
|
"base_classes": [
|
||||||
|
"str",
|
||||||
|
"Text",
|
||||||
|
"object"
|
||||||
|
],
|
||||||
"display_name": "OpenAI",
|
"display_name": "OpenAI",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
|
|
@ -1351,7 +1476,9 @@
|
||||||
"stream": null,
|
"stream": null,
|
||||||
"system_message": null
|
"system_message": null
|
||||||
},
|
},
|
||||||
"output_types": ["Text"],
|
"output_types": [
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [
|
"field_order": [
|
||||||
|
|
@ -1389,11 +1516,20 @@
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "document",
|
"fieldName": "document",
|
||||||
"id": "Prompt-amqBu",
|
"id": "Prompt-amqBu",
|
||||||
"inputTypes": ["Document", "BaseOutputParser", "Record", "Text"],
|
"inputTypes": [
|
||||||
|
"Document",
|
||||||
|
"BaseOutputParser",
|
||||||
|
"Record",
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"type": "str"
|
"type": "str"
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"baseClasses": ["str", "Text", "object"],
|
"baseClasses": [
|
||||||
|
"str",
|
||||||
|
"Text",
|
||||||
|
"object"
|
||||||
|
],
|
||||||
"dataType": "TextInput",
|
"dataType": "TextInput",
|
||||||
"id": "TextInput-sptaH"
|
"id": "TextInput-sptaH"
|
||||||
}
|
}
|
||||||
|
|
@ -1413,11 +1549,18 @@
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "input_value",
|
"fieldName": "input_value",
|
||||||
"id": "TextOutput-2MS4a",
|
"id": "TextOutput-2MS4a",
|
||||||
"inputTypes": ["Record", "Text"],
|
"inputTypes": [
|
||||||
|
"Record",
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"type": "str"
|
"type": "str"
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"baseClasses": ["object", "str", "Text"],
|
"baseClasses": [
|
||||||
|
"object",
|
||||||
|
"str",
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"dataType": "Prompt",
|
"dataType": "Prompt",
|
||||||
"id": "Prompt-amqBu"
|
"id": "Prompt-amqBu"
|
||||||
}
|
}
|
||||||
|
|
@ -1437,11 +1580,17 @@
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "input_value",
|
"fieldName": "input_value",
|
||||||
"id": "OpenAIModel-uYXZJ",
|
"id": "OpenAIModel-uYXZJ",
|
||||||
"inputTypes": ["Text"],
|
"inputTypes": [
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"type": "str"
|
"type": "str"
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"baseClasses": ["object", "str", "Text"],
|
"baseClasses": [
|
||||||
|
"object",
|
||||||
|
"str",
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"dataType": "Prompt",
|
"dataType": "Prompt",
|
||||||
"id": "Prompt-amqBu"
|
"id": "Prompt-amqBu"
|
||||||
}
|
}
|
||||||
|
|
@ -1461,11 +1610,20 @@
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "summary",
|
"fieldName": "summary",
|
||||||
"id": "Prompt-gTNiz",
|
"id": "Prompt-gTNiz",
|
||||||
"inputTypes": ["Document", "BaseOutputParser", "Record", "Text"],
|
"inputTypes": [
|
||||||
|
"Document",
|
||||||
|
"BaseOutputParser",
|
||||||
|
"Record",
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"type": "str"
|
"type": "str"
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"baseClasses": ["str", "Text", "object"],
|
"baseClasses": [
|
||||||
|
"str",
|
||||||
|
"Text",
|
||||||
|
"object"
|
||||||
|
],
|
||||||
"dataType": "OpenAIModel",
|
"dataType": "OpenAIModel",
|
||||||
"id": "OpenAIModel-uYXZJ"
|
"id": "OpenAIModel-uYXZJ"
|
||||||
}
|
}
|
||||||
|
|
@ -1485,11 +1643,17 @@
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "input_value",
|
"fieldName": "input_value",
|
||||||
"id": "ChatOutput-EJkG3",
|
"id": "ChatOutput-EJkG3",
|
||||||
"inputTypes": ["Text"],
|
"inputTypes": [
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"type": "str"
|
"type": "str"
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"baseClasses": ["str", "Text", "object"],
|
"baseClasses": [
|
||||||
|
"str",
|
||||||
|
"Text",
|
||||||
|
"object"
|
||||||
|
],
|
||||||
"dataType": "OpenAIModel",
|
"dataType": "OpenAIModel",
|
||||||
"id": "OpenAIModel-uYXZJ"
|
"id": "OpenAIModel-uYXZJ"
|
||||||
}
|
}
|
||||||
|
|
@ -1509,11 +1673,18 @@
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "input_value",
|
"fieldName": "input_value",
|
||||||
"id": "TextOutput-MUDOR",
|
"id": "TextOutput-MUDOR",
|
||||||
"inputTypes": ["Record", "Text"],
|
"inputTypes": [
|
||||||
|
"Record",
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"type": "str"
|
"type": "str"
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"baseClasses": ["object", "str", "Text"],
|
"baseClasses": [
|
||||||
|
"object",
|
||||||
|
"str",
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"dataType": "Prompt",
|
"dataType": "Prompt",
|
||||||
"id": "Prompt-gTNiz"
|
"id": "Prompt-gTNiz"
|
||||||
}
|
}
|
||||||
|
|
@ -1533,11 +1704,17 @@
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "input_value",
|
"fieldName": "input_value",
|
||||||
"id": "OpenAIModel-XawYB",
|
"id": "OpenAIModel-XawYB",
|
||||||
"inputTypes": ["Text"],
|
"inputTypes": [
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"type": "str"
|
"type": "str"
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"baseClasses": ["object", "str", "Text"],
|
"baseClasses": [
|
||||||
|
"object",
|
||||||
|
"str",
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"dataType": "Prompt",
|
"dataType": "Prompt",
|
||||||
"id": "Prompt-gTNiz"
|
"id": "Prompt-gTNiz"
|
||||||
}
|
}
|
||||||
|
|
@ -1557,11 +1734,17 @@
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "input_value",
|
"fieldName": "input_value",
|
||||||
"id": "ChatOutput-DNmvg",
|
"id": "ChatOutput-DNmvg",
|
||||||
"inputTypes": ["Text"],
|
"inputTypes": [
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"type": "str"
|
"type": "str"
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"baseClasses": ["str", "Text", "object"],
|
"baseClasses": [
|
||||||
|
"str",
|
||||||
|
"Text",
|
||||||
|
"object"
|
||||||
|
],
|
||||||
"dataType": "OpenAIModel",
|
"dataType": "OpenAIModel",
|
||||||
"id": "OpenAIModel-XawYB"
|
"id": "OpenAIModel-XawYB"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue