Added updatable components and avatar (#2115)
## Features: - Avatar Selection within certain images - Update more obvious and appearing only when component is not edited by user
|
|
@ -86,6 +86,10 @@ def update_frontend_node_with_template_values(frontend_node, raw_frontend_node):
|
||||||
|
|
||||||
update_template_values(frontend_node["template"], raw_frontend_node["template"])
|
update_template_values(frontend_node["template"], raw_frontend_node["template"])
|
||||||
|
|
||||||
|
old_code = raw_frontend_node["template"]["code"]["value"]
|
||||||
|
new_code = frontend_node["template"]["code"]["value"]
|
||||||
|
frontend_node["edited"] = old_code != new_code
|
||||||
|
|
||||||
return frontend_node
|
return frontend_node
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ import hashlib
|
||||||
from http import HTTPStatus
|
from http import HTTPStatus
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
from uuid import UUID
|
from uuid import UUID
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
from fastapi import APIRouter, Depends, HTTPException, UploadFile
|
from fastapi import APIRouter, Depends, HTTPException, UploadFile
|
||||||
from fastapi.responses import StreamingResponse
|
from fastapi.responses import StreamingResponse
|
||||||
|
|
@ -99,6 +100,47 @@ async def download_image(file_name: str, flow_id: UUID, storage_service: Storage
|
||||||
raise HTTPException(status_code=500, detail=str(e))
|
raise HTTPException(status_code=500, detail=str(e))
|
||||||
|
|
||||||
|
|
||||||
|
@router.get("/profile_pictures/{folder_name}/{file_name}")
|
||||||
|
async def download_profile_picture(
|
||||||
|
folder_name: str,
|
||||||
|
file_name: str,
|
||||||
|
storage_service: StorageService = Depends(get_storage_service),
|
||||||
|
):
|
||||||
|
try:
|
||||||
|
extension = file_name.split(".")[-1]
|
||||||
|
config_dir = get_storage_service().settings_service.settings.config_dir
|
||||||
|
config_path = Path(config_dir)
|
||||||
|
folder_path = config_path / 'profile_pictures' / folder_name
|
||||||
|
content_type = build_content_type_from_extension(extension)
|
||||||
|
file_content = await storage_service.get_file(flow_id=folder_path, file_name=file_name)
|
||||||
|
return StreamingResponse(BytesIO(file_content), media_type=content_type)
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
raise HTTPException(status_code=500, detail=str(e))
|
||||||
|
|
||||||
|
|
||||||
|
@router.get("/profile_pictures/list")
|
||||||
|
async def list_profile_pictures(storage_service: StorageService = Depends(get_storage_service)):
|
||||||
|
try:
|
||||||
|
config_dir = get_storage_service().settings_service.settings.config_dir
|
||||||
|
config_path = Path(config_dir)
|
||||||
|
|
||||||
|
people_path = config_path / "profile_pictures/People"
|
||||||
|
space_path = config_path / "profile_pictures/Space"
|
||||||
|
|
||||||
|
people = await storage_service.list_files(flow_id=people_path)
|
||||||
|
space = await storage_service.list_files(flow_id=space_path)
|
||||||
|
|
||||||
|
files = [Path("People") / i for i in people]
|
||||||
|
files += [Path("Space") / i for i in space]
|
||||||
|
|
||||||
|
return {"files": files}
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
raise HTTPException(status_code=500, detail=str(e))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@router.get("/list/{flow_id}")
|
@router.get("/list/{flow_id}")
|
||||||
async def list_files(
|
async def list_files(
|
||||||
flow_id: UUID = Depends(get_flow_id), storage_service: StorageService = Depends(get_storage_service)
|
flow_id: UUID = Depends(get_flow_id), storage_service: StorageService = Depends(get_storage_service)
|
||||||
|
|
|
||||||
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 43 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 44 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
|
@ -1,5 +1,6 @@
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
import shutil
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
from copy import deepcopy
|
from copy import deepcopy
|
||||||
from datetime import datetime, timezone
|
from datetime import datetime, timezone
|
||||||
|
|
@ -20,7 +21,7 @@ from langflow.services.database.models.user.crud import get_user_by_username
|
||||||
from langflow.services.deps import get_settings_service, session_scope
|
from langflow.services.deps import get_settings_service, session_scope
|
||||||
|
|
||||||
from langflow.services.database.models.folder.utils import create_default_folder_if_it_doesnt_exist
|
from langflow.services.database.models.folder.utils import create_default_folder_if_it_doesnt_exist
|
||||||
from langflow.services.deps import get_variable_service
|
from langflow.services.deps import get_variable_service, get_storage_service
|
||||||
|
|
||||||
|
|
||||||
STARTER_FOLDER_NAME = "Starter Projects"
|
STARTER_FOLDER_NAME = "Starter Projects"
|
||||||
|
|
@ -103,6 +104,26 @@ def load_starter_projects() -> list[tuple[Path, dict]]:
|
||||||
logger.info(f"Loaded starter project {file}")
|
logger.info(f"Loaded starter project {file}")
|
||||||
return starter_projects
|
return starter_projects
|
||||||
|
|
||||||
|
def copy_profile_pictures():
|
||||||
|
config_dir = get_storage_service().settings_service.settings.config_dir
|
||||||
|
origin = Path(__file__).parent / "profile_pictures"
|
||||||
|
target = Path(config_dir) / "profile_pictures"
|
||||||
|
import pdb; pdb.set_trace
|
||||||
|
|
||||||
|
if not os.path.exists(origin):
|
||||||
|
raise ValueError(f"The source folder '{origin}' does not exist.")
|
||||||
|
|
||||||
|
if not os.path.exists(target):
|
||||||
|
os.makedirs(target)
|
||||||
|
|
||||||
|
try:
|
||||||
|
shutil.copytree(origin, target, dirs_exist_ok=True)
|
||||||
|
logger.debug(f"Folder copied from '{origin}' to '{target}'")
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
logger.error(f"Error copying the folder: {e}")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def get_project_data(project):
|
def get_project_data(project):
|
||||||
project_name = project.get("name")
|
project_name = project.get("name")
|
||||||
|
|
@ -286,6 +307,7 @@ def create_or_update_starter_projects():
|
||||||
new_folder = create_starter_folder(session)
|
new_folder = create_starter_folder(session)
|
||||||
starter_projects = load_starter_projects()
|
starter_projects = load_starter_projects()
|
||||||
delete_start_projects(session, new_folder.id)
|
delete_start_projects(session, new_folder.id)
|
||||||
|
copy_profile_pictures()
|
||||||
for project_path, project in starter_projects:
|
for project_path, project in starter_projects:
|
||||||
(
|
(
|
||||||
project_name,
|
project_name,
|
||||||
|
|
|
||||||
|
|
@ -45,9 +45,7 @@
|
||||||
"name": "template",
|
"name": "template",
|
||||||
"display_name": "Template",
|
"display_name": "Template",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
"input_types": [
|
"input_types": ["Text"],
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
|
|
@ -86,22 +84,14 @@
|
||||||
"is_input": null,
|
"is_input": null,
|
||||||
"is_output": null,
|
"is_output": null,
|
||||||
"is_composition": null,
|
"is_composition": null,
|
||||||
"base_classes": [
|
"base_classes": ["object", "str", "Text"],
|
||||||
"object",
|
|
||||||
"str",
|
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"name": "",
|
"name": "",
|
||||||
"display_name": "Prompt",
|
"display_name": "Prompt",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
"template": [
|
"template": ["user_input"]
|
||||||
"user_input"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"output_types": [
|
"output_types": ["Text"],
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"full_path": null,
|
"full_path": null,
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
|
|
@ -150,10 +140,7 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": ["Text", "Record"]
|
||||||
"Text",
|
|
||||||
"Record"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"code": {
|
"code": {
|
||||||
"type": "code",
|
"type": "code",
|
||||||
|
|
@ -236,9 +223,7 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": ["Text"]
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"openai_api_base": {
|
"openai_api_base": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -257,9 +242,7 @@
|
||||||
"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": [
|
"input_types": ["Text"]
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"openai_api_key": {
|
"openai_api_key": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -278,9 +261,7 @@
|
||||||
"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": [
|
"input_types": ["Text"],
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"value": "OPENAI_API_KEY"
|
"value": "OPENAI_API_KEY"
|
||||||
},
|
},
|
||||||
"stream": {
|
"stream": {
|
||||||
|
|
@ -319,9 +300,7 @@
|
||||||
"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": [
|
"input_types": ["Text"]
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"temperature": {
|
"temperature": {
|
||||||
"type": "float",
|
"type": "float",
|
||||||
|
|
@ -352,11 +331,7 @@
|
||||||
},
|
},
|
||||||
"description": "Generates text using OpenAI LLMs.",
|
"description": "Generates text using OpenAI LLMs.",
|
||||||
"icon": "OpenAI",
|
"icon": "OpenAI",
|
||||||
"base_classes": [
|
"base_classes": ["object", "Text", "str"],
|
||||||
"object",
|
|
||||||
"Text",
|
|
||||||
"str"
|
|
||||||
],
|
|
||||||
"display_name": "OpenAI",
|
"display_name": "OpenAI",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
|
|
@ -370,9 +345,7 @@
|
||||||
"stream": null,
|
"stream": null,
|
||||||
"system_message": null
|
"system_message": null
|
||||||
},
|
},
|
||||||
"output_types": [
|
"output_types": ["Text"],
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [
|
"field_order": [
|
||||||
|
|
@ -443,9 +416,7 @@
|
||||||
"name": "input_value",
|
"name": "input_value",
|
||||||
"display_name": "Message",
|
"display_name": "Message",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
"input_types": [
|
"input_types": ["Text"],
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
|
|
@ -469,9 +440,7 @@
|
||||||
"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": [
|
"input_types": ["Text"]
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"return_record": {
|
"return_record": {
|
||||||
"type": "bool",
|
"type": "bool",
|
||||||
|
|
@ -503,10 +472,7 @@
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
"options": [
|
"options": ["Machine", "User"],
|
||||||
"Machine",
|
|
||||||
"User"
|
|
||||||
],
|
|
||||||
"name": "sender",
|
"name": "sender",
|
||||||
"display_name": "Sender Type",
|
"display_name": "Sender Type",
|
||||||
"advanced": true,
|
"advanced": true,
|
||||||
|
|
@ -514,9 +480,7 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": ["Text"]
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"sender_name": {
|
"sender_name": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -536,9 +500,7 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": ["Text"]
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"session_id": {
|
"session_id": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -557,20 +519,13 @@
|
||||||
"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": [
|
"input_types": ["Text"]
|
||||||
"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": [
|
"base_classes": ["Record", "Text", "str", "object"],
|
||||||
"Record",
|
|
||||||
"Text",
|
|
||||||
"str",
|
|
||||||
"object"
|
|
||||||
],
|
|
||||||
"display_name": "Chat Output",
|
"display_name": "Chat Output",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
|
|
@ -581,10 +536,7 @@
|
||||||
"return_record": null,
|
"return_record": null,
|
||||||
"record_template": null
|
"record_template": null
|
||||||
},
|
},
|
||||||
"output_types": [
|
"output_types": ["Text", "Record"],
|
||||||
"Text",
|
|
||||||
"Record"
|
|
||||||
],
|
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [],
|
"field_order": [],
|
||||||
|
|
@ -680,10 +632,7 @@
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
"options": [
|
"options": ["Machine", "User"],
|
||||||
"Machine",
|
|
||||||
"User"
|
|
||||||
],
|
|
||||||
"name": "sender",
|
"name": "sender",
|
||||||
"display_name": "Sender Type",
|
"display_name": "Sender Type",
|
||||||
"advanced": true,
|
"advanced": true,
|
||||||
|
|
@ -691,9 +640,7 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": ["Text"]
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"sender_name": {
|
"sender_name": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -713,9 +660,7 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": ["Text"]
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"session_id": {
|
"session_id": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -734,20 +679,13 @@
|
||||||
"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": [
|
"input_types": ["Text"]
|
||||||
"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": [
|
"base_classes": ["object", "Record", "str", "Text"],
|
||||||
"object",
|
|
||||||
"Record",
|
|
||||||
"str",
|
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"display_name": "Chat Input",
|
"display_name": "Chat Input",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
|
|
@ -757,10 +695,7 @@
|
||||||
"session_id": null,
|
"session_id": null,
|
||||||
"return_record": null
|
"return_record": null
|
||||||
},
|
},
|
||||||
"output_types": [
|
"output_types": ["Text", "Record"],
|
||||||
"Text",
|
|
||||||
"Record"
|
|
||||||
],
|
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [],
|
"field_order": [],
|
||||||
|
|
@ -788,17 +723,11 @@
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "input_value",
|
"fieldName": "input_value",
|
||||||
"id": "ChatOutput-njtka",
|
"id": "ChatOutput-njtka",
|
||||||
"inputTypes": [
|
"inputTypes": ["Text"],
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"type": "str"
|
"type": "str"
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"baseClasses": [
|
"baseClasses": ["object", "Text", "str"],
|
||||||
"object",
|
|
||||||
"Text",
|
|
||||||
"str"
|
|
||||||
],
|
|
||||||
"dataType": "OpenAIModel",
|
"dataType": "OpenAIModel",
|
||||||
"id": "OpenAIModel-k39HS"
|
"id": "OpenAIModel-k39HS"
|
||||||
}
|
}
|
||||||
|
|
@ -818,17 +747,11 @@
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "input_value",
|
"fieldName": "input_value",
|
||||||
"id": "OpenAIModel-k39HS",
|
"id": "OpenAIModel-k39HS",
|
||||||
"inputTypes": [
|
"inputTypes": ["Text"],
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"type": "str"
|
"type": "str"
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"baseClasses": [
|
"baseClasses": ["object", "str", "Text"],
|
||||||
"object",
|
|
||||||
"str",
|
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"dataType": "Prompt",
|
"dataType": "Prompt",
|
||||||
"id": "Prompt-uxBqP"
|
"id": "Prompt-uxBqP"
|
||||||
}
|
}
|
||||||
|
|
@ -848,21 +771,11 @@
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "user_input",
|
"fieldName": "user_input",
|
||||||
"id": "Prompt-uxBqP",
|
"id": "Prompt-uxBqP",
|
||||||
"inputTypes": [
|
"inputTypes": ["Document", "BaseOutputParser", "Record", "Text"],
|
||||||
"Document",
|
|
||||||
"BaseOutputParser",
|
|
||||||
"Record",
|
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"type": "str"
|
"type": "str"
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"baseClasses": [
|
"baseClasses": ["object", "Record", "str", "Text"],
|
||||||
"object",
|
|
||||||
"Record",
|
|
||||||
"str",
|
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"dataType": "ChatInput",
|
"dataType": "ChatInput",
|
||||||
"id": "ChatInput-P3fgL"
|
"id": "ChatInput-P3fgL"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -45,9 +45,7 @@
|
||||||
"name": "template",
|
"name": "template",
|
||||||
"display_name": "Template",
|
"display_name": "Template",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
"input_types": [
|
"input_types": ["Text"],
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
|
|
@ -138,24 +136,14 @@
|
||||||
"is_input": null,
|
"is_input": null,
|
||||||
"is_output": null,
|
"is_output": null,
|
||||||
"is_composition": null,
|
"is_composition": null,
|
||||||
"base_classes": [
|
"base_classes": ["object", "Text", "str"],
|
||||||
"object",
|
|
||||||
"Text",
|
|
||||||
"str"
|
|
||||||
],
|
|
||||||
"name": "",
|
"name": "",
|
||||||
"display_name": "Prompt",
|
"display_name": "Prompt",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
"template": [
|
"template": ["reference_1", "reference_2", "instructions"]
|
||||||
"reference_1",
|
|
||||||
"reference_2",
|
|
||||||
"instructions"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"output_types": [
|
"output_types": ["Text"],
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"full_path": null,
|
"full_path": null,
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
|
|
@ -222,9 +210,7 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": ["Text"],
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"value": [
|
"value": [
|
||||||
"https://www.promptingguide.ai/techniques/prompt_chaining"
|
"https://www.promptingguide.ai/techniques/prompt_chaining"
|
||||||
]
|
]
|
||||||
|
|
@ -233,17 +219,13 @@
|
||||||
},
|
},
|
||||||
"description": "Fetch content from one or more URLs.",
|
"description": "Fetch content from one or more URLs.",
|
||||||
"icon": "layout-template",
|
"icon": "layout-template",
|
||||||
"base_classes": [
|
"base_classes": ["Record"],
|
||||||
"Record"
|
|
||||||
],
|
|
||||||
"display_name": "URL",
|
"display_name": "URL",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
"urls": null
|
"urls": null
|
||||||
},
|
},
|
||||||
"output_types": [
|
"output_types": ["Record"],
|
||||||
"Record"
|
|
||||||
],
|
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [],
|
"field_order": [],
|
||||||
|
|
@ -302,9 +284,7 @@
|
||||||
"name": "input_value",
|
"name": "input_value",
|
||||||
"display_name": "Message",
|
"display_name": "Message",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
"input_types": [
|
"input_types": ["Text"],
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
|
|
@ -328,9 +308,7 @@
|
||||||
"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": [
|
"input_types": ["Text"]
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"return_record": {
|
"return_record": {
|
||||||
"type": "bool",
|
"type": "bool",
|
||||||
|
|
@ -362,10 +340,7 @@
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
"options": [
|
"options": ["Machine", "User"],
|
||||||
"Machine",
|
|
||||||
"User"
|
|
||||||
],
|
|
||||||
"name": "sender",
|
"name": "sender",
|
||||||
"display_name": "Sender Type",
|
"display_name": "Sender Type",
|
||||||
"advanced": true,
|
"advanced": true,
|
||||||
|
|
@ -373,9 +348,7 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": ["Text"]
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"sender_name": {
|
"sender_name": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -395,9 +368,7 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": ["Text"]
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"session_id": {
|
"session_id": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -416,20 +387,13 @@
|
||||||
"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": [
|
"input_types": ["Text"]
|
||||||
"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": [
|
"base_classes": ["Text", "Record", "object", "str"],
|
||||||
"Text",
|
|
||||||
"Record",
|
|
||||||
"object",
|
|
||||||
"str"
|
|
||||||
],
|
|
||||||
"display_name": "Chat Output",
|
"display_name": "Chat Output",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
|
|
@ -440,10 +404,7 @@
|
||||||
"return_record": null,
|
"return_record": null,
|
||||||
"record_template": null
|
"record_template": null
|
||||||
},
|
},
|
||||||
"output_types": [
|
"output_types": ["Text", "Record"],
|
||||||
"Text",
|
|
||||||
"Record"
|
|
||||||
],
|
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [],
|
"field_order": [],
|
||||||
|
|
@ -483,10 +444,7 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": ["Text", "Record"]
|
||||||
"Text",
|
|
||||||
"Record"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"code": {
|
"code": {
|
||||||
"type": "code",
|
"type": "code",
|
||||||
|
|
@ -569,9 +527,7 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": ["Text"]
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"openai_api_base": {
|
"openai_api_base": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -590,9 +546,7 @@
|
||||||
"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": [
|
"input_types": ["Text"]
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"openai_api_key": {
|
"openai_api_key": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -611,9 +565,7 @@
|
||||||
"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": [
|
"input_types": ["Text"],
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"value": "OPENAI_API_KEY"
|
"value": "OPENAI_API_KEY"
|
||||||
},
|
},
|
||||||
"stream": {
|
"stream": {
|
||||||
|
|
@ -652,9 +604,7 @@
|
||||||
"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": [
|
"input_types": ["Text"]
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"temperature": {
|
"temperature": {
|
||||||
"type": "float",
|
"type": "float",
|
||||||
|
|
@ -685,11 +635,7 @@
|
||||||
},
|
},
|
||||||
"description": "Generates text using OpenAI LLMs.",
|
"description": "Generates text using OpenAI LLMs.",
|
||||||
"icon": "OpenAI",
|
"icon": "OpenAI",
|
||||||
"base_classes": [
|
"base_classes": ["str", "Text", "object"],
|
||||||
"str",
|
|
||||||
"Text",
|
|
||||||
"object"
|
|
||||||
],
|
|
||||||
"display_name": "OpenAI",
|
"display_name": "OpenAI",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
|
|
@ -703,9 +649,7 @@
|
||||||
"stream": null,
|
"stream": null,
|
||||||
"system_message": null
|
"system_message": null
|
||||||
},
|
},
|
||||||
"output_types": [
|
"output_types": ["Text"],
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [
|
"field_order": [
|
||||||
|
|
@ -778,28 +722,20 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": ["Text"],
|
||||||
"Text"
|
"value": ["https://www.promptingguide.ai/introduction/basics"]
|
||||||
],
|
|
||||||
"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": [
|
"base_classes": ["Record"],
|
||||||
"Record"
|
|
||||||
],
|
|
||||||
"display_name": "URL",
|
"display_name": "URL",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
"urls": null
|
"urls": null
|
||||||
},
|
},
|
||||||
"output_types": [
|
"output_types": ["Record"],
|
||||||
"Record"
|
|
||||||
],
|
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [],
|
"field_order": [],
|
||||||
|
|
@ -859,10 +795,7 @@
|
||||||
"name": "input_value",
|
"name": "input_value",
|
||||||
"display_name": "Value",
|
"display_name": "Value",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
"input_types": [
|
"input_types": ["Record", "Text"],
|
||||||
"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,
|
||||||
|
|
@ -886,28 +819,20 @@
|
||||||
"info": "Template to convert Record to Text. If left empty, it will be dynamically set to the Record's text key.",
|
"info": "Template to convert Record to Text. If left empty, it will be dynamically set to the Record's text key.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": ["Text"]
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"_type": "CustomComponent"
|
"_type": "CustomComponent"
|
||||||
},
|
},
|
||||||
"description": "Get text inputs from the Playground.",
|
"description": "Get text inputs from the Playground.",
|
||||||
"icon": "type",
|
"icon": "type",
|
||||||
"base_classes": [
|
"base_classes": ["object", "Text", "str"],
|
||||||
"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": [
|
"output_types": ["Text"],
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [],
|
"field_order": [],
|
||||||
|
|
@ -936,18 +861,11 @@
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "reference_2",
|
"fieldName": "reference_2",
|
||||||
"id": "Prompt-Rse03",
|
"id": "Prompt-Rse03",
|
||||||
"inputTypes": [
|
"inputTypes": ["Document", "BaseOutputParser", "Record", "Text"],
|
||||||
"Document",
|
|
||||||
"BaseOutputParser",
|
|
||||||
"Record",
|
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"type": "str"
|
"type": "str"
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"baseClasses": [
|
"baseClasses": ["Record"],
|
||||||
"Record"
|
|
||||||
],
|
|
||||||
"dataType": "URL",
|
"dataType": "URL",
|
||||||
"id": "URL-HYPkR"
|
"id": "URL-HYPkR"
|
||||||
}
|
}
|
||||||
|
|
@ -967,17 +885,11 @@
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "input_value",
|
"fieldName": "input_value",
|
||||||
"id": "ChatOutput-JPlxl",
|
"id": "ChatOutput-JPlxl",
|
||||||
"inputTypes": [
|
"inputTypes": ["Text"],
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"type": "str"
|
"type": "str"
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"baseClasses": [
|
"baseClasses": ["str", "Text", "object"],
|
||||||
"str",
|
|
||||||
"Text",
|
|
||||||
"object"
|
|
||||||
],
|
|
||||||
"dataType": "OpenAIModel",
|
"dataType": "OpenAIModel",
|
||||||
"id": "OpenAIModel-gi29P"
|
"id": "OpenAIModel-gi29P"
|
||||||
}
|
}
|
||||||
|
|
@ -997,18 +909,11 @@
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "reference_1",
|
"fieldName": "reference_1",
|
||||||
"id": "Prompt-Rse03",
|
"id": "Prompt-Rse03",
|
||||||
"inputTypes": [
|
"inputTypes": ["Document", "BaseOutputParser", "Record", "Text"],
|
||||||
"Document",
|
|
||||||
"BaseOutputParser",
|
|
||||||
"Record",
|
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"type": "str"
|
"type": "str"
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"baseClasses": [
|
"baseClasses": ["Record"],
|
||||||
"Record"
|
|
||||||
],
|
|
||||||
"dataType": "URL",
|
"dataType": "URL",
|
||||||
"id": "URL-2cX90"
|
"id": "URL-2cX90"
|
||||||
}
|
}
|
||||||
|
|
@ -1028,20 +933,11 @@
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "instructions",
|
"fieldName": "instructions",
|
||||||
"id": "Prompt-Rse03",
|
"id": "Prompt-Rse03",
|
||||||
"inputTypes": [
|
"inputTypes": ["Document", "BaseOutputParser", "Record", "Text"],
|
||||||
"Document",
|
|
||||||
"BaseOutputParser",
|
|
||||||
"Record",
|
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"type": "str"
|
"type": "str"
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"baseClasses": [
|
"baseClasses": ["object", "Text", "str"],
|
||||||
"object",
|
|
||||||
"Text",
|
|
||||||
"str"
|
|
||||||
],
|
|
||||||
"dataType": "TextInput",
|
"dataType": "TextInput",
|
||||||
"id": "TextInput-og8Or"
|
"id": "TextInput-og8Or"
|
||||||
}
|
}
|
||||||
|
|
@ -1061,17 +957,11 @@
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "input_value",
|
"fieldName": "input_value",
|
||||||
"id": "OpenAIModel-gi29P",
|
"id": "OpenAIModel-gi29P",
|
||||||
"inputTypes": [
|
"inputTypes": ["Text"],
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"type": "str"
|
"type": "str"
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"baseClasses": [
|
"baseClasses": ["object", "Text", "str"],
|
||||||
"object",
|
|
||||||
"Text",
|
|
||||||
"str"
|
|
||||||
],
|
|
||||||
"dataType": "Prompt",
|
"dataType": "Prompt",
|
||||||
"id": "Prompt-Rse03"
|
"id": "Prompt-Rse03"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -45,9 +45,7 @@
|
||||||
"name": "template",
|
"name": "template",
|
||||||
"display_name": "Template",
|
"display_name": "Template",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
"input_types": [
|
"input_types": ["Text"],
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
|
|
@ -112,23 +110,14 @@
|
||||||
"is_input": null,
|
"is_input": null,
|
||||||
"is_output": null,
|
"is_output": null,
|
||||||
"is_composition": null,
|
"is_composition": null,
|
||||||
"base_classes": [
|
"base_classes": ["object", "str", "Text"],
|
||||||
"object",
|
|
||||||
"str",
|
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"name": "",
|
"name": "",
|
||||||
"display_name": "Prompt",
|
"display_name": "Prompt",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
"template": [
|
"template": ["Document", "Question"]
|
||||||
"Document",
|
|
||||||
"Question"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"output_types": [
|
"output_types": ["Text"],
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"full_path": null,
|
"full_path": null,
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
|
|
@ -231,18 +220,14 @@
|
||||||
"_type": "CustomComponent"
|
"_type": "CustomComponent"
|
||||||
},
|
},
|
||||||
"description": "A generic file loader.",
|
"description": "A generic file loader.",
|
||||||
"base_classes": [
|
"base_classes": ["Record"],
|
||||||
"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": [
|
"output_types": ["Record"],
|
||||||
"Record"
|
|
||||||
],
|
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [],
|
"field_order": [],
|
||||||
|
|
@ -338,10 +323,7 @@
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
"options": [
|
"options": ["Machine", "User"],
|
||||||
"Machine",
|
|
||||||
"User"
|
|
||||||
],
|
|
||||||
"name": "sender",
|
"name": "sender",
|
||||||
"display_name": "Sender Type",
|
"display_name": "Sender Type",
|
||||||
"advanced": true,
|
"advanced": true,
|
||||||
|
|
@ -349,9 +331,7 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": ["Text"]
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"sender_name": {
|
"sender_name": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -371,9 +351,7 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": ["Text"]
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"session_id": {
|
"session_id": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -392,20 +370,13 @@
|
||||||
"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": [
|
"input_types": ["Text"]
|
||||||
"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": [
|
"base_classes": ["str", "Record", "Text", "object"],
|
||||||
"str",
|
|
||||||
"Record",
|
|
||||||
"Text",
|
|
||||||
"object"
|
|
||||||
],
|
|
||||||
"display_name": "Chat Input",
|
"display_name": "Chat Input",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
|
|
@ -415,10 +386,7 @@
|
||||||
"session_id": null,
|
"session_id": null,
|
||||||
"return_record": null
|
"return_record": null
|
||||||
},
|
},
|
||||||
"output_types": [
|
"output_types": ["Text", "Record"],
|
||||||
"Text",
|
|
||||||
"Record"
|
|
||||||
],
|
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [],
|
"field_order": [],
|
||||||
|
|
@ -477,9 +445,7 @@
|
||||||
"name": "input_value",
|
"name": "input_value",
|
||||||
"display_name": "Message",
|
"display_name": "Message",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
"input_types": [
|
"input_types": ["Text"],
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
|
|
@ -515,10 +481,7 @@
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
"options": [
|
"options": ["Machine", "User"],
|
||||||
"Machine",
|
|
||||||
"User"
|
|
||||||
],
|
|
||||||
"name": "sender",
|
"name": "sender",
|
||||||
"display_name": "Sender Type",
|
"display_name": "Sender Type",
|
||||||
"advanced": true,
|
"advanced": true,
|
||||||
|
|
@ -526,9 +489,7 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": ["Text"]
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"sender_name": {
|
"sender_name": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -548,9 +509,7 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": ["Text"]
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"session_id": {
|
"session_id": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -569,20 +528,13 @@
|
||||||
"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": [
|
"input_types": ["Text"]
|
||||||
"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": [
|
"base_classes": ["str", "Record", "Text", "object"],
|
||||||
"str",
|
|
||||||
"Record",
|
|
||||||
"Text",
|
|
||||||
"object"
|
|
||||||
],
|
|
||||||
"display_name": "Chat Output",
|
"display_name": "Chat Output",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
|
|
@ -592,10 +544,7 @@
|
||||||
"session_id": null,
|
"session_id": null,
|
||||||
"return_record": null
|
"return_record": null
|
||||||
},
|
},
|
||||||
"output_types": [
|
"output_types": ["Text", "Record"],
|
||||||
"Text",
|
|
||||||
"Record"
|
|
||||||
],
|
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [],
|
"field_order": [],
|
||||||
|
|
@ -640,10 +589,7 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": ["Text", "Record"]
|
||||||
"Text",
|
|
||||||
"Record"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"code": {
|
"code": {
|
||||||
"type": "code",
|
"type": "code",
|
||||||
|
|
@ -726,9 +672,7 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": ["Text"]
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"openai_api_base": {
|
"openai_api_base": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -747,9 +691,7 @@
|
||||||
"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": [
|
"input_types": ["Text"]
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"openai_api_key": {
|
"openai_api_key": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -768,9 +710,7 @@
|
||||||
"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": [
|
"input_types": ["Text"],
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"value": "OPENAI_API_KEY"
|
"value": "OPENAI_API_KEY"
|
||||||
},
|
},
|
||||||
"stream": {
|
"stream": {
|
||||||
|
|
@ -809,9 +749,7 @@
|
||||||
"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": [
|
"input_types": ["Text"]
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"temperature": {
|
"temperature": {
|
||||||
"type": "float",
|
"type": "float",
|
||||||
|
|
@ -842,11 +780,7 @@
|
||||||
},
|
},
|
||||||
"description": "Generates text using OpenAI LLMs.",
|
"description": "Generates text using OpenAI LLMs.",
|
||||||
"icon": "OpenAI",
|
"icon": "OpenAI",
|
||||||
"base_classes": [
|
"base_classes": ["object", "str", "Text"],
|
||||||
"object",
|
|
||||||
"str",
|
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"display_name": "OpenAI",
|
"display_name": "OpenAI",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
|
|
@ -860,9 +794,7 @@
|
||||||
"stream": null,
|
"stream": null,
|
||||||
"system_message": null
|
"system_message": null
|
||||||
},
|
},
|
||||||
"output_types": [
|
"output_types": ["Text"],
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [
|
"field_order": [
|
||||||
|
|
@ -900,21 +832,11 @@
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "Question",
|
"fieldName": "Question",
|
||||||
"id": "Prompt-tHwPf",
|
"id": "Prompt-tHwPf",
|
||||||
"inputTypes": [
|
"inputTypes": ["Document", "BaseOutputParser", "Record", "Text"],
|
||||||
"Document",
|
|
||||||
"BaseOutputParser",
|
|
||||||
"Record",
|
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"type": "str"
|
"type": "str"
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"baseClasses": [
|
"baseClasses": ["str", "Record", "Text", "object"],
|
||||||
"str",
|
|
||||||
"Record",
|
|
||||||
"Text",
|
|
||||||
"object"
|
|
||||||
],
|
|
||||||
"dataType": "ChatInput",
|
"dataType": "ChatInput",
|
||||||
"id": "ChatInput-MsSJ9"
|
"id": "ChatInput-MsSJ9"
|
||||||
}
|
}
|
||||||
|
|
@ -934,18 +856,11 @@
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "Document",
|
"fieldName": "Document",
|
||||||
"id": "Prompt-tHwPf",
|
"id": "Prompt-tHwPf",
|
||||||
"inputTypes": [
|
"inputTypes": ["Document", "BaseOutputParser", "Record", "Text"],
|
||||||
"Document",
|
|
||||||
"BaseOutputParser",
|
|
||||||
"Record",
|
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"type": "str"
|
"type": "str"
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"baseClasses": [
|
"baseClasses": ["Record"],
|
||||||
"Record"
|
|
||||||
],
|
|
||||||
"dataType": "File",
|
"dataType": "File",
|
||||||
"id": "File-6TEsD"
|
"id": "File-6TEsD"
|
||||||
}
|
}
|
||||||
|
|
@ -965,17 +880,11 @@
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "input_value",
|
"fieldName": "input_value",
|
||||||
"id": "OpenAIModel-Bt067",
|
"id": "OpenAIModel-Bt067",
|
||||||
"inputTypes": [
|
"inputTypes": ["Text"],
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"type": "str"
|
"type": "str"
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"baseClasses": [
|
"baseClasses": ["object", "str", "Text"],
|
||||||
"object",
|
|
||||||
"str",
|
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"dataType": "Prompt",
|
"dataType": "Prompt",
|
||||||
"id": "Prompt-tHwPf"
|
"id": "Prompt-tHwPf"
|
||||||
}
|
}
|
||||||
|
|
@ -995,17 +904,11 @@
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "input_value",
|
"fieldName": "input_value",
|
||||||
"id": "ChatOutput-F5Awj",
|
"id": "ChatOutput-F5Awj",
|
||||||
"inputTypes": [
|
"inputTypes": ["Text"],
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"type": "str"
|
"type": "str"
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"baseClasses": [
|
"baseClasses": ["object", "str", "Text"],
|
||||||
"object",
|
|
||||||
"str",
|
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"dataType": "OpenAIModel",
|
"dataType": "OpenAIModel",
|
||||||
"id": "OpenAIModel-Bt067"
|
"id": "OpenAIModel-Bt067"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -83,10 +83,7 @@
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
"options": [
|
"options": ["Machine", "User"],
|
||||||
"Machine",
|
|
||||||
"User"
|
|
||||||
],
|
|
||||||
"name": "sender",
|
"name": "sender",
|
||||||
"display_name": "Sender Type",
|
"display_name": "Sender Type",
|
||||||
"advanced": true,
|
"advanced": true,
|
||||||
|
|
@ -94,9 +91,7 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": ["Text"]
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"sender_name": {
|
"sender_name": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -116,9 +111,7 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": ["Text"]
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"session_id": {
|
"session_id": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -137,21 +130,14 @@
|
||||||
"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": [
|
"input_types": ["Text"],
|
||||||
"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": [
|
"base_classes": ["Text", "object", "Record", "str"],
|
||||||
"Text",
|
|
||||||
"object",
|
|
||||||
"Record",
|
|
||||||
"str"
|
|
||||||
],
|
|
||||||
"display_name": "Chat Input",
|
"display_name": "Chat Input",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
|
|
@ -161,10 +147,7 @@
|
||||||
"session_id": null,
|
"session_id": null,
|
||||||
"return_record": null
|
"return_record": null
|
||||||
},
|
},
|
||||||
"output_types": [
|
"output_types": ["Text", "Record"],
|
||||||
"Text",
|
|
||||||
"Record"
|
|
||||||
],
|
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [],
|
"field_order": [],
|
||||||
|
|
@ -223,9 +206,7 @@
|
||||||
"name": "input_value",
|
"name": "input_value",
|
||||||
"display_name": "Message",
|
"display_name": "Message",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
"input_types": [
|
"input_types": ["Text"],
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
|
|
@ -261,10 +242,7 @@
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
"options": [
|
"options": ["Machine", "User"],
|
||||||
"Machine",
|
|
||||||
"User"
|
|
||||||
],
|
|
||||||
"name": "sender",
|
"name": "sender",
|
||||||
"display_name": "Sender Type",
|
"display_name": "Sender Type",
|
||||||
"advanced": true,
|
"advanced": true,
|
||||||
|
|
@ -272,9 +250,7 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": ["Text"]
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"sender_name": {
|
"sender_name": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -294,9 +270,7 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": ["Text"]
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"session_id": {
|
"session_id": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -315,21 +289,14 @@
|
||||||
"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": [
|
"input_types": ["Text"],
|
||||||
"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": [
|
"base_classes": ["Text", "object", "Record", "str"],
|
||||||
"Text",
|
|
||||||
"object",
|
|
||||||
"Record",
|
|
||||||
"str"
|
|
||||||
],
|
|
||||||
"display_name": "Chat Output",
|
"display_name": "Chat Output",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
|
|
@ -339,10 +306,7 @@
|
||||||
"session_id": null,
|
"session_id": null,
|
||||||
"return_record": null
|
"return_record": null
|
||||||
},
|
},
|
||||||
"output_types": [
|
"output_types": ["Text", "Record"],
|
||||||
"Text",
|
|
||||||
"Record"
|
|
||||||
],
|
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [],
|
"field_order": [],
|
||||||
|
|
@ -418,10 +382,7 @@
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
"options": [
|
"options": ["Ascending", "Descending"],
|
||||||
"Ascending",
|
|
||||||
"Descending"
|
|
||||||
],
|
|
||||||
"name": "order",
|
"name": "order",
|
||||||
"display_name": "Order",
|
"display_name": "Order",
|
||||||
"advanced": true,
|
"advanced": true,
|
||||||
|
|
@ -429,9 +390,7 @@
|
||||||
"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": [
|
"input_types": ["Text"]
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"record_template": {
|
"record_template": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -451,9 +410,7 @@
|
||||||
"info": "Template to convert Record to Text. If left empty, it will be dynamically set to the Record's text key.",
|
"info": "Template to convert Record to Text. If left empty, it will be dynamically set to the Record's text key.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": ["Text"]
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"sender": {
|
"sender": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -466,11 +423,7 @@
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
"options": [
|
"options": ["Machine", "User", "Machine and User"],
|
||||||
"Machine",
|
|
||||||
"User",
|
|
||||||
"Machine and User"
|
|
||||||
],
|
|
||||||
"name": "sender",
|
"name": "sender",
|
||||||
"display_name": "Sender Type",
|
"display_name": "Sender Type",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
|
|
@ -478,9 +431,7 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": ["Text"]
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"sender_name": {
|
"sender_name": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -499,9 +450,7 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": ["Text"]
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"session_id": {
|
"session_id": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -516,9 +465,7 @@
|
||||||
"name": "session_id",
|
"name": "session_id",
|
||||||
"display_name": "Session ID",
|
"display_name": "Session ID",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
"input_types": [
|
"input_types": ["Text"],
|
||||||
"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,
|
||||||
|
|
@ -529,11 +476,7 @@
|
||||||
},
|
},
|
||||||
"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": [
|
"base_classes": ["str", "Text", "object"],
|
||||||
"str",
|
|
||||||
"Text",
|
|
||||||
"object"
|
|
||||||
],
|
|
||||||
"display_name": "Chat Memory",
|
"display_name": "Chat Memory",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
|
|
@ -544,9 +487,7 @@
|
||||||
"order": null,
|
"order": null,
|
||||||
"record_template": null
|
"record_template": null
|
||||||
},
|
},
|
||||||
"output_types": [
|
"output_types": ["Text"],
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [],
|
"field_order": [],
|
||||||
|
|
@ -608,9 +549,7 @@
|
||||||
"name": "template",
|
"name": "template",
|
||||||
"display_name": "Template",
|
"display_name": "Template",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
"input_types": [
|
"input_types": ["Text"],
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
|
|
@ -675,23 +614,14 @@
|
||||||
"is_input": null,
|
"is_input": null,
|
||||||
"is_output": null,
|
"is_output": null,
|
||||||
"is_composition": null,
|
"is_composition": null,
|
||||||
"base_classes": [
|
"base_classes": ["Text", "str", "object"],
|
||||||
"Text",
|
|
||||||
"str",
|
|
||||||
"object"
|
|
||||||
],
|
|
||||||
"name": "",
|
"name": "",
|
||||||
"display_name": "Prompt",
|
"display_name": "Prompt",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
"template": [
|
"template": ["context", "user_message"]
|
||||||
"context",
|
|
||||||
"user_message"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"output_types": [
|
"output_types": ["Text"],
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"full_path": null,
|
"full_path": null,
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
|
|
@ -740,10 +670,7 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": ["Text", "Record"]
|
||||||
"Text",
|
|
||||||
"Record"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"code": {
|
"code": {
|
||||||
"type": "code",
|
"type": "code",
|
||||||
|
|
@ -826,9 +753,7 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": ["Text"]
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"openai_api_base": {
|
"openai_api_base": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -847,9 +772,7 @@
|
||||||
"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": [
|
"input_types": ["Text"]
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"openai_api_key": {
|
"openai_api_key": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -868,9 +791,7 @@
|
||||||
"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": [
|
"input_types": ["Text"],
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"value": "OPENAI_API_KEY"
|
"value": "OPENAI_API_KEY"
|
||||||
},
|
},
|
||||||
"stream": {
|
"stream": {
|
||||||
|
|
@ -909,9 +830,7 @@
|
||||||
"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": [
|
"input_types": ["Text"]
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"temperature": {
|
"temperature": {
|
||||||
"type": "float",
|
"type": "float",
|
||||||
|
|
@ -942,11 +861,7 @@
|
||||||
},
|
},
|
||||||
"description": "Generates text using OpenAI LLMs.",
|
"description": "Generates text using OpenAI LLMs.",
|
||||||
"icon": "OpenAI",
|
"icon": "OpenAI",
|
||||||
"base_classes": [
|
"base_classes": ["str", "object", "Text"],
|
||||||
"str",
|
|
||||||
"object",
|
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"display_name": "OpenAI",
|
"display_name": "OpenAI",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
|
|
@ -960,9 +875,7 @@
|
||||||
"stream": null,
|
"stream": null,
|
||||||
"system_message": null
|
"system_message": null
|
||||||
},
|
},
|
||||||
"output_types": [
|
"output_types": ["Text"],
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [
|
"field_order": [
|
||||||
|
|
@ -1014,10 +927,7 @@
|
||||||
"name": "input_value",
|
"name": "input_value",
|
||||||
"display_name": "Value",
|
"display_name": "Value",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
"input_types": [
|
"input_types": ["Record", "Text"],
|
||||||
"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,
|
||||||
|
|
@ -1059,28 +969,20 @@
|
||||||
"info": "Template to convert Record to Text. If left empty, it will be dynamically set to the Record's text key.",
|
"info": "Template to convert Record to Text. If left empty, it will be dynamically set to the Record's text key.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": ["Text"]
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"_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": [
|
"base_classes": ["str", "object", "Text"],
|
||||||
"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": [
|
"output_types": ["Text"],
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [],
|
"field_order": [],
|
||||||
|
|
@ -1109,19 +1011,10 @@
|
||||||
"fieldName": "context",
|
"fieldName": "context",
|
||||||
"type": "str",
|
"type": "str",
|
||||||
"id": "Prompt-ODkUx",
|
"id": "Prompt-ODkUx",
|
||||||
"inputTypes": [
|
"inputTypes": ["Document", "BaseOutputParser", "Record", "Text"]
|
||||||
"Document",
|
|
||||||
"BaseOutputParser",
|
|
||||||
"Record",
|
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"baseClasses": [
|
"baseClasses": ["str", "Text", "object"],
|
||||||
"str",
|
|
||||||
"Text",
|
|
||||||
"object"
|
|
||||||
],
|
|
||||||
"dataType": "MemoryComponent",
|
"dataType": "MemoryComponent",
|
||||||
"id": "MemoryComponent-cdA1J"
|
"id": "MemoryComponent-cdA1J"
|
||||||
}
|
}
|
||||||
|
|
@ -1143,20 +1036,10 @@
|
||||||
"fieldName": "user_message",
|
"fieldName": "user_message",
|
||||||
"type": "str",
|
"type": "str",
|
||||||
"id": "Prompt-ODkUx",
|
"id": "Prompt-ODkUx",
|
||||||
"inputTypes": [
|
"inputTypes": ["Document", "BaseOutputParser", "Record", "Text"]
|
||||||
"Document",
|
|
||||||
"BaseOutputParser",
|
|
||||||
"Record",
|
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"baseClasses": [
|
"baseClasses": ["Text", "object", "Record", "str"],
|
||||||
"Text",
|
|
||||||
"object",
|
|
||||||
"Record",
|
|
||||||
"str"
|
|
||||||
],
|
|
||||||
"dataType": "ChatInput",
|
"dataType": "ChatInput",
|
||||||
"id": "ChatInput-t7F8v"
|
"id": "ChatInput-t7F8v"
|
||||||
}
|
}
|
||||||
|
|
@ -1177,17 +1060,11 @@
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "input_value",
|
"fieldName": "input_value",
|
||||||
"id": "OpenAIModel-9RykF",
|
"id": "OpenAIModel-9RykF",
|
||||||
"inputTypes": [
|
"inputTypes": ["Text"],
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"type": "str"
|
"type": "str"
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"baseClasses": [
|
"baseClasses": ["Text", "str", "object"],
|
||||||
"Text",
|
|
||||||
"str",
|
|
||||||
"object"
|
|
||||||
],
|
|
||||||
"dataType": "Prompt",
|
"dataType": "Prompt",
|
||||||
"id": "Prompt-ODkUx"
|
"id": "Prompt-ODkUx"
|
||||||
}
|
}
|
||||||
|
|
@ -1207,17 +1084,11 @@
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "input_value",
|
"fieldName": "input_value",
|
||||||
"id": "ChatOutput-P1jEe",
|
"id": "ChatOutput-P1jEe",
|
||||||
"inputTypes": [
|
"inputTypes": ["Text"],
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"type": "str"
|
"type": "str"
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"baseClasses": [
|
"baseClasses": ["str", "object", "Text"],
|
||||||
"str",
|
|
||||||
"object",
|
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"dataType": "OpenAIModel",
|
"dataType": "OpenAIModel",
|
||||||
"id": "OpenAIModel-9RykF"
|
"id": "OpenAIModel-9RykF"
|
||||||
}
|
}
|
||||||
|
|
@ -1237,18 +1108,11 @@
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "input_value",
|
"fieldName": "input_value",
|
||||||
"id": "TextOutput-vrs6T",
|
"id": "TextOutput-vrs6T",
|
||||||
"inputTypes": [
|
"inputTypes": ["Record", "Text"],
|
||||||
"Record",
|
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"type": "str"
|
"type": "str"
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"baseClasses": [
|
"baseClasses": ["str", "Text", "object"],
|
||||||
"str",
|
|
||||||
"Text",
|
|
||||||
"object"
|
|
||||||
],
|
|
||||||
"dataType": "MemoryComponent",
|
"dataType": "MemoryComponent",
|
||||||
"id": "MemoryComponent-cdA1J"
|
"id": "MemoryComponent-cdA1J"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -45,9 +45,7 @@
|
||||||
"name": "template",
|
"name": "template",
|
||||||
"display_name": "Template",
|
"display_name": "Template",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
"input_types": [
|
"input_types": ["Text"],
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
|
|
@ -86,22 +84,14 @@
|
||||||
"is_input": null,
|
"is_input": null,
|
||||||
"is_output": null,
|
"is_output": null,
|
||||||
"is_composition": null,
|
"is_composition": null,
|
||||||
"base_classes": [
|
"base_classes": ["object", "str", "Text"],
|
||||||
"object",
|
|
||||||
"str",
|
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"name": "",
|
"name": "",
|
||||||
"display_name": "Prompt",
|
"display_name": "Prompt",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
"template": [
|
"template": ["document"]
|
||||||
"document"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"output_types": [
|
"output_types": ["Text"],
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"full_path": null,
|
"full_path": null,
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
|
|
@ -165,9 +155,7 @@
|
||||||
"name": "template",
|
"name": "template",
|
||||||
"display_name": "Template",
|
"display_name": "Template",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
"input_types": [
|
"input_types": ["Text"],
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
|
|
@ -206,22 +194,14 @@
|
||||||
"is_input": null,
|
"is_input": null,
|
||||||
"is_output": null,
|
"is_output": null,
|
||||||
"is_composition": null,
|
"is_composition": null,
|
||||||
"base_classes": [
|
"base_classes": ["object", "str", "Text"],
|
||||||
"object",
|
|
||||||
"str",
|
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"name": "",
|
"name": "",
|
||||||
"display_name": "Prompt",
|
"display_name": "Prompt",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
"template": [
|
"template": ["summary"]
|
||||||
"summary"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"output_types": [
|
"output_types": ["Text"],
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"full_path": null,
|
"full_path": null,
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
|
|
@ -280,9 +260,7 @@
|
||||||
"name": "input_value",
|
"name": "input_value",
|
||||||
"display_name": "Message",
|
"display_name": "Message",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
"input_types": [
|
"input_types": ["Text"],
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
|
|
@ -306,9 +284,7 @@
|
||||||
"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": [
|
"input_types": ["Text"]
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"return_record": {
|
"return_record": {
|
||||||
"type": "bool",
|
"type": "bool",
|
||||||
|
|
@ -340,10 +316,7 @@
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
"options": [
|
"options": ["Machine", "User"],
|
||||||
"Machine",
|
|
||||||
"User"
|
|
||||||
],
|
|
||||||
"name": "sender",
|
"name": "sender",
|
||||||
"display_name": "Sender Type",
|
"display_name": "Sender Type",
|
||||||
"advanced": true,
|
"advanced": true,
|
||||||
|
|
@ -351,9 +324,7 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": ["Text"]
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"sender_name": {
|
"sender_name": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -373,9 +344,7 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": ["Text"]
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"session_id": {
|
"session_id": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -394,20 +363,13 @@
|
||||||
"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": [
|
"input_types": ["Text"]
|
||||||
"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": [
|
"base_classes": ["object", "Record", "Text", "str"],
|
||||||
"object",
|
|
||||||
"Record",
|
|
||||||
"Text",
|
|
||||||
"str"
|
|
||||||
],
|
|
||||||
"display_name": "Chat Output",
|
"display_name": "Chat Output",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
|
|
@ -418,10 +380,7 @@
|
||||||
"return_record": null,
|
"return_record": null,
|
||||||
"record_template": null
|
"record_template": null
|
||||||
},
|
},
|
||||||
"output_types": [
|
"output_types": ["Text", "Record"],
|
||||||
"Text",
|
|
||||||
"Record"
|
|
||||||
],
|
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [],
|
"field_order": [],
|
||||||
|
|
@ -476,9 +435,7 @@
|
||||||
"name": "input_value",
|
"name": "input_value",
|
||||||
"display_name": "Message",
|
"display_name": "Message",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
"input_types": [
|
"input_types": ["Text"],
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
|
|
@ -502,9 +459,7 @@
|
||||||
"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": [
|
"input_types": ["Text"]
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"return_record": {
|
"return_record": {
|
||||||
"type": "bool",
|
"type": "bool",
|
||||||
|
|
@ -536,10 +491,7 @@
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"password": false,
|
"password": false,
|
||||||
"options": [
|
"options": ["Machine", "User"],
|
||||||
"Machine",
|
|
||||||
"User"
|
|
||||||
],
|
|
||||||
"name": "sender",
|
"name": "sender",
|
||||||
"display_name": "Sender Type",
|
"display_name": "Sender Type",
|
||||||
"advanced": true,
|
"advanced": true,
|
||||||
|
|
@ -547,9 +499,7 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": ["Text"]
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"sender_name": {
|
"sender_name": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -569,9 +519,7 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": ["Text"]
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"session_id": {
|
"session_id": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -590,20 +538,13 @@
|
||||||
"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": [
|
"input_types": ["Text"]
|
||||||
"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": [
|
"base_classes": ["object", "Record", "Text", "str"],
|
||||||
"object",
|
|
||||||
"Record",
|
|
||||||
"Text",
|
|
||||||
"str"
|
|
||||||
],
|
|
||||||
"display_name": "Chat Output",
|
"display_name": "Chat Output",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
|
|
@ -614,10 +555,7 @@
|
||||||
"return_record": null,
|
"return_record": null,
|
||||||
"record_template": null
|
"record_template": null
|
||||||
},
|
},
|
||||||
"output_types": [
|
"output_types": ["Text", "Record"],
|
||||||
"Text",
|
|
||||||
"Record"
|
|
||||||
],
|
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [],
|
"field_order": [],
|
||||||
|
|
@ -672,10 +610,7 @@
|
||||||
"name": "input_value",
|
"name": "input_value",
|
||||||
"display_name": "Value",
|
"display_name": "Value",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
"input_types": [
|
"input_types": ["Record", "Text"],
|
||||||
"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,
|
||||||
|
|
@ -699,28 +634,20 @@
|
||||||
"info": "Template to convert Record to Text. If left empty, it will be dynamically set to the Record's text key.",
|
"info": "Template to convert Record to Text. If left empty, it will be dynamically set to the Record's text key.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": ["Text"]
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"_type": "CustomComponent"
|
"_type": "CustomComponent"
|
||||||
},
|
},
|
||||||
"description": "Get text inputs from the Playground.",
|
"description": "Get text inputs from the Playground.",
|
||||||
"icon": "type",
|
"icon": "type",
|
||||||
"base_classes": [
|
"base_classes": ["str", "Text", "object"],
|
||||||
"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": [
|
"output_types": ["Text"],
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [],
|
"field_order": [],
|
||||||
|
|
@ -762,10 +689,7 @@
|
||||||
"name": "input_value",
|
"name": "input_value",
|
||||||
"display_name": "Value",
|
"display_name": "Value",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
"input_types": [
|
"input_types": ["Record", "Text"],
|
||||||
"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,
|
||||||
|
|
@ -807,28 +731,20 @@
|
||||||
"info": "Template to convert Record to Text. If left empty, it will be dynamically set to the Record's text key.",
|
"info": "Template to convert Record to Text. If left empty, it will be dynamically set to the Record's text key.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": ["Text"]
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"_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": [
|
"base_classes": ["str", "Text", "object"],
|
||||||
"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": [
|
"output_types": ["Text"],
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [],
|
"field_order": [],
|
||||||
|
|
@ -873,10 +789,7 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": ["Text", "Record"]
|
||||||
"Text",
|
|
||||||
"Record"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"code": {
|
"code": {
|
||||||
"type": "code",
|
"type": "code",
|
||||||
|
|
@ -959,9 +872,7 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": ["Text"]
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"openai_api_base": {
|
"openai_api_base": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -980,9 +891,7 @@
|
||||||
"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": [
|
"input_types": ["Text"]
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"openai_api_key": {
|
"openai_api_key": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -1001,9 +910,7 @@
|
||||||
"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": [
|
"input_types": ["Text"],
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"value": "OPENAI_API_KEY"
|
"value": "OPENAI_API_KEY"
|
||||||
},
|
},
|
||||||
"stream": {
|
"stream": {
|
||||||
|
|
@ -1042,9 +949,7 @@
|
||||||
"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": [
|
"input_types": ["Text"]
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"temperature": {
|
"temperature": {
|
||||||
"type": "float",
|
"type": "float",
|
||||||
|
|
@ -1075,11 +980,7 @@
|
||||||
},
|
},
|
||||||
"description": "Generates text using OpenAI LLMs.",
|
"description": "Generates text using OpenAI LLMs.",
|
||||||
"icon": "OpenAI",
|
"icon": "OpenAI",
|
||||||
"base_classes": [
|
"base_classes": ["str", "Text", "object"],
|
||||||
"str",
|
|
||||||
"Text",
|
|
||||||
"object"
|
|
||||||
],
|
|
||||||
"display_name": "OpenAI",
|
"display_name": "OpenAI",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
|
|
@ -1093,9 +994,7 @@
|
||||||
"stream": null,
|
"stream": null,
|
||||||
"system_message": null
|
"system_message": null
|
||||||
},
|
},
|
||||||
"output_types": [
|
"output_types": ["Text"],
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [
|
"field_order": [
|
||||||
|
|
@ -1147,10 +1046,7 @@
|
||||||
"name": "input_value",
|
"name": "input_value",
|
||||||
"display_name": "Value",
|
"display_name": "Value",
|
||||||
"advanced": false,
|
"advanced": false,
|
||||||
"input_types": [
|
"input_types": ["Record", "Text"],
|
||||||
"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,
|
||||||
|
|
@ -1192,28 +1088,20 @@
|
||||||
"info": "Template to convert Record to Text. If left empty, it will be dynamically set to the Record's text key.",
|
"info": "Template to convert Record to Text. If left empty, it will be dynamically set to the Record's text key.",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": ["Text"]
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"_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": [
|
"base_classes": ["str", "Text", "object"],
|
||||||
"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": [
|
"output_types": ["Text"],
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [],
|
"field_order": [],
|
||||||
|
|
@ -1258,10 +1146,7 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": ["Text", "Record"]
|
||||||
"Text",
|
|
||||||
"Record"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"code": {
|
"code": {
|
||||||
"type": "code",
|
"type": "code",
|
||||||
|
|
@ -1344,9 +1229,7 @@
|
||||||
"info": "",
|
"info": "",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"title_case": false,
|
"title_case": false,
|
||||||
"input_types": [
|
"input_types": ["Text"]
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"openai_api_base": {
|
"openai_api_base": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -1365,9 +1248,7 @@
|
||||||
"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": [
|
"input_types": ["Text"]
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"openai_api_key": {
|
"openai_api_key": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
|
|
@ -1386,9 +1267,7 @@
|
||||||
"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": [
|
"input_types": ["Text"],
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"value": ""
|
"value": ""
|
||||||
},
|
},
|
||||||
"stream": {
|
"stream": {
|
||||||
|
|
@ -1427,9 +1306,7 @@
|
||||||
"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": [
|
"input_types": ["Text"]
|
||||||
"Text"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"temperature": {
|
"temperature": {
|
||||||
"type": "float",
|
"type": "float",
|
||||||
|
|
@ -1460,11 +1337,7 @@
|
||||||
},
|
},
|
||||||
"description": "Generates text using OpenAI LLMs.",
|
"description": "Generates text using OpenAI LLMs.",
|
||||||
"icon": "OpenAI",
|
"icon": "OpenAI",
|
||||||
"base_classes": [
|
"base_classes": ["str", "Text", "object"],
|
||||||
"str",
|
|
||||||
"Text",
|
|
||||||
"object"
|
|
||||||
],
|
|
||||||
"display_name": "OpenAI",
|
"display_name": "OpenAI",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
|
|
@ -1478,9 +1351,7 @@
|
||||||
"stream": null,
|
"stream": null,
|
||||||
"system_message": null
|
"system_message": null
|
||||||
},
|
},
|
||||||
"output_types": [
|
"output_types": ["Text"],
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"field_formatters": {},
|
"field_formatters": {},
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"field_order": [
|
"field_order": [
|
||||||
|
|
@ -1518,20 +1389,11 @@
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "document",
|
"fieldName": "document",
|
||||||
"id": "Prompt-amqBu",
|
"id": "Prompt-amqBu",
|
||||||
"inputTypes": [
|
"inputTypes": ["Document", "BaseOutputParser", "Record", "Text"],
|
||||||
"Document",
|
|
||||||
"BaseOutputParser",
|
|
||||||
"Record",
|
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"type": "str"
|
"type": "str"
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"baseClasses": [
|
"baseClasses": ["str", "Text", "object"],
|
||||||
"str",
|
|
||||||
"Text",
|
|
||||||
"object"
|
|
||||||
],
|
|
||||||
"dataType": "TextInput",
|
"dataType": "TextInput",
|
||||||
"id": "TextInput-sptaH"
|
"id": "TextInput-sptaH"
|
||||||
}
|
}
|
||||||
|
|
@ -1551,18 +1413,11 @@
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "input_value",
|
"fieldName": "input_value",
|
||||||
"id": "TextOutput-2MS4a",
|
"id": "TextOutput-2MS4a",
|
||||||
"inputTypes": [
|
"inputTypes": ["Record", "Text"],
|
||||||
"Record",
|
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"type": "str"
|
"type": "str"
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"baseClasses": [
|
"baseClasses": ["object", "str", "Text"],
|
||||||
"object",
|
|
||||||
"str",
|
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"dataType": "Prompt",
|
"dataType": "Prompt",
|
||||||
"id": "Prompt-amqBu"
|
"id": "Prompt-amqBu"
|
||||||
}
|
}
|
||||||
|
|
@ -1582,17 +1437,11 @@
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "input_value",
|
"fieldName": "input_value",
|
||||||
"id": "OpenAIModel-uYXZJ",
|
"id": "OpenAIModel-uYXZJ",
|
||||||
"inputTypes": [
|
"inputTypes": ["Text"],
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"type": "str"
|
"type": "str"
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"baseClasses": [
|
"baseClasses": ["object", "str", "Text"],
|
||||||
"object",
|
|
||||||
"str",
|
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"dataType": "Prompt",
|
"dataType": "Prompt",
|
||||||
"id": "Prompt-amqBu"
|
"id": "Prompt-amqBu"
|
||||||
}
|
}
|
||||||
|
|
@ -1612,20 +1461,11 @@
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "summary",
|
"fieldName": "summary",
|
||||||
"id": "Prompt-gTNiz",
|
"id": "Prompt-gTNiz",
|
||||||
"inputTypes": [
|
"inputTypes": ["Document", "BaseOutputParser", "Record", "Text"],
|
||||||
"Document",
|
|
||||||
"BaseOutputParser",
|
|
||||||
"Record",
|
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"type": "str"
|
"type": "str"
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"baseClasses": [
|
"baseClasses": ["str", "Text", "object"],
|
||||||
"str",
|
|
||||||
"Text",
|
|
||||||
"object"
|
|
||||||
],
|
|
||||||
"dataType": "OpenAIModel",
|
"dataType": "OpenAIModel",
|
||||||
"id": "OpenAIModel-uYXZJ"
|
"id": "OpenAIModel-uYXZJ"
|
||||||
}
|
}
|
||||||
|
|
@ -1645,17 +1485,11 @@
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "input_value",
|
"fieldName": "input_value",
|
||||||
"id": "ChatOutput-EJkG3",
|
"id": "ChatOutput-EJkG3",
|
||||||
"inputTypes": [
|
"inputTypes": ["Text"],
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"type": "str"
|
"type": "str"
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"baseClasses": [
|
"baseClasses": ["str", "Text", "object"],
|
||||||
"str",
|
|
||||||
"Text",
|
|
||||||
"object"
|
|
||||||
],
|
|
||||||
"dataType": "OpenAIModel",
|
"dataType": "OpenAIModel",
|
||||||
"id": "OpenAIModel-uYXZJ"
|
"id": "OpenAIModel-uYXZJ"
|
||||||
}
|
}
|
||||||
|
|
@ -1675,18 +1509,11 @@
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "input_value",
|
"fieldName": "input_value",
|
||||||
"id": "TextOutput-MUDOR",
|
"id": "TextOutput-MUDOR",
|
||||||
"inputTypes": [
|
"inputTypes": ["Record", "Text"],
|
||||||
"Record",
|
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"type": "str"
|
"type": "str"
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"baseClasses": [
|
"baseClasses": ["object", "str", "Text"],
|
||||||
"object",
|
|
||||||
"str",
|
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"dataType": "Prompt",
|
"dataType": "Prompt",
|
||||||
"id": "Prompt-gTNiz"
|
"id": "Prompt-gTNiz"
|
||||||
}
|
}
|
||||||
|
|
@ -1706,17 +1533,11 @@
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "input_value",
|
"fieldName": "input_value",
|
||||||
"id": "OpenAIModel-XawYB",
|
"id": "OpenAIModel-XawYB",
|
||||||
"inputTypes": [
|
"inputTypes": ["Text"],
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"type": "str"
|
"type": "str"
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"baseClasses": [
|
"baseClasses": ["object", "str", "Text"],
|
||||||
"object",
|
|
||||||
"str",
|
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"dataType": "Prompt",
|
"dataType": "Prompt",
|
||||||
"id": "Prompt-gTNiz"
|
"id": "Prompt-gTNiz"
|
||||||
}
|
}
|
||||||
|
|
@ -1736,17 +1557,11 @@
|
||||||
"targetHandle": {
|
"targetHandle": {
|
||||||
"fieldName": "input_value",
|
"fieldName": "input_value",
|
||||||
"id": "ChatOutput-DNmvg",
|
"id": "ChatOutput-DNmvg",
|
||||||
"inputTypes": [
|
"inputTypes": ["Text"],
|
||||||
"Text"
|
|
||||||
],
|
|
||||||
"type": "str"
|
"type": "str"
|
||||||
},
|
},
|
||||||
"sourceHandle": {
|
"sourceHandle": {
|
||||||
"baseClasses": [
|
"baseClasses": ["str", "Text", "object"],
|
||||||
"str",
|
|
||||||
"Text",
|
|
||||||
"object"
|
|
||||||
],
|
|
||||||
"dataType": "OpenAIModel",
|
"dataType": "OpenAIModel",
|
||||||
"id": "OpenAIModel-XawYB"
|
"id": "OpenAIModel-XawYB"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import {
|
||||||
RUN_TIMESTAMP_PREFIX,
|
RUN_TIMESTAMP_PREFIX,
|
||||||
STATUS_BUILD,
|
STATUS_BUILD,
|
||||||
STATUS_BUILDING,
|
STATUS_BUILDING,
|
||||||
|
TOOLTIP_OUTDATED_NODE,
|
||||||
} from "../../constants/constants";
|
} from "../../constants/constants";
|
||||||
import { BuildStatus } from "../../constants/enums";
|
import { BuildStatus } from "../../constants/enums";
|
||||||
import { countHandlesFn } from "../helpers/count-handles";
|
import { countHandlesFn } from "../helpers/count-handles";
|
||||||
|
|
@ -34,6 +35,8 @@ import useValidationStatusString from "../hooks/use-validation-status-string";
|
||||||
import getFieldTitle from "../utils/get-field-title";
|
import getFieldTitle from "../utils/get-field-title";
|
||||||
import sortFields from "../utils/sort-fields";
|
import sortFields from "../utils/sort-fields";
|
||||||
import ParameterComponent from "./components/parameterComponent";
|
import ParameterComponent from "./components/parameterComponent";
|
||||||
|
import { postCustomComponent } from "../../controllers/API";
|
||||||
|
import { cloneDeep } from "lodash";
|
||||||
|
|
||||||
export default function GenericNode({
|
export default function GenericNode({
|
||||||
data,
|
data,
|
||||||
|
|
@ -55,10 +58,10 @@ export default function GenericNode({
|
||||||
const setErrorData = useAlertStore((state) => state.setErrorData);
|
const setErrorData = useAlertStore((state) => state.setErrorData);
|
||||||
const isDark = useDarkStore((state) => state.dark);
|
const isDark = useDarkStore((state) => state.dark);
|
||||||
const buildStatus = useFlowStore(
|
const buildStatus = useFlowStore(
|
||||||
(state) => state.flowBuildStatus[data.id]?.status
|
(state) => state.flowBuildStatus[data.id]?.status,
|
||||||
);
|
);
|
||||||
const lastRunTime = useFlowStore(
|
const lastRunTime = useFlowStore(
|
||||||
(state) => state.flowBuildStatus[data.id]?.timestamp
|
(state) => state.flowBuildStatus[data.id]?.timestamp,
|
||||||
);
|
);
|
||||||
const takeSnapshot = useFlowsManagerStore((state) => state.takeSnapshot);
|
const takeSnapshot = useFlowsManagerStore((state) => state.takeSnapshot);
|
||||||
|
|
||||||
|
|
@ -66,7 +69,7 @@ export default function GenericNode({
|
||||||
const [nodeName, setNodeName] = useState(data.node!.display_name);
|
const [nodeName, setNodeName] = useState(data.node!.display_name);
|
||||||
const [inputDescription, setInputDescription] = useState(false);
|
const [inputDescription, setInputDescription] = useState(false);
|
||||||
const [nodeDescription, setNodeDescription] = useState(
|
const [nodeDescription, setNodeDescription] = useState(
|
||||||
data.node?.description!
|
data.node?.description!,
|
||||||
);
|
);
|
||||||
const [isOutdated, setIsOutdated] = useState(false);
|
const [isOutdated, setIsOutdated] = useState(false);
|
||||||
const [validationStatus, setValidationStatus] =
|
const [validationStatus, setValidationStatus] =
|
||||||
|
|
@ -84,7 +87,7 @@ export default function GenericNode({
|
||||||
data.node!,
|
data.node!,
|
||||||
setNode,
|
setNode,
|
||||||
setIsOutdated,
|
setIsOutdated,
|
||||||
updateNodeInternals
|
updateNodeInternals,
|
||||||
);
|
);
|
||||||
|
|
||||||
const name = nodeIconsLucide[data.type] ? data.type : types[data.type];
|
const name = nodeIconsLucide[data.type] ? data.type : types[data.type];
|
||||||
|
|
@ -115,12 +118,12 @@ export default function GenericNode({
|
||||||
selected: boolean,
|
selected: boolean,
|
||||||
showNode: boolean,
|
showNode: boolean,
|
||||||
buildStatus: BuildStatus | undefined,
|
buildStatus: BuildStatus | undefined,
|
||||||
validationStatus: VertexBuildTypeAPI | null
|
validationStatus: VertexBuildTypeAPI | null,
|
||||||
) => {
|
) => {
|
||||||
const specificClassFromBuildStatus = getSpecificClassFromBuildStatus(
|
const specificClassFromBuildStatus = getSpecificClassFromBuildStatus(
|
||||||
buildStatus,
|
buildStatus,
|
||||||
validationStatus,
|
validationStatus,
|
||||||
isDark
|
isDark,
|
||||||
);
|
);
|
||||||
|
|
||||||
const baseBorderClass = getBaseBorderClass(selected);
|
const baseBorderClass = getBaseBorderClass(selected);
|
||||||
|
|
@ -129,7 +132,7 @@ export default function GenericNode({
|
||||||
baseBorderClass,
|
baseBorderClass,
|
||||||
nodeSizeClass,
|
nodeSizeClass,
|
||||||
"generic-node-div group/node",
|
"generic-node-div group/node",
|
||||||
specificClassFromBuildStatus
|
specificClassFromBuildStatus,
|
||||||
);
|
);
|
||||||
return names;
|
return names;
|
||||||
};
|
};
|
||||||
|
|
@ -170,7 +173,7 @@ export default function GenericNode({
|
||||||
showNode,
|
showNode,
|
||||||
isEmoji,
|
isEmoji,
|
||||||
nodeIconFragment,
|
nodeIconFragment,
|
||||||
checkNodeIconFragment
|
checkNodeIconFragment,
|
||||||
);
|
);
|
||||||
|
|
||||||
function countHandles(): void {
|
function countHandles(): void {
|
||||||
|
|
@ -201,6 +204,33 @@ export default function GenericNode({
|
||||||
setShowNode(data.showNode ?? true);
|
setShowNode(data.showNode ?? true);
|
||||||
}, [data.showNode]);
|
}, [data.showNode]);
|
||||||
|
|
||||||
|
const [loadingUpdate, setLoadingUpdate] = useState(false);
|
||||||
|
|
||||||
|
const handleUpdateCode = () => {
|
||||||
|
setLoadingUpdate(true);
|
||||||
|
takeSnapshot();
|
||||||
|
// to update we must get the code from the templates in useTypesStore
|
||||||
|
const thisNodeTemplate = templates[data.type]?.template;
|
||||||
|
// if the template does not have a code key
|
||||||
|
// return
|
||||||
|
if (!thisNodeTemplate?.code) return;
|
||||||
|
|
||||||
|
const currentCode = thisNodeTemplate.code.value;
|
||||||
|
if (data.node) {
|
||||||
|
postCustomComponent(currentCode, data.node)
|
||||||
|
.then((apiReturn) => {
|
||||||
|
const { data } = apiReturn;
|
||||||
|
if (data && updateNodeCode) {
|
||||||
|
updateNodeCode(data, currentCode, "code");
|
||||||
|
setLoadingUpdate(false);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log(err);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const memoizedNodeToolbarComponent = useMemo(() => {
|
const memoizedNodeToolbarComponent = useMemo(() => {
|
||||||
return (
|
return (
|
||||||
<NodeToolbar>
|
<NodeToolbar>
|
||||||
|
|
@ -221,8 +251,6 @@ export default function GenericNode({
|
||||||
showNode={showNode}
|
showNode={showNode}
|
||||||
openAdvancedModal={false}
|
openAdvancedModal={false}
|
||||||
onCloseAdvancedModal={() => {}}
|
onCloseAdvancedModal={() => {}}
|
||||||
updateNodeCode={updateNodeCode}
|
|
||||||
isOutdated={isOutdated}
|
|
||||||
selected={selected}
|
selected={selected}
|
||||||
/>
|
/>
|
||||||
</NodeToolbar>
|
</NodeToolbar>
|
||||||
|
|
@ -247,7 +275,7 @@ export default function GenericNode({
|
||||||
selected,
|
selected,
|
||||||
showNode,
|
showNode,
|
||||||
buildStatus,
|
buildStatus,
|
||||||
validationStatus
|
validationStatus,
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{data.node?.beta && showNode && (
|
{data.node?.beta && showNode && (
|
||||||
|
|
@ -378,7 +406,7 @@ export default function GenericNode({
|
||||||
}
|
}
|
||||||
title={getFieldTitle(
|
title={getFieldTitle(
|
||||||
data.node?.template!,
|
data.node?.template!,
|
||||||
templateField
|
templateField,
|
||||||
)}
|
)}
|
||||||
info={data.node?.template[templateField].info}
|
info={data.node?.template[templateField].info}
|
||||||
name={templateField}
|
name={templateField}
|
||||||
|
|
@ -406,7 +434,7 @@ export default function GenericNode({
|
||||||
proxy={data.node?.template[templateField].proxy}
|
proxy={data.node?.template[templateField].proxy}
|
||||||
showNode={showNode}
|
showNode={showNode}
|
||||||
/>
|
/>
|
||||||
)
|
),
|
||||||
)}
|
)}
|
||||||
<ParameterComponent
|
<ParameterComponent
|
||||||
key={scapedJSONStringfy({
|
key={scapedJSONStringfy({
|
||||||
|
|
@ -437,6 +465,22 @@ export default function GenericNode({
|
||||||
</div>
|
</div>
|
||||||
{showNode && (
|
{showNode && (
|
||||||
<>
|
<>
|
||||||
|
<div className="flex flex-shrink-0 items-center gap-1">
|
||||||
|
{isOutdated && (
|
||||||
|
<ShadTooltip content={TOOLTIP_OUTDATED_NODE}>
|
||||||
|
<Button
|
||||||
|
onClick={handleUpdateCode}
|
||||||
|
variant="secondary"
|
||||||
|
className={"h-9 px-1.5"}
|
||||||
|
loading={loadingUpdate}
|
||||||
|
>
|
||||||
|
<IconComponent
|
||||||
|
name="AlertTriangle"
|
||||||
|
className="h-5 w-5 text-status-yellow"
|
||||||
|
/>
|
||||||
|
</Button>
|
||||||
|
</ShadTooltip>
|
||||||
|
)}
|
||||||
<ShadTooltip
|
<ShadTooltip
|
||||||
content={
|
content={
|
||||||
buildStatus === BuildStatus.BUILDING ? (
|
buildStatus === BuildStatus.BUILDING ? (
|
||||||
|
|
@ -485,6 +529,7 @@ export default function GenericNode({
|
||||||
</div>
|
</div>
|
||||||
</Button>
|
</Button>
|
||||||
</ShadTooltip>
|
</ShadTooltip>
|
||||||
|
</div>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -552,7 +597,7 @@ export default function GenericNode({
|
||||||
!data.node?.description) &&
|
!data.node?.description) &&
|
||||||
nameEditable
|
nameEditable
|
||||||
? "font-light italic"
|
? "font-light italic"
|
||||||
: ""
|
: "",
|
||||||
)}
|
)}
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
setInputDescription(true);
|
setInputDescription(true);
|
||||||
|
|
@ -614,13 +659,13 @@ export default function GenericNode({
|
||||||
}
|
}
|
||||||
title={getFieldTitle(
|
title={getFieldTitle(
|
||||||
data.node?.template!,
|
data.node?.template!,
|
||||||
templateField
|
templateField,
|
||||||
)}
|
)}
|
||||||
info={data.node?.template[templateField].info}
|
info={data.node?.template[templateField].info}
|
||||||
name={templateField}
|
name={templateField}
|
||||||
tooltipTitle={
|
tooltipTitle={
|
||||||
data.node?.template[templateField].input_types?.join(
|
data.node?.template[templateField].input_types?.join(
|
||||||
"\n"
|
"\n",
|
||||||
) ?? data.node?.template[templateField].type
|
) ?? data.node?.template[templateField].type
|
||||||
}
|
}
|
||||||
required={data.node!.template[templateField].required}
|
required={data.node!.template[templateField].required}
|
||||||
|
|
@ -647,7 +692,7 @@ export default function GenericNode({
|
||||||
<div
|
<div
|
||||||
className={classNames(
|
className={classNames(
|
||||||
Object.keys(data.node!.template).length < 1 ? "hidden" : "",
|
Object.keys(data.node!.template).length < 1 ? "hidden" : "",
|
||||||
"flex-max-width justify-center"
|
"flex-max-width justify-center",
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{" "}
|
{" "}
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,8 @@ const useCheckCodeValidity = (
|
||||||
const componentsToIgnore = ["Custom Component", "Prompt"];
|
const componentsToIgnore = ["Custom Component", "Prompt"];
|
||||||
if (
|
if (
|
||||||
currentCode !== thisNodesCode &&
|
currentCode !== thisNodesCode &&
|
||||||
!componentsToIgnore.includes(data.node!.display_name)
|
!componentsToIgnore.includes(data.node!.display_name) &&
|
||||||
|
!(data.node?.edited ?? false)
|
||||||
) {
|
) {
|
||||||
setIsOutdated(true);
|
setIsOutdated(true);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ const useUpdateNodeCode = (
|
||||||
node: newNodeClass,
|
node: newNodeClass,
|
||||||
description: newNodeClass.description ?? dataNode.description,
|
description: newNodeClass.description ?? dataNode.description,
|
||||||
display_name: newNodeClass.display_name ?? dataNode.display_name,
|
display_name: newNodeClass.display_name ?? dataNode.display_name,
|
||||||
|
edited: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
newNode.data.node.template[name].value = code;
|
newNode.data.node.template[name].value = code;
|
||||||
|
|
|
||||||
BIN
src/frontend/src/assets/profile-circle.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
|
|
@ -1,21 +0,0 @@
|
||||||
import { gradients } from "../../utils/styleUtils";
|
|
||||||
|
|
||||||
export default function GradientChooserComponent({ value, onChange }) {
|
|
||||||
return (
|
|
||||||
<div className="flex flex-wrap items-center justify-start gap-2">
|
|
||||||
{gradients.map((gradient, idx) => (
|
|
||||||
<div
|
|
||||||
onClick={() => {
|
|
||||||
onChange(gradient);
|
|
||||||
}}
|
|
||||||
className={
|
|
||||||
"duration-400 h-12 w-12 cursor-pointer rounded-full transition-all " +
|
|
||||||
gradient +
|
|
||||||
(value === gradient ? " shadow-lg ring-2 ring-primary" : "")
|
|
||||||
}
|
|
||||||
key={idx}
|
|
||||||
></div>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
@ -1,9 +1,12 @@
|
||||||
import { useContext } from "react";
|
import { useContext } from "react";
|
||||||
|
import profileCircle from "../../assets/profile-circle.png";
|
||||||
import { FaDiscord, FaGithub } from "react-icons/fa";
|
import { FaDiscord, FaGithub } from "react-icons/fa";
|
||||||
import { RiTwitterXFill } from "react-icons/ri";
|
import { RiTwitterXFill } from "react-icons/ri";
|
||||||
import { Link, useLocation, useNavigate, useParams } from "react-router-dom";
|
import { Link, useLocation, useNavigate, useParams } from "react-router-dom";
|
||||||
import AlertDropdown from "../../alerts/alertDropDown";
|
import AlertDropdown from "../../alerts/alertDropDown";
|
||||||
import {
|
import {
|
||||||
|
BACKEND_URL,
|
||||||
|
BASE_URL_API,
|
||||||
LOCATIONS_TO_RETURN,
|
LOCATIONS_TO_RETURN,
|
||||||
USER_PROJECTS_HEADER,
|
USER_PROJECTS_HEADER,
|
||||||
} from "../../constants/constants";
|
} from "../../constants/constants";
|
||||||
|
|
@ -192,34 +195,35 @@ export default function Header(): JSX.Element {
|
||||||
variant="none"
|
variant="none"
|
||||||
size="none"
|
size="none"
|
||||||
data-testid="user-profile-settings"
|
data-testid="user-profile-settings"
|
||||||
className={
|
>
|
||||||
"h-7 w-7 rounded-full focus-visible:outline-0 " +
|
<img
|
||||||
(userData?.profile_image ??
|
src={
|
||||||
(userData?.id
|
`${BACKEND_URL.slice(
|
||||||
? gradients[
|
0,
|
||||||
parseInt(userData?.id ?? "", 30) % gradients.length
|
BACKEND_URL.length - 1,
|
||||||
]
|
)}${BASE_URL_API}files/profile_pictures/${userData?.profile_image}` ??
|
||||||
: "bg-gray-500"))
|
profileCircle
|
||||||
}
|
}
|
||||||
|
className="h-7 w-7 focus-visible:outline-0 "
|
||||||
/>
|
/>
|
||||||
|
</Button>
|
||||||
</DropdownMenuTrigger>
|
</DropdownMenuTrigger>
|
||||||
<DropdownMenuContent>
|
<DropdownMenuContent>
|
||||||
{!autoLogin && (
|
{!autoLogin && (
|
||||||
<>
|
<>
|
||||||
<DropdownMenuLabel>
|
<DropdownMenuLabel>
|
||||||
<div className="flex items-center gap-3">
|
<div className="flex items-center gap-3">
|
||||||
<div
|
<img
|
||||||
className={
|
src={
|
||||||
"h-5 w-5 rounded-full focus-visible:outline-0 " +
|
`${BACKEND_URL.slice(
|
||||||
(userData?.profile_image ??
|
0,
|
||||||
(userData?.id
|
BACKEND_URL.length - 1,
|
||||||
? gradients[
|
)}${BASE_URL_API}files/profile_pictures/${userData?.profile_image}` ??
|
||||||
parseInt(userData?.id ?? "", 30) %
|
profileCircle
|
||||||
gradients.length
|
|
||||||
]
|
|
||||||
: "bg-gray-500"))
|
|
||||||
}
|
}
|
||||||
|
className="h-5 w-5 focus-visible:outline-0 "
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{userData?.username ?? "User"}
|
{userData?.username ?? "User"}
|
||||||
</div>
|
</div>
|
||||||
</DropdownMenuLabel>
|
</DropdownMenuLabel>
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ const SideBarFoldersButtonsComponent = ({
|
||||||
const [foldersNames, setFoldersNames] = useState({});
|
const [foldersNames, setFoldersNames] = useState({});
|
||||||
const takeSnapshot = useFlowsManagerStore((state) => state.takeSnapshot);
|
const takeSnapshot = useFlowsManagerStore((state) => state.takeSnapshot);
|
||||||
const [editFolders, setEditFolderName] = useState(
|
const [editFolders, setEditFolderName] = useState(
|
||||||
folders.map((obj) => ({ name: obj.name, edit: false }))
|
folders.map((obj) => ({ name: obj.name, edit: false })),
|
||||||
);
|
);
|
||||||
const uploadFolder = useFolderStore((state) => state.uploadFolder);
|
const uploadFolder = useFolderStore((state) => state.uploadFolder);
|
||||||
const currentFolder = pathname.split("/");
|
const currentFolder = pathname.split("/");
|
||||||
|
|
@ -58,7 +58,7 @@ const SideBarFoldersButtonsComponent = ({
|
||||||
|
|
||||||
const { dragOver, dragEnter, dragLeave, onDrop } = useFileDrop(
|
const { dragOver, dragEnter, dragLeave, onDrop } = useFileDrop(
|
||||||
folderId,
|
folderId,
|
||||||
handleFolderChange
|
handleFolderChange,
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleUploadFlowsToFolder = () => {
|
const handleUploadFlowsToFolder = () => {
|
||||||
|
|
@ -86,7 +86,7 @@ const SideBarFoldersButtonsComponent = ({
|
||||||
addFolder({ name: "New Folder", parent_id: null, description: "" }).then(
|
addFolder({ name: "New Folder", parent_id: null, description: "" }).then(
|
||||||
(res) => {
|
(res) => {
|
||||||
getFoldersApi(true);
|
getFoldersApi(true);
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -132,7 +132,7 @@ const SideBarFoldersButtonsComponent = ({
|
||||||
<>
|
<>
|
||||||
{folders.map((item, index) => {
|
{folders.map((item, index) => {
|
||||||
const editFolderName = editFolders?.filter(
|
const editFolderName = editFolders?.filter(
|
||||||
(folder) => folder.name === item.name
|
(folder) => folder.name === item.name,
|
||||||
)[0];
|
)[0];
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
|
|
@ -148,7 +148,7 @@ const SideBarFoldersButtonsComponent = ({
|
||||||
? "border border-border bg-muted hover:bg-muted"
|
? "border border-border bg-muted hover:bg-muted"
|
||||||
: "border hover:bg-transparent lg:border-transparent lg:hover:border-border",
|
: "border hover:bg-transparent lg:border-transparent lg:hover:border-border",
|
||||||
"group flex w-full shrink-0 cursor-pointer gap-2 opacity-100 lg:min-w-full",
|
"group flex w-full shrink-0 cursor-pointer gap-2 opacity-100 lg:min-w-full",
|
||||||
folderIdDragging === item.id! ? "bg-border" : ""
|
folderIdDragging === item.id! ? "bg-border" : "",
|
||||||
)}
|
)}
|
||||||
onClick={() => handleChangeFolder!(item.id!)}
|
onClick={() => handleChangeFolder!(item.id!)}
|
||||||
>
|
>
|
||||||
|
|
@ -218,7 +218,7 @@ const SideBarFoldersButtonsComponent = ({
|
||||||
folders.map((obj) => ({
|
folders.map((obj) => ({
|
||||||
name: obj.name,
|
name: obj.name,
|
||||||
edit: false,
|
edit: false,
|
||||||
}))
|
})),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (e.key === "Enter") {
|
if (e.key === "Enter") {
|
||||||
|
|
@ -251,10 +251,10 @@ const SideBarFoldersButtonsComponent = ({
|
||||||
};
|
};
|
||||||
const updatedFolder = await updateFolder(
|
const updatedFolder = await updateFolder(
|
||||||
body,
|
body,
|
||||||
item.id!
|
item.id!,
|
||||||
);
|
);
|
||||||
const updateFolders = folders.filter(
|
const updateFolders = folders.filter(
|
||||||
(f) => f.name !== item.name
|
(f) => f.name !== item.name,
|
||||||
);
|
);
|
||||||
setFolders([...updateFolders, updatedFolder]);
|
setFolders([...updateFolders, updatedFolder]);
|
||||||
setFoldersNames({});
|
setFoldersNames({});
|
||||||
|
|
@ -262,7 +262,7 @@ const SideBarFoldersButtonsComponent = ({
|
||||||
folders.map((obj) => ({
|
folders.map((obj) => ({
|
||||||
name: obj.name,
|
name: obj.name,
|
||||||
edit: false,
|
edit: false,
|
||||||
}))
|
})),
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
setFoldersNames((old) => ({
|
setFoldersNames((old) => ({
|
||||||
|
|
|
||||||
|
|
@ -63,8 +63,8 @@ export default function TableNodeCellRender({
|
||||||
...id,
|
...id,
|
||||||
proxy: templateData.proxy,
|
proxy: templateData.proxy,
|
||||||
}
|
}
|
||||||
: id
|
: id,
|
||||||
)
|
),
|
||||||
) ?? false;
|
) ?? false;
|
||||||
function getCellType() {
|
function getCellType() {
|
||||||
switch (templateData.type) {
|
switch (templateData.type) {
|
||||||
|
|
@ -135,7 +135,7 @@ export default function TableNodeCellRender({
|
||||||
<div
|
<div
|
||||||
className={classNames(
|
className={classNames(
|
||||||
"max-h-48 w-full overflow-auto custom-scroll",
|
"max-h-48 w-full overflow-auto custom-scroll",
|
||||||
templateValue?.length > 1 ? "my-3" : ""
|
templateValue?.length > 1 ? "my-3" : "",
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<KeypairListComponent
|
<KeypairListComponent
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,8 @@ export const INVALID_SELECTION_ERROR_ALERT = "Invalid selection";
|
||||||
export const EDIT_PASSWORD_ERROR_ALERT = "Error changing password";
|
export const EDIT_PASSWORD_ERROR_ALERT = "Error changing password";
|
||||||
export const EDIT_PASSWORD_ALERT_LIST = "Passwords do not match";
|
export const EDIT_PASSWORD_ALERT_LIST = "Passwords do not match";
|
||||||
export const SAVE_ERROR_ALERT = "Error saving changes";
|
export const SAVE_ERROR_ALERT = "Error saving changes";
|
||||||
|
export const PROFILE_PICTURES_GET_ERROR_ALERT =
|
||||||
|
"Error retrieving profile pictures";
|
||||||
export const SIGNUP_ERROR_ALERT = "Error signing up";
|
export const SIGNUP_ERROR_ALERT = "Error signing up";
|
||||||
export const APIKEY_ERROR_ALERT = "API Key Error";
|
export const APIKEY_ERROR_ALERT = "API Key Error";
|
||||||
export const NOAPI_ERROR_ALERT =
|
export const NOAPI_ERROR_ALERT =
|
||||||
|
|
|
||||||
|
|
@ -589,7 +589,7 @@ export const CONTROL_INPUT_STATE = {
|
||||||
export const CONTROL_PATCH_USER_STATE = {
|
export const CONTROL_PATCH_USER_STATE = {
|
||||||
password: "",
|
password: "",
|
||||||
cnfPassword: "",
|
cnfPassword: "",
|
||||||
gradient: "",
|
profilePicture: "",
|
||||||
apikey: "",
|
apikey: "",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -661,6 +661,9 @@ export const OUTPUT_TYPES = new Set([
|
||||||
export const CHAT_FIRST_INITIAL_TEXT =
|
export const CHAT_FIRST_INITIAL_TEXT =
|
||||||
"Start a conversation and click the agent's thoughts";
|
"Start a conversation and click the agent's thoughts";
|
||||||
|
|
||||||
|
export const TOOLTIP_OUTDATED_NODE =
|
||||||
|
"Your component is outdated. Click to update (data may be lost)";
|
||||||
|
|
||||||
export const CHAT_SECOND_INITIAL_TEXT = "to inspect the chaining process.";
|
export const CHAT_SECOND_INITIAL_TEXT = "to inspect the chaining process.";
|
||||||
|
|
||||||
export const ZERO_NOTIFICATIONS = "No new notifications";
|
export const ZERO_NOTIFICATIONS = "No new notifications";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import axios, { AxiosError, AxiosInstance } from "axios";
|
import axios, { Axios, AxiosError, AxiosInstance } from "axios";
|
||||||
import { useContext, useEffect } from "react";
|
import { useContext, useEffect } from "react";
|
||||||
import { Cookies } from "react-cookie";
|
import { Cookies } from "react-cookie";
|
||||||
import { renewAccessToken } from ".";
|
import { renewAccessToken } from ".";
|
||||||
|
|
@ -83,8 +83,10 @@ function ApiInterceptor() {
|
||||||
(config) => {
|
(config) => {
|
||||||
const checkRequest = checkDuplicateRequestAndStoreRequest(config);
|
const checkRequest = checkDuplicateRequestAndStoreRequest(config);
|
||||||
|
|
||||||
|
const controller = new AbortController();
|
||||||
|
|
||||||
if (!checkRequest) {
|
if (!checkRequest) {
|
||||||
return Promise.reject("Duplicate request.");
|
controller.abort("Duplicate Request");
|
||||||
}
|
}
|
||||||
|
|
||||||
const accessToken = cookies.get("access_token_lf");
|
const accessToken = cookies.get("access_token_lf");
|
||||||
|
|
@ -92,7 +94,10 @@ function ApiInterceptor() {
|
||||||
config.headers["Authorization"] = `Bearer ${accessToken}`;
|
config.headers["Authorization"] = `Bearer ${accessToken}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
return config;
|
return {
|
||||||
|
...config,
|
||||||
|
signal: controller.signal,
|
||||||
|
};
|
||||||
},
|
},
|
||||||
(error) => {
|
(error) => {
|
||||||
return Promise.reject(error);
|
return Promise.reject(error);
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ import {
|
||||||
APITemplateType,
|
APITemplateType,
|
||||||
Component,
|
Component,
|
||||||
LoginType,
|
LoginType,
|
||||||
|
ProfilePicturesTypeAPI,
|
||||||
Users,
|
Users,
|
||||||
VertexBuildTypeAPI,
|
VertexBuildTypeAPI,
|
||||||
VerticesOrderTypeAPI,
|
VerticesOrderTypeAPI,
|
||||||
|
|
@ -62,7 +63,7 @@ export async function sendAll(data: sendAllProps) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function postValidateCode(
|
export async function postValidateCode(
|
||||||
code: string
|
code: string,
|
||||||
): Promise<AxiosResponse<errorsTypeAPI>> {
|
): Promise<AxiosResponse<errorsTypeAPI>> {
|
||||||
return await api.post(`${BASE_URL_API}validate/code`, { code });
|
return await api.post(`${BASE_URL_API}validate/code`, { code });
|
||||||
}
|
}
|
||||||
|
|
@ -77,7 +78,7 @@ export async function postValidateCode(
|
||||||
export async function postValidatePrompt(
|
export async function postValidatePrompt(
|
||||||
name: string,
|
name: string,
|
||||||
template: string,
|
template: string,
|
||||||
frontend_node: APIClassType
|
frontend_node: APIClassType,
|
||||||
): Promise<AxiosResponse<PromptTypeAPI>> {
|
): Promise<AxiosResponse<PromptTypeAPI>> {
|
||||||
return api.post(`${BASE_URL_API}validate/prompt`, {
|
return api.post(`${BASE_URL_API}validate/prompt`, {
|
||||||
name,
|
name,
|
||||||
|
|
@ -150,7 +151,7 @@ export async function saveFlowToDatabase(newFlow: {
|
||||||
* @throws Will throw an error if the update fails.
|
* @throws Will throw an error if the update fails.
|
||||||
*/
|
*/
|
||||||
export async function updateFlowInDatabase(
|
export async function updateFlowInDatabase(
|
||||||
updatedFlow: FlowType
|
updatedFlow: FlowType,
|
||||||
): Promise<FlowType> {
|
): Promise<FlowType> {
|
||||||
try {
|
try {
|
||||||
const response = await api.patch(`${BASE_URL_API}flows/${updatedFlow.id}`, {
|
const response = await api.patch(`${BASE_URL_API}flows/${updatedFlow.id}`, {
|
||||||
|
|
@ -328,7 +329,7 @@ export async function getHealth() {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export async function getBuildStatus(
|
export async function getBuildStatus(
|
||||||
flowId: string
|
flowId: string,
|
||||||
): Promise<AxiosResponse<BuildStatusTypeAPI>> {
|
): Promise<AxiosResponse<BuildStatusTypeAPI>> {
|
||||||
return await api.get(`${BASE_URL_API}build/${flowId}/status`);
|
return await api.get(`${BASE_URL_API}build/${flowId}/status`);
|
||||||
}
|
}
|
||||||
|
|
@ -341,7 +342,7 @@ export async function getBuildStatus(
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export async function postBuildInit(
|
export async function postBuildInit(
|
||||||
flow: FlowType
|
flow: FlowType,
|
||||||
): Promise<AxiosResponse<InitTypeAPI>> {
|
): Promise<AxiosResponse<InitTypeAPI>> {
|
||||||
return await api.post(`${BASE_URL_API}build/init/${flow.id}`, flow);
|
return await api.post(`${BASE_URL_API}build/init/${flow.id}`, flow);
|
||||||
}
|
}
|
||||||
|
|
@ -357,16 +358,29 @@ export async function postBuildInit(
|
||||||
*/
|
*/
|
||||||
export async function uploadFile(
|
export async function uploadFile(
|
||||||
file: File,
|
file: File,
|
||||||
id: string
|
id: string,
|
||||||
): Promise<AxiosResponse<UploadFileTypeAPI>> {
|
): Promise<AxiosResponse<UploadFileTypeAPI>> {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append("file", file);
|
formData.append("file", file);
|
||||||
return await api.post(`${BASE_URL_API}files/upload/${id}`, formData);
|
return await api.post(`${BASE_URL_API}files/upload/${id}`, formData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export async function getProfilePictures(): Promise<ProfilePicturesTypeAPI | null> {
|
||||||
|
try {
|
||||||
|
const res = await api.get(`${BASE_URL_API}files/profile_pictures/list`);
|
||||||
|
|
||||||
|
if (res.status === 200) {
|
||||||
|
return res.data;
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
export async function postCustomComponent(
|
export async function postCustomComponent(
|
||||||
code: string,
|
code: string,
|
||||||
apiClass: APIClassType
|
apiClass: APIClassType,
|
||||||
): Promise<AxiosResponse<APIClassType>> {
|
): Promise<AxiosResponse<APIClassType>> {
|
||||||
// let template = apiClass.template;
|
// let template = apiClass.template;
|
||||||
return await api.post(`${BASE_URL_API}custom_component`, {
|
return await api.post(`${BASE_URL_API}custom_component`, {
|
||||||
|
|
@ -379,7 +393,7 @@ export async function postCustomComponentUpdate(
|
||||||
code: string,
|
code: string,
|
||||||
template: APITemplateType,
|
template: APITemplateType,
|
||||||
field: string,
|
field: string,
|
||||||
field_value: any
|
field_value: any,
|
||||||
): Promise<AxiosResponse<APIClassType>> {
|
): Promise<AxiosResponse<APIClassType>> {
|
||||||
return await api.post(`${BASE_URL_API}custom_component/update`, {
|
return await api.post(`${BASE_URL_API}custom_component/update`, {
|
||||||
code,
|
code,
|
||||||
|
|
@ -401,7 +415,7 @@ export async function onLogin(user: LoginType) {
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/x-www-form-urlencoded",
|
"Content-Type": "application/x-www-form-urlencoded",
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
if (response.status === 200) {
|
if (response.status === 200) {
|
||||||
|
|
@ -463,11 +477,11 @@ export async function addUser(user: UserInputType): Promise<Array<Users>> {
|
||||||
|
|
||||||
export async function getUsersPage(
|
export async function getUsersPage(
|
||||||
skip: number,
|
skip: number,
|
||||||
limit: number
|
limit: number,
|
||||||
): Promise<Array<Users>> {
|
): Promise<Array<Users>> {
|
||||||
try {
|
try {
|
||||||
const res = await api.get(
|
const res = await api.get(
|
||||||
`${BASE_URL_API}users/?skip=${skip}&limit=${limit}`
|
`${BASE_URL_API}users/?skip=${skip}&limit=${limit}`,
|
||||||
);
|
);
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
return res.data;
|
return res.data;
|
||||||
|
|
@ -504,7 +518,7 @@ export async function resetPassword(user_id: string, user: resetPasswordType) {
|
||||||
try {
|
try {
|
||||||
const res = await api.patch(
|
const res = await api.patch(
|
||||||
`${BASE_URL_API}users/${user_id}/reset-password`,
|
`${BASE_URL_API}users/${user_id}/reset-password`,
|
||||||
user
|
user,
|
||||||
);
|
);
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
return res.data;
|
return res.data;
|
||||||
|
|
@ -578,7 +592,7 @@ export async function saveFlowStore(
|
||||||
last_tested_version?: string;
|
last_tested_version?: string;
|
||||||
},
|
},
|
||||||
tags: string[],
|
tags: string[],
|
||||||
publicFlow = false
|
publicFlow = false,
|
||||||
): Promise<FlowType> {
|
): Promise<FlowType> {
|
||||||
try {
|
try {
|
||||||
const response = await api.post(`${BASE_URL_API}store/components/`, {
|
const response = await api.post(`${BASE_URL_API}store/components/`, {
|
||||||
|
|
@ -707,7 +721,7 @@ export async function postStoreComponents(component: Component) {
|
||||||
export async function getComponent(component_id: string) {
|
export async function getComponent(component_id: string) {
|
||||||
try {
|
try {
|
||||||
const res = await api.get(
|
const res = await api.get(
|
||||||
`${BASE_URL_API}store/components/${component_id}`
|
`${BASE_URL_API}store/components/${component_id}`,
|
||||||
);
|
);
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
return res.data;
|
return res.data;
|
||||||
|
|
@ -722,7 +736,7 @@ export async function searchComponent(
|
||||||
page?: number | null,
|
page?: number | null,
|
||||||
limit?: number | null,
|
limit?: number | null,
|
||||||
status?: string | null,
|
status?: string | null,
|
||||||
tags?: string[]
|
tags?: string[],
|
||||||
): Promise<StoreComponentResponse | undefined> {
|
): Promise<StoreComponentResponse | undefined> {
|
||||||
try {
|
try {
|
||||||
let url = `${BASE_URL_API}store/components/`;
|
let url = `${BASE_URL_API}store/components/`;
|
||||||
|
|
@ -834,7 +848,7 @@ export async function updateFlowStore(
|
||||||
},
|
},
|
||||||
tags: string[],
|
tags: string[],
|
||||||
publicFlow = false,
|
publicFlow = false,
|
||||||
id: string
|
id: string,
|
||||||
): Promise<FlowType> {
|
): Promise<FlowType> {
|
||||||
try {
|
try {
|
||||||
const response = await api.patch(`${BASE_URL_API}store/components/${id}`, {
|
const response = await api.patch(`${BASE_URL_API}store/components/${id}`, {
|
||||||
|
|
@ -918,7 +932,7 @@ export async function deleteGlobalVariable(id: string) {
|
||||||
export async function updateGlobalVariable(
|
export async function updateGlobalVariable(
|
||||||
name: string,
|
name: string,
|
||||||
value: string,
|
value: string,
|
||||||
id: string
|
id: string,
|
||||||
) {
|
) {
|
||||||
try {
|
try {
|
||||||
const response = api.patch(`${BASE_URL_API}variables/${id}`, {
|
const response = api.patch(`${BASE_URL_API}variables/${id}`, {
|
||||||
|
|
@ -937,7 +951,7 @@ export async function getVerticesOrder(
|
||||||
startNodeId?: string | null,
|
startNodeId?: string | null,
|
||||||
stopNodeId?: string | null,
|
stopNodeId?: string | null,
|
||||||
nodes?: Node[],
|
nodes?: Node[],
|
||||||
Edges?: Edge[]
|
Edges?: Edge[],
|
||||||
): Promise<AxiosResponse<VerticesOrderTypeAPI>> {
|
): Promise<AxiosResponse<VerticesOrderTypeAPI>> {
|
||||||
// nodeId is optional and is a query parameter
|
// nodeId is optional and is a query parameter
|
||||||
// if nodeId is not provided, the API will return all vertices
|
// if nodeId is not provided, the API will return all vertices
|
||||||
|
|
@ -957,7 +971,7 @@ export async function getVerticesOrder(
|
||||||
return await api.post(
|
return await api.post(
|
||||||
`${BASE_URL_API}build/${flowId}/vertices`,
|
`${BASE_URL_API}build/${flowId}/vertices`,
|
||||||
data,
|
data,
|
||||||
config
|
config,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -965,7 +979,7 @@ export async function postBuildVertex(
|
||||||
flowId: string,
|
flowId: string,
|
||||||
vertexId: string,
|
vertexId: string,
|
||||||
input_value: string,
|
input_value: string,
|
||||||
files?: string[]
|
files?: string[],
|
||||||
): Promise<AxiosResponse<VertexBuildTypeAPI>> {
|
): Promise<AxiosResponse<VertexBuildTypeAPI>> {
|
||||||
// input_value is optional and is a query parameter
|
// input_value is optional and is a query parameter
|
||||||
const data = { inputs: { input_value: input_value ?? "" } };
|
const data = { inputs: { input_value: input_value ?? "" } };
|
||||||
|
|
@ -974,7 +988,7 @@ export async function postBuildVertex(
|
||||||
}
|
}
|
||||||
return await api.post(
|
return await api.post(
|
||||||
`${BASE_URL_API}build/${flowId}/vertices/${vertexId}`,
|
`${BASE_URL_API}build/${flowId}/vertices/${vertexId}`,
|
||||||
data
|
data,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -998,7 +1012,7 @@ export async function getFlowPool({
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function deleteFlowPool(
|
export async function deleteFlowPool(
|
||||||
flowId: string
|
flowId: string,
|
||||||
): Promise<AxiosResponse<any>> {
|
): Promise<AxiosResponse<any>> {
|
||||||
const config = {};
|
const config = {};
|
||||||
config["params"] = { flow_id: flowId };
|
config["params"] = { flow_id: flowId };
|
||||||
|
|
@ -1012,7 +1026,7 @@ export async function deleteFlowPool(
|
||||||
* @returns A promise that resolves to an array of AxiosResponse objects representing the delete responses.
|
* @returns A promise that resolves to an array of AxiosResponse objects representing the delete responses.
|
||||||
*/
|
*/
|
||||||
export async function multipleDeleteFlowsComponents(
|
export async function multipleDeleteFlowsComponents(
|
||||||
flowIds: string[]
|
flowIds: string[],
|
||||||
): Promise<AxiosResponse<any>[]> {
|
): Promise<AxiosResponse<any>[]> {
|
||||||
const batches: string[][] = [];
|
const batches: string[][] = [];
|
||||||
|
|
||||||
|
|
@ -1035,7 +1049,7 @@ export async function multipleDeleteFlowsComponents(
|
||||||
|
|
||||||
// Execute all delete requests
|
// Execute all delete requests
|
||||||
const responses: Promise<AxiosResponse<any>>[] = batches.map((batch) =>
|
const responses: Promise<AxiosResponse<any>>[] = batches.map((batch) =>
|
||||||
deleteBatch(batch)
|
deleteBatch(batch),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Return the responses after all requests are completed
|
// Return the responses after all requests are completed
|
||||||
|
|
@ -1045,7 +1059,7 @@ export async function multipleDeleteFlowsComponents(
|
||||||
export async function getTransactionTable(
|
export async function getTransactionTable(
|
||||||
id: string,
|
id: string,
|
||||||
mode: "intersection" | "union",
|
mode: "intersection" | "union",
|
||||||
params = {}
|
params = {},
|
||||||
): Promise<{ rows: Array<object>; columns: Array<ColDef | ColGroupDef> }> {
|
): Promise<{ rows: Array<object>; columns: Array<ColDef | ColGroupDef> }> {
|
||||||
const config = {};
|
const config = {};
|
||||||
config["params"] = { flow_id: id };
|
config["params"] = { flow_id: id };
|
||||||
|
|
@ -1061,7 +1075,7 @@ export async function getMessagesTable(
|
||||||
mode: "intersection" | "union",
|
mode: "intersection" | "union",
|
||||||
id?: string,
|
id?: string,
|
||||||
excludedFields?: string[],
|
excludedFields?: string[],
|
||||||
params = {}
|
params = {},
|
||||||
): Promise<{ rows: Array<Message>; columns: Array<ColDef | ColGroupDef> }> {
|
): Promise<{ rows: Array<Message>; columns: Array<ColDef | ColGroupDef> }> {
|
||||||
const config = {};
|
const config = {};
|
||||||
if (id) {
|
if (id) {
|
||||||
|
|
|
||||||