feat: adds file management feature under feature flag, adds file dialog, adds files page (#6134)
* Create file management feature flag * Added file manager modal * Open file manager modal on clicking button * Added file dragger * Changed drag files component to be like the design * Optimize code * Implemented Import Files component * Implemented Recent Files component * Added Import Files and Recent Files into File Manager modal and added necessary icons * Added file rendering to be used on component * Added rendering of files selected on component * Added icons for Dropbox, GoogleDrive and Onedrive * Added dropdown menu for selecting import source * Added button to navigate to My Files * Added Files page, with Import button and search * Added files table * Updated uv and package lock * Added tooltip for file types * Added cursor pointer to file dragger * Added file options dropdown * Added files context menu to files page * Changed side of dropdown * Implemented search on modal * Added Inverted AWS icon * Added Import Button as morphed button * Modularized Morphing Menu * Updated Files Renderer height * Added File endpoint and types * Added Download File mutation * Added Get Files query * Added Rename File mutation * Added Upload File mutation * Added Use Upload File hook * Added drop of files on dragFilesComponent * Changed upload and rename to refetch get * Added delete endpoint * Changed get files to return correctly * Make FilesRendererComponent render with correct file type * Get files from correct endpoint * Exported sort by date * Added file_path to input file component * Added file_path to File Component Type * Implement showing correct files in FIle component and removing and adding selected files * Removed open * Changed selected files to handle ID * Handled sorting of recent results * Added sort By Boolean aux function * Updated to use path for selected files, and to not update the selected values when Files change * Change delete to handle id on params * Change upload file to return files IDs * Added duplicate file * Added void to download files without params * Select uploaded files * Added onUpload to select uploaded files * Added context menu options * Changed to handle selected files with path * Changed recentFiles to handle selected files with path * Changed FilesContextMenu params * Turned updatedAt optional * Added files to the Files Page * Changed file icons * used size as number and get type from path * Added correct CardsWrapComponent to home page * Fixed flows and components drop in home and empty pages * Fixed files drop in files management * Implemented types validation when uploading via modal * Fixed types for files page(allow all) * Filter files on modal by file types * Implemented multiple files handling when list parameter is true on FileInput * Hidden unused import feature * Added value correction if component values are incongruent * Fixed size validator * Add new size validator to use-upload-file * Changed icon for rename * removed replace function * Implemented renaming file * Added v2 api support * Added v2 api on file_management * Changed duplicate and download to include file type * Implemented renaming on clicking rename option on files page * Implemented rename on modal * Implemented empty state for search and no files * Changed text of empty state * Added variants to morphing menu * Fixed design of import from button and file search * Implemented modal height changes to keep initial height * Replace rename icon * Removed duplicate from modal * Added min height * Fixed height * Delete unused state * Fixed size of import from button * Added successful upload toast * Implement plus button when files are selected * implemented progress on uploads * Added error handling to uploaded file * Added delete confirmation * Added maxFIleSizeUpload to the dialog * Implement file upload retry * Readded import from to files * Added empty state to file browser * Added list on base file * [autofix.ci] apply automated fixes * Try to fix crash * Add check on files page * Added DragWrapComponent with dragging area and opacity * Added DragWrapComponent to files page * [autofix.ci] apply automated fixes * Added test ids for making tests for files page * Added example files for tests * Added boolean on await bootstrap to not open modal * Added files page tests * Added the extension on the file names * Added datatestid and made context menu close on delete * Added search with types * Add type to filetype * Added datatestid * Changed formatFileSize to show B instead of bytes * Updated files page test to use random names * Changed file upload test to test file management functionality * Modularized generate filename * Fixed files page test * Added ignore to pyproject * Dont retry and dont clear * Enable file management feature flag * Remove import from button * Refetch files on open of dialog * Added upload failed state to my files * Made not upload extensionless files * Add toast on delete file * removed standalone upload button * Increased padding * Updated row hover color * Update padding of component * Fixed dash lines * Fixed api routes on vite config * added api v2 endpoints to docker compose * Adds router v2 and v1 to parent router * Adds trailing slash to file management endpoint * Fixed dash array * Readded px-5 * Refactor dispatch methods and cleanup code for improved readability in middleware and app setup * [autofix.ci] apply automated fixes * Feat: add a support for OpenSearch and AstraDB components to yield the langchain vector_store connection object (#6998) * Added decorator, decorator test, and modified supported vector stores * Renamed module file name to reflect that this is for generic use, not use for graph rag * Updated docsstring * Improved documentation and modification to UT to support graph rag * Remove extra file from PR * rollback vector store template * [autofix.ci] apply automated fixes --------- Co-authored-by: Nadir J <31660040+NadirJ@users.noreply.github.com> Co-authored-by: cristhianzl <cristhian.lousa@gmail.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * chore: Bump frontend package version and enhance test reliability (#7049) * chore: bump frontend package version from 0.1.2 to 1.2.0 in package-lock.json * test: enhance error message wait condition in generalBugs-shard-6.spec.ts Updated the test to wait for the error message to appear with a minimum length of 20 characters, improving reliability in detecting error states. This change replaces the previous fixed timeout with a dynamic check, enhancing the robustness of the test. * fix: Disable retries in usePostValidateComponentCode mutation (#7044) ♻️ (use-post-validate-component-code.ts): refactor usePostValidateComponentCode function to include retry and retryDelay options for better control over mutation behavior Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> * feat: Add updateHiddenOutputs helper function to manage output visibility (#6932) ✨ (update-hidden-outputs.ts): add a new helper function to update hidden outputs in the frontend CustomNodes module ♻️ (use-update-all-nodes.ts): refactor useUpdateAllNodes hook to update hidden outputs for all nodes in the frontend CustomNodes module ♻️ (use-update-node-code.ts): refactor useUpdateNodeCode hook to update hidden outputs for a specific node's code in the frontend CustomNodes module ♻️ (index.ts): refactor types in the flow module to include OutputFieldType for better type checking and consistency * docs: fix syntax errors at build (#7047) * docs-fix-linking-errors * docs-fix-codehike-errors * add-mit-license-field-to-package-json * add-tailwind-config-file --------- Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> * chore: update test durations (#6975) Co-authored-by: github-merge-queue <118344674+github-merge-queue@users.noreply.github.com> * docs: revised README (#7052) * revised README * fixed links * Update README.md Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com> * Update README.md Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com> * reverting --------- Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com> * test: Parameterize DeepSeek model component test correctly (#7019) test: Parameterize DeepSeek model component test with temperature and max tokens * fix: docker test trigger for poetry is wrong now is uv (#6743) also delete useless actions yml for now Signed-off-by: yihong0618 <zouzou0208@gmail.com> Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> * docs: Pull request draft workflow (#7046) Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> * feat: Sync flows from FS to DB if flow has fs_path (#7043) * feat: Sync flows from FS to DB if flow has fs_path * Changes following review * Simplify flow_mtimes handling * Move sync_flows_from_fs to setup.py --------- Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> * ci: fix false positive on ci sucess status (#6868) ci: fix ci EXIT_CODE * docs: api build and run examples update (#6904) * run-endpoint-parameters * docs: Update build flow API documentation with detailed examples and parameters * table-cleanup * cleanup * Apply suggestions from code review Co-authored-by: KimberlyFields <46325568+KimberlyFields@users.noreply.github.com> * Apply suggestions from code review * comments-from-code-review * Update docs/docs/API-Reference/api-reference-api-examples.md Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> --------- Co-authored-by: KimberlyFields <46325568+KimberlyFields@users.noreply.github.com> Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> * build(deps): bump @babel/runtime-corejs3 from 7.26.9 to 7.26.10 in /docs (#7051) Bumps [@babel/runtime-corejs3](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime-corejs3) from 7.26.9 to 7.26.10. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.26.10/packages/babel-runtime-corejs3) --- updated-dependencies: - dependency-name: "@babel/runtime-corejs3" dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * feat: add a unified language model component. (#6994) * add a unified language model component with a few providers * [autofix.ci] apply automated fixes * fix errors and add tests * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Edwin Jose <edwin.jose@datastax.com> * fix: Rename AgentQL components and add prompt parameter (#6834) * renamed components * add prompt parameter * [autofix.ci] apply automated fixes * prevent both query and prompt * ruff checks * [autofix.ci] apply automated fixes * amend conditional check * change error message * update templates * [autofix.ci] apply automated fixes * fix tags * fix tags in news aggregator --------- Co-authored-by: huwenjie912 <huwenjie912@gmail.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Edwin Jose <edwin.jose@datastax.com> * ref: Refactor tracing service (#7011) * Refactor tracing service * Remove start, flush and stop * fix: pass props to SvgAnthropicBox component (#7057) * fix: pass props to SvgAnthropicBox component * fix: pass props to SvgAnthropicBox component in light mode --------- Co-authored-by: Edwin Jose <edwin.jose@datastax.com> * fix: check if component is in tool mode as well to display Tool Mode switch (#7042) feat: Enhance checkHasToolMode function to include tool mode detection Updated the checkHasToolMode function to account for an additional condition where the template is considered to be in tool mode if it contains exactly three fields: _type, code, and tools_metadata. This improves the function's ability to accurately determine the tool mode status of a template. * Fix: Text split issues related to separator (#6993) * fixes text split issues related to separator * [autofix.ci] apply automated fixes * [autofix.ci] apply automated fixes (attempt 2/3) * format error fix * Update Vector Store RAG.json * [autofix.ci] apply automated fixes * 📝 (freeze.spec.ts): update test description to match the actual element being tested for better clarity and maintainability * ✅ (stop-building.spec.ts): update test description to improve clarity and maintainability ✅ (stop-button-playground.spec.ts): add wait time before filling search input to ensure proper loading and interaction with the element --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Edwin Jose <edwin.jose@datastax.com> Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> Co-authored-by: cristhianzl <cristhian.lousa@gmail.com> Co-authored-by: Ítalo Johnny <italojohnnydosanjos@gmail.com> * docs: mcp integration (#6986) * docs: Add MCP (Model Context Protocol) integration documentation * docs: Update Astra DB MCP integration documentation * docs: Update Astra DB MCP integration documentation with Cursor connection section * docs: Update MCP integration guide with Datastax Astra DB connection details and prerequisites * Apply suggestions from code review Co-authored-by: KimberlyFields <46325568+KimberlyFields@users.noreply.github.com> * docs-peer-reviews * remove-cursor-integration * code-review * Apply suggestions from code review Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com> * docs: update MCP integration guide for clarity and consistency --------- Co-authored-by: KimberlyFields <46325568+KimberlyFields@users.noreply.github.com> Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com> * feat: add regex pattern extractor component (#6015) * feat: add regex pattern extractor component * [autofix.ci] apply automated fixes * fix: consistent schema and cleaner code style * fix: type annotation in regex.py * [autofix.ci] apply automated fixes * Fix: regex component unit tests to match implementation behavior --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Ítalo Johnny <italojohnnydosanjos@gmail.com> * docs: Add workflow to automate updates to docs/openapi.json (#7072) Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com> * docs: test and update google oauth integration (#6949) * update-template * update-integration-doc * document-id * Apply suggestions from code review Co-authored-by: brian-f <brian.fisher@datastax.com> --------- Co-authored-by: brian-f <brian.fisher@datastax.com> * feat: add pokedex agent template (#6885) * add-pokedex-agent-json * update with the latest agent component * Update Pokédex Agent.json --------- Co-authored-by: Edwin Jose <edwin.jose@datastax.com> * feat: apify starter template (#6784) * add social media agent apify template * example default values, update starter template * revert package-lock.json * format * note-cleanup * [autofix.ci] apply automated fixes * updates to the components * update the agent component --------- Co-authored-by: Edwin Jose <edwin.jose@datastax.com> Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * feat: Needle Search Tool With Template (#6648) * feat: Needle Search Tool With Templte * lint * lint * lint * lint * refactor: Use Langflow Agent instead of CrewAI Agent * techdebt: adjust Needle component to use tool mode and remove tool component * lint * lint * Update Invoice Summarizer.json * Update Invoice Summarizer.json * update to the component * refactor: Use Needle icon svg * make format * component updates * update with latest agent component * updated a missing connection when updating the agent component * update template --------- Co-authored-by: Edwin Jose <edwin.jose@datastax.com> * feat: New parser component with multiple input types and stringify add on (#6652) * update to parser * error handling * solve lint error and added tests * [autofix.ci] apply automated fixes * [autofix.ci] apply automated fixes * Update parser.py * fix format errors * [autofix.ci] apply automated fixes * refactor: Remove hardcoded name attribute from ParserComponent * Update src/backend/base/langflow/components/processing/parser.py Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> * error fix * [autofix.ci] apply automated fixes * feat: mark ParserComponent as beta Added a beta flag to the ParserComponent to indicate its experimental status. --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> Co-authored-by: Ítalo Johnny <italojohnnydosanjos@gmail.com> Co-authored-by: Rodrigo <rodrigosilvanader@gmail.com> * [autofix.ci] apply automated fixes * format * remove console log Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * add space in docker compose Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * [autofix.ci] apply automated fixes * Update package lock * Removed unused file * Fixed naming on handleChangeFiles * Update src/frontend/src/pages/MainPage/pages/filesPage/index.tsx Co-authored-by: Mike Fortman <michael.fortman@datastax.com> * Used format file size * updated file browser to My Files * Updated cursor * Added error on selecting no files * Updated base FileInput name to Files * Added truncate and tooltip to files * [autofix.ci] apply automated fixes * [autofix.ci] apply automated fixes (attempt 2/3) * merge fix * Update src/frontend/src/components/core/parameterRenderComponent/components/inputFileComponent/index.tsx * Update src/frontend/src/modals/fileManagerModal/components/filesContextMenuComponent/index.tsx * [autofix.ci] apply automated fixes * [autofix.ci] apply automated fixes (attempt 2/3) * [autofix.ci] apply automated fixes (attempt 3/3) * Fixed files not maintaining state * Update info position * adjusted getCustomParameterTitle * removed console.log * updated utils.py * Added upload file util * Added check on upload-file to use old one if unavailable * Use new upload file function in Document QA * uploaded tests to use new UploadFile util * updated general bugs to use new uploadFile * updated upload-file * Update file mixin to have temp file * Update file component to not enable file management if temp file is true * Put temp file as true for chat input * Update starter projects * Updated starter templates * added tempFile condition on useEffect * Fixed invalid size alert * Fixed limit file test * Fixed backend test --------- Signed-off-by: yihong0618 <zouzou0208@gmail.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> Co-authored-by: Pedro Pacheco <3083335+pedrocassalpacheco@users.noreply.github.com> Co-authored-by: Nadir J <31660040+NadirJ@users.noreply.github.com> Co-authored-by: cristhianzl <cristhian.lousa@gmail.com> Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-merge-queue <118344674+github-merge-queue@users.noreply.github.com> Co-authored-by: Carter Rabasa <carter.rabasa@gmail.com> Co-authored-by: yihong <zouzou0208@gmail.com> Co-authored-by: Ronnie Miller <ronnie.miller@datastax.com> Co-authored-by: Christophe Bornet <cbornet@hotmail.com> Co-authored-by: Ítalo Johnny <italojohnnydosanjos@gmail.com> Co-authored-by: KimberlyFields <46325568+KimberlyFields@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Rodrigo Nader <rodrigosilvanader@gmail.com> Co-authored-by: Edwin Jose <edwin.jose@datastax.com> Co-authored-by: wjwjtf <wenjie@tinyfish.io> Co-authored-by: huwenjie912 <huwenjie912@gmail.com> Co-authored-by: Eddie Ho <62191480+noodleslove@users.noreply.github.com> Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com> Co-authored-by: Raphael Valdetaro <79842132+raphaelchristi@users.noreply.github.com> Co-authored-by: brian-f <brian.fisher@datastax.com> Co-authored-by: Jakub Kopecký <me@kopecky.io> Co-authored-by: Jan Heimes <45521680+JANHMS@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Mike Fortman <michael.fortman@datastax.com>
This commit is contained in:
parent
5c6ebecdb5
commit
093cc42f38
115 changed files with 5454 additions and 7051 deletions
|
|
@ -1,5 +1,5 @@
|
|||
from langflow.api.health_check_router import health_check_router
|
||||
from langflow.api.log_router import log_router
|
||||
from langflow.api.router import router, router_v2
|
||||
from langflow.api.router import router
|
||||
|
||||
__all__ = ["health_check_router", "log_router", "router", "router_v2"]
|
||||
__all__ = ["health_check_router", "log_router", "router"]
|
||||
|
|
|
|||
|
|
@ -19,25 +19,32 @@ from langflow.api.v1 import (
|
|||
from langflow.api.v2 import files_router as files_router_v2
|
||||
|
||||
router = APIRouter(
|
||||
prefix="/api/v1",
|
||||
prefix="/api",
|
||||
)
|
||||
|
||||
router_v1 = APIRouter(
|
||||
prefix="/v1",
|
||||
)
|
||||
|
||||
router_v2 = APIRouter(
|
||||
prefix="/api/v2",
|
||||
prefix="/v2",
|
||||
)
|
||||
|
||||
router.include_router(chat_router)
|
||||
router.include_router(endpoints_router)
|
||||
router.include_router(validate_router)
|
||||
router.include_router(store_router)
|
||||
router.include_router(flows_router)
|
||||
router.include_router(users_router)
|
||||
router.include_router(api_key_router)
|
||||
router.include_router(login_router)
|
||||
router.include_router(variables_router)
|
||||
router.include_router(files_router)
|
||||
router.include_router(monitor_router)
|
||||
router.include_router(folders_router)
|
||||
router.include_router(starter_projects_router)
|
||||
router_v1.include_router(chat_router)
|
||||
router_v1.include_router(endpoints_router)
|
||||
router_v1.include_router(validate_router)
|
||||
router_v1.include_router(store_router)
|
||||
router_v1.include_router(flows_router)
|
||||
router_v1.include_router(users_router)
|
||||
router_v1.include_router(api_key_router)
|
||||
router_v1.include_router(login_router)
|
||||
router_v1.include_router(variables_router)
|
||||
router_v1.include_router(files_router)
|
||||
router_v1.include_router(monitor_router)
|
||||
router_v1.include_router(folders_router)
|
||||
router_v1.include_router(starter_projects_router)
|
||||
|
||||
router_v2.include_router(files_router_v2)
|
||||
|
||||
router.include_router(router_v1)
|
||||
router.include_router(router_v2)
|
||||
|
|
|
|||
|
|
@ -117,11 +117,12 @@ class BaseFileComponent(Component, ABC):
|
|||
_base_inputs = [
|
||||
FileInput(
|
||||
name="path",
|
||||
display_name="Path",
|
||||
display_name="Files",
|
||||
fileTypes=[], # Dynamically set in __init__
|
||||
info="", # Dynamically set in __init__
|
||||
required=False,
|
||||
value="",
|
||||
list=True,
|
||||
value=[],
|
||||
),
|
||||
HandleInput(
|
||||
name="file_path",
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ class ChatInput(ChatComponent):
|
|||
info="Files to be sent with the message.",
|
||||
advanced=True,
|
||||
is_list=True,
|
||||
temp_file=True,
|
||||
),
|
||||
MessageTextInput(
|
||||
name="background_color",
|
||||
|
|
|
|||
|
|
@ -8,16 +8,12 @@
|
|||
"dataType": "Prompt",
|
||||
"id": "Prompt-f1f2v",
|
||||
"name": "prompt",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "system_message",
|
||||
"id": "OpenAIModel-lL9HA",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -35,16 +31,12 @@
|
|||
"dataType": "ChatInput",
|
||||
"id": "ChatInput-GyBUF",
|
||||
"name": "message",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "OpenAIModel-lL9HA",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -62,16 +54,12 @@
|
|||
"dataType": "OpenAIModel",
|
||||
"id": "OpenAIModel-lL9HA",
|
||||
"name": "text_output",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "OpenAIModel-JieGw",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -89,16 +77,12 @@
|
|||
"dataType": "Prompt",
|
||||
"id": "Prompt-4IOgm",
|
||||
"name": "prompt",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "system_message",
|
||||
"id": "OpenAIModel-JieGw",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -116,16 +100,12 @@
|
|||
"dataType": "OpenAIModel",
|
||||
"id": "OpenAIModel-JieGw",
|
||||
"name": "text_output",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "OpenAIModel-dXMRv",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -143,16 +123,12 @@
|
|||
"dataType": "Prompt",
|
||||
"id": "Prompt-FRjO8",
|
||||
"name": "prompt",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "system_message",
|
||||
"id": "OpenAIModel-dXMRv",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -170,18 +146,12 @@
|
|||
"dataType": "OpenAIModel",
|
||||
"id": "OpenAIModel-dXMRv",
|
||||
"name": "text_output",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "ChatOutput-KXQMh",
|
||||
"inputTypes": [
|
||||
"Data",
|
||||
"DataFrame",
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Data", "DataFrame", "Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -200,9 +170,7 @@
|
|||
"display_name": "Prompt",
|
||||
"id": "Prompt-4IOgm",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {
|
||||
|
|
@ -212,9 +180,7 @@
|
|||
"display_name": "Prompt",
|
||||
"documentation": "",
|
||||
"edited": false,
|
||||
"field_order": [
|
||||
"template"
|
||||
],
|
||||
"field_order": ["template"],
|
||||
"frozen": false,
|
||||
"icon": "prompts",
|
||||
"legacy": false,
|
||||
|
|
@ -230,9 +196,7 @@
|
|||
"name": "prompt",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -281,9 +245,7 @@
|
|||
"display_name": "Tool Placeholder",
|
||||
"dynamic": false,
|
||||
"info": "A placeholder input for tool mode.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "tool_placeholder",
|
||||
|
|
@ -325,9 +287,7 @@
|
|||
"data": {
|
||||
"id": "ChatInput-GyBUF",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"category": "inputs",
|
||||
"conditional_paths": [],
|
||||
|
|
@ -363,9 +323,7 @@
|
|||
"name": "message",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -378,9 +336,7 @@
|
|||
"display_name": "Background Color",
|
||||
"dynamic": false,
|
||||
"info": "The background color of the icon.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "background_color",
|
||||
|
|
@ -399,9 +355,7 @@
|
|||
"display_name": "Icon",
|
||||
"dynamic": false,
|
||||
"info": "The icon of the message.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "chat_icon",
|
||||
|
|
@ -430,7 +384,7 @@
|
|||
"show": true,
|
||||
"title_case": false,
|
||||
"type": "code",
|
||||
"value": "from langflow.base.data.utils import IMG_FILE_TYPES, TEXT_FILE_TYPES\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.inputs import BoolInput\nfrom langflow.io import (\n DropdownInput,\n FileInput,\n MessageTextInput,\n MultilineInput,\n Output,\n)\nfrom langflow.schema.message import Message\nfrom langflow.utils.constants import (\n MESSAGE_SENDER_AI,\n MESSAGE_SENDER_NAME_USER,\n MESSAGE_SENDER_USER,\n)\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"MessagesSquare\"\n name = \"ChatInput\"\n minimized = True\n\n inputs = [\n MultilineInput(\n name=\"input_value\",\n display_name=\"Text\",\n value=\"\",\n info=\"Message to be passed as input.\",\n input_types=[],\n ),\n BoolInput(\n name=\"should_store_message\",\n display_name=\"Store Messages\",\n info=\"Store the message in the history.\",\n value=True,\n advanced=True,\n ),\n DropdownInput(\n name=\"sender\",\n display_name=\"Sender Type\",\n options=[MESSAGE_SENDER_AI, MESSAGE_SENDER_USER],\n value=MESSAGE_SENDER_USER,\n info=\"Type of sender.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"sender_name\",\n display_name=\"Sender Name\",\n info=\"Name of the sender.\",\n value=MESSAGE_SENDER_NAME_USER,\n advanced=True,\n ),\n MessageTextInput(\n name=\"session_id\",\n display_name=\"Session ID\",\n info=\"The session ID of the chat. If empty, the current session ID parameter will be used.\",\n advanced=True,\n ),\n FileInput(\n name=\"files\",\n display_name=\"Files\",\n file_types=TEXT_FILE_TYPES + IMG_FILE_TYPES,\n info=\"Files to be sent with the message.\",\n advanced=True,\n is_list=True,\n ),\n MessageTextInput(\n name=\"background_color\",\n display_name=\"Background Color\",\n info=\"The background color of the icon.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"chat_icon\",\n display_name=\"Icon\",\n info=\"The icon of the message.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"text_color\",\n display_name=\"Text Color\",\n info=\"The text color of the name\",\n advanced=True,\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"message_response\"),\n ]\n\n async def message_response(self) -> Message:\n background_color = self.background_color\n text_color = self.text_color\n icon = self.chat_icon\n\n message = await Message.create(\n text=self.input_value,\n sender=self.sender,\n sender_name=self.sender_name,\n session_id=self.session_id,\n files=self.files,\n properties={\n \"background_color\": background_color,\n \"text_color\": text_color,\n \"icon\": icon,\n },\n )\n if self.session_id and isinstance(message, Message) and self.should_store_message:\n stored_message = await self.send_message(\n message,\n )\n self.message.value = stored_message\n message = stored_message\n\n self.status = message\n return message\n"
|
||||
"value": "from langflow.base.data.utils import IMG_FILE_TYPES, TEXT_FILE_TYPES\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.inputs import BoolInput\nfrom langflow.io import (\n DropdownInput,\n FileInput,\n MessageTextInput,\n MultilineInput,\n Output,\n)\nfrom langflow.schema.message import Message\nfrom langflow.utils.constants import (\n MESSAGE_SENDER_AI,\n MESSAGE_SENDER_NAME_USER,\n MESSAGE_SENDER_USER,\n)\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"MessagesSquare\"\n name = \"ChatInput\"\n minimized = True\n\n inputs = [\n MultilineInput(\n name=\"input_value\",\n display_name=\"Text\",\n value=\"\",\n info=\"Message to be passed as input.\",\n input_types=[],\n ),\n BoolInput(\n name=\"should_store_message\",\n display_name=\"Store Messages\",\n info=\"Store the message in the history.\",\n value=True,\n advanced=True,\n ),\n DropdownInput(\n name=\"sender\",\n display_name=\"Sender Type\",\n options=[MESSAGE_SENDER_AI, MESSAGE_SENDER_USER],\n value=MESSAGE_SENDER_USER,\n info=\"Type of sender.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"sender_name\",\n display_name=\"Sender Name\",\n info=\"Name of the sender.\",\n value=MESSAGE_SENDER_NAME_USER,\n advanced=True,\n ),\n MessageTextInput(\n name=\"session_id\",\n display_name=\"Session ID\",\n info=\"The session ID of the chat. If empty, the current session ID parameter will be used.\",\n advanced=True,\n ),\n FileInput(\n name=\"files\",\n display_name=\"Files\",\n file_types=TEXT_FILE_TYPES + IMG_FILE_TYPES,\n info=\"Files to be sent with the message.\",\n advanced=True,\n is_list=True,\n temp_file=True,\n ),\n MessageTextInput(\n name=\"background_color\",\n display_name=\"Background Color\",\n info=\"The background color of the icon.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"chat_icon\",\n display_name=\"Icon\",\n info=\"The icon of the message.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"text_color\",\n display_name=\"Text Color\",\n info=\"The text color of the name\",\n advanced=True,\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"message_response\"),\n ]\n\n async def message_response(self) -> Message:\n background_color = self.background_color\n text_color = self.text_color\n icon = self.chat_icon\n\n message = await Message.create(\n text=self.input_value,\n sender=self.sender,\n sender_name=self.sender_name,\n session_id=self.session_id,\n files=self.files,\n properties={\n \"background_color\": background_color,\n \"text_color\": text_color,\n \"icon\": icon,\n },\n )\n if self.session_id and isinstance(message, Message) and self.should_store_message:\n stored_message = await self.send_message(\n message,\n )\n self.message.value = stored_message\n message = stored_message\n\n self.status = message\n return message\n"
|
||||
},
|
||||
"files": {
|
||||
"_input_type": "FileInput",
|
||||
|
|
@ -469,6 +423,7 @@
|
|||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
"temp_file": true,
|
||||
"title_case": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "file",
|
||||
|
|
@ -502,10 +457,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Type of sender.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User"
|
||||
],
|
||||
"options": ["Machine", "User"],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
|
|
@ -520,9 +472,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Name of the sender.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "sender_name",
|
||||
|
|
@ -541,9 +491,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "session_id",
|
||||
|
|
@ -578,9 +526,7 @@
|
|||
"display_name": "Text Color",
|
||||
"dynamic": false,
|
||||
"info": "The text color of the name",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "text_color",
|
||||
|
|
@ -622,9 +568,7 @@
|
|||
"display_name": "Chat Output",
|
||||
"id": "ChatOutput-KXQMh",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -658,9 +602,7 @@
|
|||
"name": "message",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -673,9 +615,7 @@
|
|||
"display_name": "Background Color",
|
||||
"dynamic": false,
|
||||
"info": "The background color of the icon.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "background_color",
|
||||
|
|
@ -695,9 +635,7 @@
|
|||
"display_name": "Icon",
|
||||
"dynamic": false,
|
||||
"info": "The icon of the message.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "chat_icon",
|
||||
|
|
@ -753,9 +691,7 @@
|
|||
"display_name": "Data Template",
|
||||
"dynamic": false,
|
||||
"info": "Template to convert Data to Text. If left empty, it will be dynamically set to the Data's text key.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "data_template",
|
||||
|
|
@ -775,11 +711,7 @@
|
|||
"display_name": "Text",
|
||||
"dynamic": false,
|
||||
"info": "Message to be passed as output.",
|
||||
"input_types": [
|
||||
"Data",
|
||||
"DataFrame",
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Data", "DataFrame", "Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "input_value",
|
||||
|
|
@ -800,10 +732,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Type of sender.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User"
|
||||
],
|
||||
"options": ["Machine", "User"],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
|
|
@ -819,9 +748,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Name of the sender.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "sender_name",
|
||||
|
|
@ -841,9 +768,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "session_id",
|
||||
|
|
@ -879,9 +804,7 @@
|
|||
"display_name": "Text Color",
|
||||
"dynamic": false,
|
||||
"info": "The text color of the name",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "text_color",
|
||||
|
|
@ -925,9 +848,7 @@
|
|||
"display_name": "Prompt",
|
||||
"id": "Prompt-FRjO8",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {
|
||||
|
|
@ -937,9 +858,7 @@
|
|||
"display_name": "Prompt",
|
||||
"documentation": "",
|
||||
"edited": false,
|
||||
"field_order": [
|
||||
"template"
|
||||
],
|
||||
"field_order": ["template"],
|
||||
"frozen": false,
|
||||
"icon": "prompts",
|
||||
"legacy": false,
|
||||
|
|
@ -955,9 +874,7 @@
|
|||
"name": "prompt",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -1006,9 +923,7 @@
|
|||
"display_name": "Tool Placeholder",
|
||||
"dynamic": false,
|
||||
"info": "A placeholder input for tool mode.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "tool_placeholder",
|
||||
|
|
@ -1052,9 +967,7 @@
|
|||
"display_name": "Prompt",
|
||||
"id": "Prompt-f1f2v",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {
|
||||
|
|
@ -1064,9 +977,7 @@
|
|||
"display_name": "Prompt",
|
||||
"documentation": "",
|
||||
"edited": false,
|
||||
"field_order": [
|
||||
"template"
|
||||
],
|
||||
"field_order": ["template"],
|
||||
"frozen": false,
|
||||
"icon": "prompts",
|
||||
"legacy": false,
|
||||
|
|
@ -1082,9 +993,7 @@
|
|||
"name": "prompt",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -1133,9 +1042,7 @@
|
|||
"display_name": "Tool Placeholder",
|
||||
"dynamic": false,
|
||||
"info": "A placeholder input for tool mode.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "tool_placeholder",
|
||||
|
|
@ -1251,10 +1158,7 @@
|
|||
"data": {
|
||||
"id": "OpenAIModel-lL9HA",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"LanguageModel",
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["LanguageModel", "Message"],
|
||||
"beta": false,
|
||||
"category": "models",
|
||||
"conditional_paths": [],
|
||||
|
|
@ -1293,9 +1197,7 @@
|
|||
"required_inputs": [],
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
},
|
||||
{
|
||||
|
|
@ -1304,14 +1206,10 @@
|
|||
"display_name": "Language Model",
|
||||
"method": "build_model",
|
||||
"name": "model_output",
|
||||
"required_inputs": [
|
||||
"api_key"
|
||||
],
|
||||
"required_inputs": ["api_key"],
|
||||
"selected": "LanguageModel",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"LanguageModel"
|
||||
],
|
||||
"types": ["LanguageModel"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -1325,9 +1223,7 @@
|
|||
"display_name": "OpenAI API Key",
|
||||
"dynamic": false,
|
||||
"info": "The OpenAI API Key to use for the OpenAI model.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"load_from_db": true,
|
||||
"name": "api_key",
|
||||
"password": true,
|
||||
|
|
@ -1362,9 +1258,7 @@
|
|||
"display_name": "Input",
|
||||
"dynamic": false,
|
||||
"info": "",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1546,9 +1440,7 @@
|
|||
"display_name": "System Message",
|
||||
"dynamic": false,
|
||||
"info": "System message to pass to the model.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1633,10 +1525,7 @@
|
|||
"data": {
|
||||
"id": "OpenAIModel-JieGw",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"LanguageModel",
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["LanguageModel", "Message"],
|
||||
"beta": false,
|
||||
"category": "models",
|
||||
"conditional_paths": [],
|
||||
|
|
@ -1675,9 +1564,7 @@
|
|||
"required_inputs": [],
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
},
|
||||
{
|
||||
|
|
@ -1686,14 +1573,10 @@
|
|||
"display_name": "Language Model",
|
||||
"method": "build_model",
|
||||
"name": "model_output",
|
||||
"required_inputs": [
|
||||
"api_key"
|
||||
],
|
||||
"required_inputs": ["api_key"],
|
||||
"selected": "LanguageModel",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"LanguageModel"
|
||||
],
|
||||
"types": ["LanguageModel"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -1707,9 +1590,7 @@
|
|||
"display_name": "OpenAI API Key",
|
||||
"dynamic": false,
|
||||
"info": "The OpenAI API Key to use for the OpenAI model.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"load_from_db": true,
|
||||
"name": "api_key",
|
||||
"password": true,
|
||||
|
|
@ -1744,9 +1625,7 @@
|
|||
"display_name": "Input",
|
||||
"dynamic": false,
|
||||
"info": "",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1928,9 +1807,7 @@
|
|||
"display_name": "System Message",
|
||||
"dynamic": false,
|
||||
"info": "System message to pass to the model.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -2015,10 +1892,7 @@
|
|||
"data": {
|
||||
"id": "OpenAIModel-dXMRv",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"LanguageModel",
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["LanguageModel", "Message"],
|
||||
"beta": false,
|
||||
"category": "models",
|
||||
"conditional_paths": [],
|
||||
|
|
@ -2057,9 +1931,7 @@
|
|||
"required_inputs": [],
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
},
|
||||
{
|
||||
|
|
@ -2068,14 +1940,10 @@
|
|||
"display_name": "Language Model",
|
||||
"method": "build_model",
|
||||
"name": "model_output",
|
||||
"required_inputs": [
|
||||
"api_key"
|
||||
],
|
||||
"required_inputs": ["api_key"],
|
||||
"selected": "LanguageModel",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"LanguageModel"
|
||||
],
|
||||
"types": ["LanguageModel"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -2089,9 +1957,7 @@
|
|||
"display_name": "OpenAI API Key",
|
||||
"dynamic": false,
|
||||
"info": "The OpenAI API Key to use for the OpenAI model.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"load_from_db": true,
|
||||
"name": "api_key",
|
||||
"password": true,
|
||||
|
|
@ -2126,9 +1992,7 @@
|
|||
"display_name": "Input",
|
||||
"dynamic": false,
|
||||
"info": "",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -2310,9 +2174,7 @@
|
|||
"display_name": "System Message",
|
||||
"dynamic": false,
|
||||
"info": "System message to pass to the model.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -2408,7 +2270,5 @@
|
|||
"is_component": false,
|
||||
"last_tested_version": "1.0.19.post2",
|
||||
"name": "Prompt Chaining",
|
||||
"tags": [
|
||||
"chatbots"
|
||||
]
|
||||
}
|
||||
"tags": ["chatbots"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,16 +8,12 @@
|
|||
"dataType": "ChatInput",
|
||||
"id": "ChatInput-jFwUm",
|
||||
"name": "message",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "OpenAIModel-OcXkl",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -34,16 +30,12 @@
|
|||
"dataType": "Prompt",
|
||||
"id": "Prompt-3SM2g",
|
||||
"name": "prompt",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "system_message",
|
||||
"id": "OpenAIModel-OcXkl",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -60,18 +52,12 @@
|
|||
"dataType": "OpenAIModel",
|
||||
"id": "OpenAIModel-OcXkl",
|
||||
"name": "text_output",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "ChatOutput-gDYiJ",
|
||||
"inputTypes": [
|
||||
"Data",
|
||||
"DataFrame",
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Data", "DataFrame", "Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -89,9 +75,7 @@
|
|||
"display_name": "Chat Input",
|
||||
"id": "ChatInput-jFwUm",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -122,9 +106,7 @@
|
|||
"name": "message",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -137,9 +119,7 @@
|
|||
"display_name": "Background Color",
|
||||
"dynamic": false,
|
||||
"info": "The background color of the icon.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "background_color",
|
||||
|
|
@ -158,9 +138,7 @@
|
|||
"display_name": "Icon",
|
||||
"dynamic": false,
|
||||
"info": "The icon of the message.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "chat_icon",
|
||||
|
|
@ -189,7 +167,7 @@
|
|||
"show": true,
|
||||
"title_case": false,
|
||||
"type": "code",
|
||||
"value": "from langflow.base.data.utils import IMG_FILE_TYPES, TEXT_FILE_TYPES\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.inputs import BoolInput\nfrom langflow.io import (\n DropdownInput,\n FileInput,\n MessageTextInput,\n MultilineInput,\n Output,\n)\nfrom langflow.schema.message import Message\nfrom langflow.utils.constants import (\n MESSAGE_SENDER_AI,\n MESSAGE_SENDER_NAME_USER,\n MESSAGE_SENDER_USER,\n)\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"MessagesSquare\"\n name = \"ChatInput\"\n minimized = True\n\n inputs = [\n MultilineInput(\n name=\"input_value\",\n display_name=\"Text\",\n value=\"\",\n info=\"Message to be passed as input.\",\n input_types=[],\n ),\n BoolInput(\n name=\"should_store_message\",\n display_name=\"Store Messages\",\n info=\"Store the message in the history.\",\n value=True,\n advanced=True,\n ),\n DropdownInput(\n name=\"sender\",\n display_name=\"Sender Type\",\n options=[MESSAGE_SENDER_AI, MESSAGE_SENDER_USER],\n value=MESSAGE_SENDER_USER,\n info=\"Type of sender.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"sender_name\",\n display_name=\"Sender Name\",\n info=\"Name of the sender.\",\n value=MESSAGE_SENDER_NAME_USER,\n advanced=True,\n ),\n MessageTextInput(\n name=\"session_id\",\n display_name=\"Session ID\",\n info=\"The session ID of the chat. If empty, the current session ID parameter will be used.\",\n advanced=True,\n ),\n FileInput(\n name=\"files\",\n display_name=\"Files\",\n file_types=TEXT_FILE_TYPES + IMG_FILE_TYPES,\n info=\"Files to be sent with the message.\",\n advanced=True,\n is_list=True,\n ),\n MessageTextInput(\n name=\"background_color\",\n display_name=\"Background Color\",\n info=\"The background color of the icon.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"chat_icon\",\n display_name=\"Icon\",\n info=\"The icon of the message.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"text_color\",\n display_name=\"Text Color\",\n info=\"The text color of the name\",\n advanced=True,\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"message_response\"),\n ]\n\n async def message_response(self) -> Message:\n background_color = self.background_color\n text_color = self.text_color\n icon = self.chat_icon\n\n message = await Message.create(\n text=self.input_value,\n sender=self.sender,\n sender_name=self.sender_name,\n session_id=self.session_id,\n files=self.files,\n properties={\n \"background_color\": background_color,\n \"text_color\": text_color,\n \"icon\": icon,\n },\n )\n if self.session_id and isinstance(message, Message) and self.should_store_message:\n stored_message = await self.send_message(\n message,\n )\n self.message.value = stored_message\n message = stored_message\n\n self.status = message\n return message\n"
|
||||
"value": "from langflow.base.data.utils import IMG_FILE_TYPES, TEXT_FILE_TYPES\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.inputs import BoolInput\nfrom langflow.io import (\n DropdownInput,\n FileInput,\n MessageTextInput,\n MultilineInput,\n Output,\n)\nfrom langflow.schema.message import Message\nfrom langflow.utils.constants import (\n MESSAGE_SENDER_AI,\n MESSAGE_SENDER_NAME_USER,\n MESSAGE_SENDER_USER,\n)\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"MessagesSquare\"\n name = \"ChatInput\"\n minimized = True\n\n inputs = [\n MultilineInput(\n name=\"input_value\",\n display_name=\"Text\",\n value=\"\",\n info=\"Message to be passed as input.\",\n input_types=[],\n ),\n BoolInput(\n name=\"should_store_message\",\n display_name=\"Store Messages\",\n info=\"Store the message in the history.\",\n value=True,\n advanced=True,\n ),\n DropdownInput(\n name=\"sender\",\n display_name=\"Sender Type\",\n options=[MESSAGE_SENDER_AI, MESSAGE_SENDER_USER],\n value=MESSAGE_SENDER_USER,\n info=\"Type of sender.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"sender_name\",\n display_name=\"Sender Name\",\n info=\"Name of the sender.\",\n value=MESSAGE_SENDER_NAME_USER,\n advanced=True,\n ),\n MessageTextInput(\n name=\"session_id\",\n display_name=\"Session ID\",\n info=\"The session ID of the chat. If empty, the current session ID parameter will be used.\",\n advanced=True,\n ),\n FileInput(\n name=\"files\",\n display_name=\"Files\",\n file_types=TEXT_FILE_TYPES + IMG_FILE_TYPES,\n info=\"Files to be sent with the message.\",\n advanced=True,\n is_list=True,\n temp_file=True,\n ),\n MessageTextInput(\n name=\"background_color\",\n display_name=\"Background Color\",\n info=\"The background color of the icon.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"chat_icon\",\n display_name=\"Icon\",\n info=\"The icon of the message.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"text_color\",\n display_name=\"Text Color\",\n info=\"The text color of the name\",\n advanced=True,\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"message_response\"),\n ]\n\n async def message_response(self) -> Message:\n background_color = self.background_color\n text_color = self.text_color\n icon = self.chat_icon\n\n message = await Message.create(\n text=self.input_value,\n sender=self.sender,\n sender_name=self.sender_name,\n session_id=self.session_id,\n files=self.files,\n properties={\n \"background_color\": background_color,\n \"text_color\": text_color,\n \"icon\": icon,\n },\n )\n if self.session_id and isinstance(message, Message) and self.should_store_message:\n stored_message = await self.send_message(\n message,\n )\n self.message.value = stored_message\n message = stored_message\n\n self.status = message\n return message\n"
|
||||
},
|
||||
"files": {
|
||||
"advanced": true,
|
||||
|
|
@ -227,6 +205,7 @@
|
|||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
"temp_file": true,
|
||||
"title_case": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "file",
|
||||
|
|
@ -257,10 +236,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Type of sender.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User"
|
||||
],
|
||||
"options": ["Machine", "User"],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
|
|
@ -274,9 +250,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Name of the sender.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "sender_name",
|
||||
|
|
@ -294,9 +268,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "session_id",
|
||||
|
|
@ -331,9 +303,7 @@
|
|||
"display_name": "Text Color",
|
||||
"dynamic": false,
|
||||
"info": "The text color of the name",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "text_color",
|
||||
|
|
@ -375,9 +345,7 @@
|
|||
"display_name": "Prompt",
|
||||
"id": "Prompt-3SM2g",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {
|
||||
|
|
@ -387,9 +355,7 @@
|
|||
"display_name": "Prompt",
|
||||
"documentation": "",
|
||||
"edited": false,
|
||||
"field_order": [
|
||||
"template"
|
||||
],
|
||||
"field_order": ["template"],
|
||||
"frozen": false,
|
||||
"icon": "prompts",
|
||||
"legacy": false,
|
||||
|
|
@ -404,9 +370,7 @@
|
|||
"name": "prompt",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -455,9 +419,7 @@
|
|||
"display_name": "Tool Placeholder",
|
||||
"dynamic": false,
|
||||
"info": "A placeholder input for tool mode.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "tool_placeholder",
|
||||
|
|
@ -572,9 +534,7 @@
|
|||
"data": {
|
||||
"id": "ChatOutput-gDYiJ",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -607,9 +567,7 @@
|
|||
"name": "message",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -622,9 +580,7 @@
|
|||
"display_name": "Background Color",
|
||||
"dynamic": false,
|
||||
"info": "The background color of the icon.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "background_color",
|
||||
|
|
@ -644,9 +600,7 @@
|
|||
"display_name": "Icon",
|
||||
"dynamic": false,
|
||||
"info": "The icon of the message.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "chat_icon",
|
||||
|
|
@ -702,9 +656,7 @@
|
|||
"display_name": "Data Template",
|
||||
"dynamic": false,
|
||||
"info": "Template to convert Data to Text. If left empty, it will be dynamically set to the Data's text key.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "data_template",
|
||||
|
|
@ -724,11 +676,7 @@
|
|||
"display_name": "Text",
|
||||
"dynamic": false,
|
||||
"info": "Message to be passed as output.",
|
||||
"input_types": [
|
||||
"Data",
|
||||
"DataFrame",
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Data", "DataFrame", "Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "input_value",
|
||||
|
|
@ -749,10 +697,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Type of sender.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User"
|
||||
],
|
||||
"options": ["Machine", "User"],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
|
|
@ -768,9 +713,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Name of the sender.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "sender_name",
|
||||
|
|
@ -790,9 +733,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "session_id",
|
||||
|
|
@ -828,9 +769,7 @@
|
|||
"display_name": "Text Color",
|
||||
"dynamic": false,
|
||||
"info": "The text color of the name",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "text_color",
|
||||
|
|
@ -872,10 +811,7 @@
|
|||
"data": {
|
||||
"id": "OpenAIModel-OcXkl",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"LanguageModel",
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["LanguageModel", "Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -914,9 +850,7 @@
|
|||
"required_inputs": [],
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
},
|
||||
{
|
||||
|
|
@ -925,14 +859,10 @@
|
|||
"display_name": "Language Model",
|
||||
"method": "build_model",
|
||||
"name": "model_output",
|
||||
"required_inputs": [
|
||||
"api_key"
|
||||
],
|
||||
"required_inputs": ["api_key"],
|
||||
"selected": "LanguageModel",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"LanguageModel"
|
||||
],
|
||||
"types": ["LanguageModel"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -945,9 +875,7 @@
|
|||
"display_name": "OpenAI API Key",
|
||||
"dynamic": false,
|
||||
"info": "The OpenAI API Key to use for the OpenAI model.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"load_from_db": true,
|
||||
"name": "api_key",
|
||||
"password": true,
|
||||
|
|
@ -982,9 +910,7 @@
|
|||
"display_name": "Input",
|
||||
"dynamic": false,
|
||||
"info": "",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1166,9 +1092,7 @@
|
|||
"display_name": "System Message",
|
||||
"dynamic": false,
|
||||
"info": "System message to pass to the model.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1265,7 +1189,5 @@
|
|||
"is_component": false,
|
||||
"last_tested_version": "1.0.19.post2",
|
||||
"name": "Basic Prompting",
|
||||
"tags": [
|
||||
"chatbots"
|
||||
]
|
||||
}
|
||||
"tags": ["chatbots"]
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -9,16 +9,12 @@
|
|||
"dataType": "ChatInput",
|
||||
"id": "ChatInput-Tza35",
|
||||
"name": "message",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "NovitaModel-NPPoo",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -37,16 +33,12 @@
|
|||
"dataType": "Prompt",
|
||||
"id": "Prompt-lo2oI",
|
||||
"name": "prompt",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "system_message",
|
||||
"id": "NovitaModel-NPPoo",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -65,18 +57,12 @@
|
|||
"dataType": "NovitaModel",
|
||||
"id": "NovitaModel-NPPoo",
|
||||
"name": "text_output",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "ChatOutput-G6tol",
|
||||
"inputTypes": [
|
||||
"Data",
|
||||
"DataFrame",
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Data", "DataFrame", "Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -93,9 +79,7 @@
|
|||
"data": {
|
||||
"id": "ChatInput-Tza35",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -130,9 +114,7 @@
|
|||
"name": "message",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -145,9 +127,7 @@
|
|||
"display_name": "Background Color",
|
||||
"dynamic": false,
|
||||
"info": "The background color of the icon.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -168,9 +148,7 @@
|
|||
"display_name": "Icon",
|
||||
"dynamic": false,
|
||||
"info": "The icon of the message.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -201,7 +179,7 @@
|
|||
"show": true,
|
||||
"title_case": false,
|
||||
"type": "code",
|
||||
"value": "from langflow.base.data.utils import IMG_FILE_TYPES, TEXT_FILE_TYPES\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.inputs import BoolInput\nfrom langflow.io import (\n DropdownInput,\n FileInput,\n MessageTextInput,\n MultilineInput,\n Output,\n)\nfrom langflow.schema.message import Message\nfrom langflow.utils.constants import (\n MESSAGE_SENDER_AI,\n MESSAGE_SENDER_NAME_USER,\n MESSAGE_SENDER_USER,\n)\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"MessagesSquare\"\n name = \"ChatInput\"\n minimized = True\n\n inputs = [\n MultilineInput(\n name=\"input_value\",\n display_name=\"Text\",\n value=\"\",\n info=\"Message to be passed as input.\",\n input_types=[],\n ),\n BoolInput(\n name=\"should_store_message\",\n display_name=\"Store Messages\",\n info=\"Store the message in the history.\",\n value=True,\n advanced=True,\n ),\n DropdownInput(\n name=\"sender\",\n display_name=\"Sender Type\",\n options=[MESSAGE_SENDER_AI, MESSAGE_SENDER_USER],\n value=MESSAGE_SENDER_USER,\n info=\"Type of sender.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"sender_name\",\n display_name=\"Sender Name\",\n info=\"Name of the sender.\",\n value=MESSAGE_SENDER_NAME_USER,\n advanced=True,\n ),\n MessageTextInput(\n name=\"session_id\",\n display_name=\"Session ID\",\n info=\"The session ID of the chat. If empty, the current session ID parameter will be used.\",\n advanced=True,\n ),\n FileInput(\n name=\"files\",\n display_name=\"Files\",\n file_types=TEXT_FILE_TYPES + IMG_FILE_TYPES,\n info=\"Files to be sent with the message.\",\n advanced=True,\n is_list=True,\n ),\n MessageTextInput(\n name=\"background_color\",\n display_name=\"Background Color\",\n info=\"The background color of the icon.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"chat_icon\",\n display_name=\"Icon\",\n info=\"The icon of the message.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"text_color\",\n display_name=\"Text Color\",\n info=\"The text color of the name\",\n advanced=True,\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"message_response\"),\n ]\n\n async def message_response(self) -> Message:\n background_color = self.background_color\n text_color = self.text_color\n icon = self.chat_icon\n\n message = await Message.create(\n text=self.input_value,\n sender=self.sender,\n sender_name=self.sender_name,\n session_id=self.session_id,\n files=self.files,\n properties={\n \"background_color\": background_color,\n \"text_color\": text_color,\n \"icon\": icon,\n },\n )\n if self.session_id and isinstance(message, Message) and self.should_store_message:\n stored_message = await self.send_message(\n message,\n )\n self.message.value = stored_message\n message = stored_message\n\n self.status = message\n return message\n"
|
||||
"value": "from langflow.base.data.utils import IMG_FILE_TYPES, TEXT_FILE_TYPES\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.inputs import BoolInput\nfrom langflow.io import (\n DropdownInput,\n FileInput,\n MessageTextInput,\n MultilineInput,\n Output,\n)\nfrom langflow.schema.message import Message\nfrom langflow.utils.constants import (\n MESSAGE_SENDER_AI,\n MESSAGE_SENDER_NAME_USER,\n MESSAGE_SENDER_USER,\n)\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"MessagesSquare\"\n name = \"ChatInput\"\n minimized = True\n\n inputs = [\n MultilineInput(\n name=\"input_value\",\n display_name=\"Text\",\n value=\"\",\n info=\"Message to be passed as input.\",\n input_types=[],\n ),\n BoolInput(\n name=\"should_store_message\",\n display_name=\"Store Messages\",\n info=\"Store the message in the history.\",\n value=True,\n advanced=True,\n ),\n DropdownInput(\n name=\"sender\",\n display_name=\"Sender Type\",\n options=[MESSAGE_SENDER_AI, MESSAGE_SENDER_USER],\n value=MESSAGE_SENDER_USER,\n info=\"Type of sender.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"sender_name\",\n display_name=\"Sender Name\",\n info=\"Name of the sender.\",\n value=MESSAGE_SENDER_NAME_USER,\n advanced=True,\n ),\n MessageTextInput(\n name=\"session_id\",\n display_name=\"Session ID\",\n info=\"The session ID of the chat. If empty, the current session ID parameter will be used.\",\n advanced=True,\n ),\n FileInput(\n name=\"files\",\n display_name=\"Files\",\n file_types=TEXT_FILE_TYPES + IMG_FILE_TYPES,\n info=\"Files to be sent with the message.\",\n advanced=True,\n is_list=True,\n temp_file=True,\n ),\n MessageTextInput(\n name=\"background_color\",\n display_name=\"Background Color\",\n info=\"The background color of the icon.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"chat_icon\",\n display_name=\"Icon\",\n info=\"The icon of the message.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"text_color\",\n display_name=\"Text Color\",\n info=\"The text color of the name\",\n advanced=True,\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"message_response\"),\n ]\n\n async def message_response(self) -> Message:\n background_color = self.background_color\n text_color = self.text_color\n icon = self.chat_icon\n\n message = await Message.create(\n text=self.input_value,\n sender=self.sender,\n sender_name=self.sender_name,\n session_id=self.session_id,\n files=self.files,\n properties={\n \"background_color\": background_color,\n \"text_color\": text_color,\n \"icon\": icon,\n },\n )\n if self.session_id and isinstance(message, Message) and self.should_store_message:\n stored_message = await self.send_message(\n message,\n )\n self.message.value = stored_message\n message = stored_message\n\n self.status = message\n return message\n"
|
||||
},
|
||||
"files": {
|
||||
"_input_type": "FileInput",
|
||||
|
|
@ -241,6 +219,7 @@
|
|||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
"temp_file": true,
|
||||
"title_case": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "file",
|
||||
|
|
@ -277,10 +256,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Type of sender.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User"
|
||||
],
|
||||
"options": ["Machine", "User"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -297,9 +273,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Name of the sender.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -320,9 +294,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -361,9 +333,7 @@
|
|||
"display_name": "Text Color",
|
||||
"dynamic": false,
|
||||
"info": "The text color of the name",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -401,9 +371,7 @@
|
|||
"data": {
|
||||
"id": "Prompt-lo2oI",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {
|
||||
|
|
@ -414,10 +382,7 @@
|
|||
"documentation": "",
|
||||
"edited": false,
|
||||
"error": null,
|
||||
"field_order": [
|
||||
"template",
|
||||
"tool_placeholder"
|
||||
],
|
||||
"field_order": ["template", "tool_placeholder"],
|
||||
"frozen": false,
|
||||
"full_path": null,
|
||||
"icon": "prompts",
|
||||
|
|
@ -439,9 +404,7 @@
|
|||
"name": "prompt",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -490,9 +453,7 @@
|
|||
"display_name": "Tool Placeholder",
|
||||
"dynamic": false,
|
||||
"info": "A placeholder input for tool mode.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -530,10 +491,7 @@
|
|||
"data": {
|
||||
"id": "NovitaModel-NPPoo",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"LanguageModel",
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["LanguageModel", "Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -571,9 +529,7 @@
|
|||
"required_inputs": [],
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
},
|
||||
{
|
||||
|
|
@ -585,9 +541,7 @@
|
|||
"required_inputs": [],
|
||||
"selected": "LanguageModel",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"LanguageModel"
|
||||
],
|
||||
"types": ["LanguageModel"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -600,9 +554,7 @@
|
|||
"display_name": "Novita API Key",
|
||||
"dynamic": false,
|
||||
"info": "The Novita API Key to use for Novita AI models.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"load_from_db": false,
|
||||
"name": "api_key",
|
||||
"password": true,
|
||||
|
|
@ -638,9 +590,7 @@
|
|||
"display_name": "Input",
|
||||
"dynamic": false,
|
||||
"info": "",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -775,9 +725,7 @@
|
|||
"display_name": "Output Parser",
|
||||
"dynamic": false,
|
||||
"info": "The parser to use to parse the output of the model",
|
||||
"input_types": [
|
||||
"OutputParser"
|
||||
],
|
||||
"input_types": ["OutputParser"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"name": "output_parser",
|
||||
|
|
@ -831,9 +779,7 @@
|
|||
"display_name": "System Message",
|
||||
"dynamic": false,
|
||||
"info": "System message to pass to the model.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -900,9 +846,7 @@
|
|||
"data": {
|
||||
"id": "ChatOutput-G6tol",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -937,9 +881,7 @@
|
|||
"name": "message",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -952,9 +894,7 @@
|
|||
"display_name": "Background Color",
|
||||
"dynamic": false,
|
||||
"info": "The background color of the icon.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -975,9 +915,7 @@
|
|||
"display_name": "Icon",
|
||||
"dynamic": false,
|
||||
"info": "The icon of the message.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1034,9 +972,7 @@
|
|||
"display_name": "Data Template",
|
||||
"dynamic": false,
|
||||
"info": "Template to convert Data to Text. If left empty, it will be dynamically set to the Data's text key.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1057,11 +993,7 @@
|
|||
"display_name": "Text",
|
||||
"dynamic": false,
|
||||
"info": "Message to be passed as output.",
|
||||
"input_types": [
|
||||
"Data",
|
||||
"DataFrame",
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Data", "DataFrame", "Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1085,10 +1017,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Type of sender.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User"
|
||||
],
|
||||
"options": ["Machine", "User"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -1105,9 +1034,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Name of the sender.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1128,9 +1055,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1169,9 +1094,7 @@
|
|||
"display_name": "Text Color",
|
||||
"dynamic": false,
|
||||
"info": "The text color of the name",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1245,8 +1168,5 @@
|
|||
"is_component": false,
|
||||
"last_tested_version": "1.2.0",
|
||||
"name": "Diet Analysis",
|
||||
"tags": [
|
||||
"chatbots",
|
||||
"content-generation"
|
||||
]
|
||||
}
|
||||
"tags": ["chatbots", "content-generation"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,16 +8,12 @@
|
|||
"dataType": "File",
|
||||
"id": "File-GwJQZ",
|
||||
"name": "data",
|
||||
"output_types": [
|
||||
"Data"
|
||||
]
|
||||
"output_types": ["Data"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "data",
|
||||
"id": "ParseData-BbvKb",
|
||||
"inputTypes": [
|
||||
"Data"
|
||||
],
|
||||
"inputTypes": ["Data"],
|
||||
"type": "other"
|
||||
}
|
||||
},
|
||||
|
|
@ -35,17 +31,12 @@
|
|||
"dataType": "ParseData",
|
||||
"id": "ParseData-BbvKb",
|
||||
"name": "text",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "Document",
|
||||
"id": "Prompt-yvZHT",
|
||||
"inputTypes": [
|
||||
"Message",
|
||||
"Text"
|
||||
],
|
||||
"inputTypes": ["Message", "Text"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -63,16 +54,12 @@
|
|||
"dataType": "ChatInput",
|
||||
"id": "ChatInput-li477",
|
||||
"name": "message",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "OpenAIModel-atkmo",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -90,16 +77,12 @@
|
|||
"dataType": "Prompt",
|
||||
"id": "Prompt-yvZHT",
|
||||
"name": "prompt",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "system_message",
|
||||
"id": "OpenAIModel-atkmo",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -117,18 +100,12 @@
|
|||
"dataType": "OpenAIModel",
|
||||
"id": "OpenAIModel-atkmo",
|
||||
"name": "text_output",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "ChatOutput-8pgwS",
|
||||
"inputTypes": [
|
||||
"Data",
|
||||
"DataFrame",
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Data", "DataFrame", "Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -147,9 +124,7 @@
|
|||
"display_name": "Chat Input",
|
||||
"id": "ChatInput-li477",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -180,9 +155,7 @@
|
|||
"name": "message",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -195,9 +168,7 @@
|
|||
"display_name": "Background Color",
|
||||
"dynamic": false,
|
||||
"info": "The background color of the icon.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "background_color",
|
||||
|
|
@ -216,9 +187,7 @@
|
|||
"display_name": "Icon",
|
||||
"dynamic": false,
|
||||
"info": "The icon of the message.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "chat_icon",
|
||||
|
|
@ -247,7 +216,7 @@
|
|||
"show": true,
|
||||
"title_case": false,
|
||||
"type": "code",
|
||||
"value": "from langflow.base.data.utils import IMG_FILE_TYPES, TEXT_FILE_TYPES\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.inputs import BoolInput\nfrom langflow.io import (\n DropdownInput,\n FileInput,\n MessageTextInput,\n MultilineInput,\n Output,\n)\nfrom langflow.schema.message import Message\nfrom langflow.utils.constants import (\n MESSAGE_SENDER_AI,\n MESSAGE_SENDER_NAME_USER,\n MESSAGE_SENDER_USER,\n)\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"MessagesSquare\"\n name = \"ChatInput\"\n minimized = True\n\n inputs = [\n MultilineInput(\n name=\"input_value\",\n display_name=\"Text\",\n value=\"\",\n info=\"Message to be passed as input.\",\n input_types=[],\n ),\n BoolInput(\n name=\"should_store_message\",\n display_name=\"Store Messages\",\n info=\"Store the message in the history.\",\n value=True,\n advanced=True,\n ),\n DropdownInput(\n name=\"sender\",\n display_name=\"Sender Type\",\n options=[MESSAGE_SENDER_AI, MESSAGE_SENDER_USER],\n value=MESSAGE_SENDER_USER,\n info=\"Type of sender.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"sender_name\",\n display_name=\"Sender Name\",\n info=\"Name of the sender.\",\n value=MESSAGE_SENDER_NAME_USER,\n advanced=True,\n ),\n MessageTextInput(\n name=\"session_id\",\n display_name=\"Session ID\",\n info=\"The session ID of the chat. If empty, the current session ID parameter will be used.\",\n advanced=True,\n ),\n FileInput(\n name=\"files\",\n display_name=\"Files\",\n file_types=TEXT_FILE_TYPES + IMG_FILE_TYPES,\n info=\"Files to be sent with the message.\",\n advanced=True,\n is_list=True,\n ),\n MessageTextInput(\n name=\"background_color\",\n display_name=\"Background Color\",\n info=\"The background color of the icon.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"chat_icon\",\n display_name=\"Icon\",\n info=\"The icon of the message.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"text_color\",\n display_name=\"Text Color\",\n info=\"The text color of the name\",\n advanced=True,\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"message_response\"),\n ]\n\n async def message_response(self) -> Message:\n background_color = self.background_color\n text_color = self.text_color\n icon = self.chat_icon\n\n message = await Message.create(\n text=self.input_value,\n sender=self.sender,\n sender_name=self.sender_name,\n session_id=self.session_id,\n files=self.files,\n properties={\n \"background_color\": background_color,\n \"text_color\": text_color,\n \"icon\": icon,\n },\n )\n if self.session_id and isinstance(message, Message) and self.should_store_message:\n stored_message = await self.send_message(\n message,\n )\n self.message.value = stored_message\n message = stored_message\n\n self.status = message\n return message\n"
|
||||
"value": "from langflow.base.data.utils import IMG_FILE_TYPES, TEXT_FILE_TYPES\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.inputs import BoolInput\nfrom langflow.io import (\n DropdownInput,\n FileInput,\n MessageTextInput,\n MultilineInput,\n Output,\n)\nfrom langflow.schema.message import Message\nfrom langflow.utils.constants import (\n MESSAGE_SENDER_AI,\n MESSAGE_SENDER_NAME_USER,\n MESSAGE_SENDER_USER,\n)\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"MessagesSquare\"\n name = \"ChatInput\"\n minimized = True\n\n inputs = [\n MultilineInput(\n name=\"input_value\",\n display_name=\"Text\",\n value=\"\",\n info=\"Message to be passed as input.\",\n input_types=[],\n ),\n BoolInput(\n name=\"should_store_message\",\n display_name=\"Store Messages\",\n info=\"Store the message in the history.\",\n value=True,\n advanced=True,\n ),\n DropdownInput(\n name=\"sender\",\n display_name=\"Sender Type\",\n options=[MESSAGE_SENDER_AI, MESSAGE_SENDER_USER],\n value=MESSAGE_SENDER_USER,\n info=\"Type of sender.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"sender_name\",\n display_name=\"Sender Name\",\n info=\"Name of the sender.\",\n value=MESSAGE_SENDER_NAME_USER,\n advanced=True,\n ),\n MessageTextInput(\n name=\"session_id\",\n display_name=\"Session ID\",\n info=\"The session ID of the chat. If empty, the current session ID parameter will be used.\",\n advanced=True,\n ),\n FileInput(\n name=\"files\",\n display_name=\"Files\",\n file_types=TEXT_FILE_TYPES + IMG_FILE_TYPES,\n info=\"Files to be sent with the message.\",\n advanced=True,\n is_list=True,\n temp_file=True,\n ),\n MessageTextInput(\n name=\"background_color\",\n display_name=\"Background Color\",\n info=\"The background color of the icon.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"chat_icon\",\n display_name=\"Icon\",\n info=\"The icon of the message.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"text_color\",\n display_name=\"Text Color\",\n info=\"The text color of the name\",\n advanced=True,\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"message_response\"),\n ]\n\n async def message_response(self) -> Message:\n background_color = self.background_color\n text_color = self.text_color\n icon = self.chat_icon\n\n message = await Message.create(\n text=self.input_value,\n sender=self.sender,\n sender_name=self.sender_name,\n session_id=self.session_id,\n files=self.files,\n properties={\n \"background_color\": background_color,\n \"text_color\": text_color,\n \"icon\": icon,\n },\n )\n if self.session_id and isinstance(message, Message) and self.should_store_message:\n stored_message = await self.send_message(\n message,\n )\n self.message.value = stored_message\n message = stored_message\n\n self.status = message\n return message\n"
|
||||
},
|
||||
"files": {
|
||||
"advanced": true,
|
||||
|
|
@ -285,6 +254,7 @@
|
|||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
"temp_file": true,
|
||||
"title_case": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "file",
|
||||
|
|
@ -315,10 +285,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Type of sender.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User"
|
||||
],
|
||||
"options": ["Machine", "User"],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
|
|
@ -332,9 +299,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Name of the sender.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "sender_name",
|
||||
|
|
@ -352,9 +317,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "session_id",
|
||||
|
|
@ -389,9 +352,7 @@
|
|||
"display_name": "Text Color",
|
||||
"dynamic": false,
|
||||
"info": "The text color of the name",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "text_color",
|
||||
|
|
@ -433,9 +394,7 @@
|
|||
"display_name": "Chat Output",
|
||||
"id": "ChatOutput-8pgwS",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -469,9 +428,7 @@
|
|||
"name": "message",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -484,9 +441,7 @@
|
|||
"display_name": "Background Color",
|
||||
"dynamic": false,
|
||||
"info": "The background color of the icon.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "background_color",
|
||||
|
|
@ -506,9 +461,7 @@
|
|||
"display_name": "Icon",
|
||||
"dynamic": false,
|
||||
"info": "The icon of the message.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "chat_icon",
|
||||
|
|
@ -564,9 +517,7 @@
|
|||
"display_name": "Data Template",
|
||||
"dynamic": false,
|
||||
"info": "Template to convert Data to Text. If left empty, it will be dynamically set to the Data's text key.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "data_template",
|
||||
|
|
@ -586,11 +537,7 @@
|
|||
"display_name": "Text",
|
||||
"dynamic": false,
|
||||
"info": "Message to be passed as output.",
|
||||
"input_types": [
|
||||
"Data",
|
||||
"DataFrame",
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Data", "DataFrame", "Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "input_value",
|
||||
|
|
@ -611,10 +558,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Type of sender.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User"
|
||||
],
|
||||
"options": ["Machine", "User"],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
|
|
@ -630,9 +574,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Name of the sender.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "sender_name",
|
||||
|
|
@ -652,9 +594,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "session_id",
|
||||
|
|
@ -690,9 +630,7 @@
|
|||
"display_name": "Text Color",
|
||||
"dynamic": false,
|
||||
"info": "The text color of the name",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "text_color",
|
||||
|
|
@ -736,9 +674,7 @@
|
|||
"display_name": "Parse Data",
|
||||
"id": "ParseData-BbvKb",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -746,11 +682,7 @@
|
|||
"display_name": "Parse Data",
|
||||
"documentation": "",
|
||||
"edited": false,
|
||||
"field_order": [
|
||||
"data",
|
||||
"template",
|
||||
"sep"
|
||||
],
|
||||
"field_order": ["data", "template", "sep"],
|
||||
"frozen": false,
|
||||
"icon": "message-square",
|
||||
"legacy": false,
|
||||
|
|
@ -768,9 +700,7 @@
|
|||
"name": "text",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
},
|
||||
{
|
||||
|
|
@ -781,9 +711,7 @@
|
|||
"name": "data_list",
|
||||
"selected": "Data",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Data"
|
||||
],
|
||||
"types": ["Data"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -813,9 +741,7 @@
|
|||
"display_name": "Data",
|
||||
"dynamic": false,
|
||||
"info": "The data to convert to text.",
|
||||
"input_types": [
|
||||
"Data"
|
||||
],
|
||||
"input_types": ["Data"],
|
||||
"list": true,
|
||||
"name": "data",
|
||||
"placeholder": "",
|
||||
|
|
@ -848,9 +774,7 @@
|
|||
"display_name": "Template",
|
||||
"dynamic": false,
|
||||
"info": "The template to use for formatting the data. It can contain the keys {text}, {data} or any other key in the Data.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"multiline": true,
|
||||
|
|
@ -958,9 +882,7 @@
|
|||
"data": {
|
||||
"id": "File-GwJQZ",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Data"
|
||||
],
|
||||
"base_classes": ["Data"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -989,9 +911,7 @@
|
|||
"required_inputs": [],
|
||||
"selected": "Data",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Data"
|
||||
],
|
||||
"types": ["Data"],
|
||||
"value": "__UNDEFINED__"
|
||||
},
|
||||
{
|
||||
|
|
@ -1003,9 +923,7 @@
|
|||
"required_inputs": [],
|
||||
"selected": "DataFrame",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"DataFrame"
|
||||
],
|
||||
"types": ["DataFrame"],
|
||||
"value": "__UNDEFINED__"
|
||||
},
|
||||
{
|
||||
|
|
@ -1017,9 +935,7 @@
|
|||
"required_inputs": [],
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -1082,10 +998,7 @@
|
|||
"display_name": "Server File Path",
|
||||
"dynamic": false,
|
||||
"info": "Data object with a 'file_path' property pointing to server file or a Message object with a path to the file. Supercedes 'Path' but supports same file types.",
|
||||
"input_types": [
|
||||
"Data",
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Data", "Message"],
|
||||
"list": true,
|
||||
"name": "file_path",
|
||||
"placeholder": "",
|
||||
|
|
@ -1131,7 +1044,7 @@
|
|||
"path": {
|
||||
"_input_type": "FileInput",
|
||||
"advanced": false,
|
||||
"display_name": "Path",
|
||||
"display_name": "Files",
|
||||
"dynamic": false,
|
||||
"fileTypes": [
|
||||
"txt",
|
||||
|
|
@ -1160,7 +1073,7 @@
|
|||
],
|
||||
"file_path": "",
|
||||
"info": "Supported file extensions: txt, md, mdx, csv, json, yaml, yml, xml, html, htm, pdf, docx, py, sh, sql, js, ts, tsx; optionally bundled in file extensions: zip, tar, tgz, bz2, gz",
|
||||
"list": false,
|
||||
"list": true,
|
||||
"name": "path",
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -1251,24 +1164,18 @@
|
|||
"display_name": "Prompt",
|
||||
"id": "Prompt-yvZHT",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {
|
||||
"template": [
|
||||
"Document"
|
||||
]
|
||||
"template": ["Document"]
|
||||
},
|
||||
"description": "Create a prompt template with dynamic variables.",
|
||||
"display_name": "Prompt",
|
||||
"documentation": "",
|
||||
"edited": false,
|
||||
"error": null,
|
||||
"field_order": [
|
||||
"template"
|
||||
],
|
||||
"field_order": ["template"],
|
||||
"frozen": false,
|
||||
"full_path": null,
|
||||
"icon": "prompts",
|
||||
|
|
@ -1289,9 +1196,7 @@
|
|||
"name": "prompt",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -1305,10 +1210,7 @@
|
|||
"fileTypes": [],
|
||||
"file_path": "",
|
||||
"info": "",
|
||||
"input_types": [
|
||||
"Message",
|
||||
"Text"
|
||||
],
|
||||
"input_types": ["Message", "Text"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"multiline": true,
|
||||
|
|
@ -1361,9 +1263,7 @@
|
|||
"display_name": "Tool Placeholder",
|
||||
"dynamic": false,
|
||||
"info": "A placeholder input for tool mode.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "tool_placeholder",
|
||||
|
|
@ -1405,10 +1305,7 @@
|
|||
"data": {
|
||||
"id": "OpenAIModel-atkmo",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"LanguageModel",
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["LanguageModel", "Message"],
|
||||
"beta": false,
|
||||
"category": "models",
|
||||
"conditional_paths": [],
|
||||
|
|
@ -1447,9 +1344,7 @@
|
|||
"required_inputs": [],
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
},
|
||||
{
|
||||
|
|
@ -1458,14 +1353,10 @@
|
|||
"display_name": "Language Model",
|
||||
"method": "build_model",
|
||||
"name": "model_output",
|
||||
"required_inputs": [
|
||||
"api_key"
|
||||
],
|
||||
"required_inputs": ["api_key"],
|
||||
"selected": "LanguageModel",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"LanguageModel"
|
||||
],
|
||||
"types": ["LanguageModel"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -1479,9 +1370,7 @@
|
|||
"display_name": "OpenAI API Key",
|
||||
"dynamic": false,
|
||||
"info": "The OpenAI API Key to use for the OpenAI model.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"load_from_db": true,
|
||||
"name": "api_key",
|
||||
"password": true,
|
||||
|
|
@ -1516,9 +1405,7 @@
|
|||
"display_name": "Input",
|
||||
"dynamic": false,
|
||||
"info": "",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1700,9 +1587,7 @@
|
|||
"display_name": "System Message",
|
||||
"dynamic": false,
|
||||
"info": "System message to pass to the model.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1798,9 +1683,5 @@
|
|||
"is_component": false,
|
||||
"last_tested_version": "1.0.19.post2",
|
||||
"name": "Document Q&A",
|
||||
"tags": [
|
||||
"rag",
|
||||
"q-a",
|
||||
"openai"
|
||||
]
|
||||
}
|
||||
"tags": ["rag", "q-a", "openai"]
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -9,16 +9,12 @@
|
|||
"dataType": "OpenAIModel",
|
||||
"id": "OpenAIModel-hx0nZ",
|
||||
"name": "model_output",
|
||||
"output_types": [
|
||||
"LanguageModel"
|
||||
]
|
||||
"output_types": ["LanguageModel"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "llm",
|
||||
"id": "StructuredOutputv2-Io4Zq",
|
||||
"inputTypes": [
|
||||
"LanguageModel"
|
||||
],
|
||||
"inputTypes": ["LanguageModel"],
|
||||
"type": "other"
|
||||
}
|
||||
},
|
||||
|
|
@ -37,16 +33,12 @@
|
|||
"dataType": "ChatInput",
|
||||
"id": "ChatInput-Gb2ag",
|
||||
"name": "message",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "StructuredOutputv2-Io4Zq",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -65,18 +57,12 @@
|
|||
"dataType": "ParseDataFrame",
|
||||
"id": "ParseDataFrame-PwX09",
|
||||
"name": "text",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "ChatOutput-xjU9g",
|
||||
"inputTypes": [
|
||||
"Data",
|
||||
"DataFrame",
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Data", "DataFrame", "Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -94,16 +80,12 @@
|
|||
"dataType": "StructuredOutput",
|
||||
"id": "StructuredOutputv2-Io4Zq",
|
||||
"name": "structured_output_dataframe",
|
||||
"output_types": [
|
||||
"DataFrame"
|
||||
]
|
||||
"output_types": ["DataFrame"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "df",
|
||||
"id": "ParseDataFrame-PwX09",
|
||||
"inputTypes": [
|
||||
"DataFrame"
|
||||
],
|
||||
"inputTypes": ["DataFrame"],
|
||||
"type": "other"
|
||||
}
|
||||
},
|
||||
|
|
@ -120,10 +102,7 @@
|
|||
"data": {
|
||||
"id": "OpenAIModel-hx0nZ",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"LanguageModel",
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["LanguageModel", "Message"],
|
||||
"beta": false,
|
||||
"category": "models",
|
||||
"conditional_paths": [],
|
||||
|
|
@ -165,9 +144,7 @@
|
|||
"required_inputs": [],
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
},
|
||||
{
|
||||
|
|
@ -176,14 +153,10 @@
|
|||
"display_name": "Language Model",
|
||||
"method": "build_model",
|
||||
"name": "model_output",
|
||||
"required_inputs": [
|
||||
"api_key"
|
||||
],
|
||||
"required_inputs": ["api_key"],
|
||||
"selected": "LanguageModel",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"LanguageModel"
|
||||
],
|
||||
"types": ["LanguageModel"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -197,9 +170,7 @@
|
|||
"display_name": "OpenAI API Key",
|
||||
"dynamic": false,
|
||||
"info": "The OpenAI API Key to use for the OpenAI model.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"load_from_db": false,
|
||||
"name": "api_key",
|
||||
"password": true,
|
||||
|
|
@ -234,9 +205,7 @@
|
|||
"display_name": "Input",
|
||||
"dynamic": false,
|
||||
"info": "",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -418,9 +387,7 @@
|
|||
"display_name": "System Message",
|
||||
"dynamic": false,
|
||||
"info": "System message to pass to the model.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -505,9 +472,7 @@
|
|||
"data": {
|
||||
"id": "ChatOutput-xjU9g",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"category": "outputs",
|
||||
"conditional_paths": [],
|
||||
|
|
@ -544,9 +509,7 @@
|
|||
"name": "message",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -560,9 +523,7 @@
|
|||
"display_name": "Background Color",
|
||||
"dynamic": false,
|
||||
"info": "The background color of the icon.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -583,9 +544,7 @@
|
|||
"display_name": "Icon",
|
||||
"dynamic": false,
|
||||
"info": "The icon of the message.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -642,9 +601,7 @@
|
|||
"display_name": "Data Template",
|
||||
"dynamic": false,
|
||||
"info": "Template to convert Data to Text. If left empty, it will be dynamically set to the Data's text key.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -665,11 +622,7 @@
|
|||
"display_name": "Text",
|
||||
"dynamic": false,
|
||||
"info": "Message to be passed as output.",
|
||||
"input_types": [
|
||||
"Data",
|
||||
"DataFrame",
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Data", "DataFrame", "Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -693,10 +646,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Type of sender.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User"
|
||||
],
|
||||
"options": ["Machine", "User"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -713,9 +663,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Name of the sender.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -736,9 +684,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -777,9 +723,7 @@
|
|||
"display_name": "Text Color",
|
||||
"dynamic": false,
|
||||
"info": "The text color of the name",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -816,9 +760,7 @@
|
|||
"data": {
|
||||
"id": "ChatInput-Gb2ag",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"category": "inputs",
|
||||
"conditional_paths": [],
|
||||
|
|
@ -855,9 +797,7 @@
|
|||
"name": "message",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -871,9 +811,7 @@
|
|||
"display_name": "Background Color",
|
||||
"dynamic": false,
|
||||
"info": "The background color of the icon.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -894,9 +832,7 @@
|
|||
"display_name": "Icon",
|
||||
"dynamic": false,
|
||||
"info": "The icon of the message.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -927,7 +863,7 @@
|
|||
"show": true,
|
||||
"title_case": false,
|
||||
"type": "code",
|
||||
"value": "from langflow.base.data.utils import IMG_FILE_TYPES, TEXT_FILE_TYPES\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.inputs import BoolInput\nfrom langflow.io import (\n DropdownInput,\n FileInput,\n MessageTextInput,\n MultilineInput,\n Output,\n)\nfrom langflow.schema.message import Message\nfrom langflow.utils.constants import (\n MESSAGE_SENDER_AI,\n MESSAGE_SENDER_NAME_USER,\n MESSAGE_SENDER_USER,\n)\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"MessagesSquare\"\n name = \"ChatInput\"\n minimized = True\n\n inputs = [\n MultilineInput(\n name=\"input_value\",\n display_name=\"Text\",\n value=\"\",\n info=\"Message to be passed as input.\",\n input_types=[],\n ),\n BoolInput(\n name=\"should_store_message\",\n display_name=\"Store Messages\",\n info=\"Store the message in the history.\",\n value=True,\n advanced=True,\n ),\n DropdownInput(\n name=\"sender\",\n display_name=\"Sender Type\",\n options=[MESSAGE_SENDER_AI, MESSAGE_SENDER_USER],\n value=MESSAGE_SENDER_USER,\n info=\"Type of sender.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"sender_name\",\n display_name=\"Sender Name\",\n info=\"Name of the sender.\",\n value=MESSAGE_SENDER_NAME_USER,\n advanced=True,\n ),\n MessageTextInput(\n name=\"session_id\",\n display_name=\"Session ID\",\n info=\"The session ID of the chat. If empty, the current session ID parameter will be used.\",\n advanced=True,\n ),\n FileInput(\n name=\"files\",\n display_name=\"Files\",\n file_types=TEXT_FILE_TYPES + IMG_FILE_TYPES,\n info=\"Files to be sent with the message.\",\n advanced=True,\n is_list=True,\n ),\n MessageTextInput(\n name=\"background_color\",\n display_name=\"Background Color\",\n info=\"The background color of the icon.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"chat_icon\",\n display_name=\"Icon\",\n info=\"The icon of the message.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"text_color\",\n display_name=\"Text Color\",\n info=\"The text color of the name\",\n advanced=True,\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"message_response\"),\n ]\n\n async def message_response(self) -> Message:\n background_color = self.background_color\n text_color = self.text_color\n icon = self.chat_icon\n\n message = await Message.create(\n text=self.input_value,\n sender=self.sender,\n sender_name=self.sender_name,\n session_id=self.session_id,\n files=self.files,\n properties={\n \"background_color\": background_color,\n \"text_color\": text_color,\n \"icon\": icon,\n },\n )\n if self.session_id and isinstance(message, Message) and self.should_store_message:\n stored_message = await self.send_message(\n message,\n )\n self.message.value = stored_message\n message = stored_message\n\n self.status = message\n return message\n"
|
||||
"value": "from langflow.base.data.utils import IMG_FILE_TYPES, TEXT_FILE_TYPES\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.inputs import BoolInput\nfrom langflow.io import (\n DropdownInput,\n FileInput,\n MessageTextInput,\n MultilineInput,\n Output,\n)\nfrom langflow.schema.message import Message\nfrom langflow.utils.constants import (\n MESSAGE_SENDER_AI,\n MESSAGE_SENDER_NAME_USER,\n MESSAGE_SENDER_USER,\n)\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"MessagesSquare\"\n name = \"ChatInput\"\n minimized = True\n\n inputs = [\n MultilineInput(\n name=\"input_value\",\n display_name=\"Text\",\n value=\"\",\n info=\"Message to be passed as input.\",\n input_types=[],\n ),\n BoolInput(\n name=\"should_store_message\",\n display_name=\"Store Messages\",\n info=\"Store the message in the history.\",\n value=True,\n advanced=True,\n ),\n DropdownInput(\n name=\"sender\",\n display_name=\"Sender Type\",\n options=[MESSAGE_SENDER_AI, MESSAGE_SENDER_USER],\n value=MESSAGE_SENDER_USER,\n info=\"Type of sender.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"sender_name\",\n display_name=\"Sender Name\",\n info=\"Name of the sender.\",\n value=MESSAGE_SENDER_NAME_USER,\n advanced=True,\n ),\n MessageTextInput(\n name=\"session_id\",\n display_name=\"Session ID\",\n info=\"The session ID of the chat. If empty, the current session ID parameter will be used.\",\n advanced=True,\n ),\n FileInput(\n name=\"files\",\n display_name=\"Files\",\n file_types=TEXT_FILE_TYPES + IMG_FILE_TYPES,\n info=\"Files to be sent with the message.\",\n advanced=True,\n is_list=True,\n temp_file=True,\n ),\n MessageTextInput(\n name=\"background_color\",\n display_name=\"Background Color\",\n info=\"The background color of the icon.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"chat_icon\",\n display_name=\"Icon\",\n info=\"The icon of the message.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"text_color\",\n display_name=\"Text Color\",\n info=\"The text color of the name\",\n advanced=True,\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"message_response\"),\n ]\n\n async def message_response(self) -> Message:\n background_color = self.background_color\n text_color = self.text_color\n icon = self.chat_icon\n\n message = await Message.create(\n text=self.input_value,\n sender=self.sender,\n sender_name=self.sender_name,\n session_id=self.session_id,\n files=self.files,\n properties={\n \"background_color\": background_color,\n \"text_color\": text_color,\n \"icon\": icon,\n },\n )\n if self.session_id and isinstance(message, Message) and self.should_store_message:\n stored_message = await self.send_message(\n message,\n )\n self.message.value = stored_message\n message = stored_message\n\n self.status = message\n return message\n"
|
||||
},
|
||||
"files": {
|
||||
"_input_type": "FileInput",
|
||||
|
|
@ -967,6 +903,7 @@
|
|||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
"temp_file": true,
|
||||
"title_case": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "file",
|
||||
|
|
@ -1003,10 +940,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Type of sender.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User"
|
||||
],
|
||||
"options": ["Machine", "User"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -1023,9 +957,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Name of the sender.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1046,9 +978,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1087,9 +1017,7 @@
|
|||
"display_name": "Text Color",
|
||||
"dynamic": false,
|
||||
"info": "The text color of the name",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1180,10 +1108,7 @@
|
|||
"data": {
|
||||
"id": "StructuredOutputv2-Io4Zq",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Data",
|
||||
"DataFrame"
|
||||
],
|
||||
"base_classes": ["Data", "DataFrame"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -1213,9 +1138,7 @@
|
|||
"name": "structured_output",
|
||||
"selected": "Data",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Data"
|
||||
],
|
||||
"types": ["Data"],
|
||||
"value": "__UNDEFINED__"
|
||||
},
|
||||
{
|
||||
|
|
@ -1226,9 +1149,7 @@
|
|||
"name": "structured_output_dataframe",
|
||||
"selected": "DataFrame",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"DataFrame"
|
||||
],
|
||||
"types": ["DataFrame"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -1259,9 +1180,7 @@
|
|||
"display_name": "Input Message",
|
||||
"dynamic": false,
|
||||
"info": "The input message to the language model.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1282,9 +1201,7 @@
|
|||
"display_name": "Language Model",
|
||||
"dynamic": false,
|
||||
"info": "The language model to use to generate the structured output.",
|
||||
"input_types": [
|
||||
"LanguageModel"
|
||||
],
|
||||
"input_types": ["LanguageModel"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"name": "llm",
|
||||
|
|
@ -1417,9 +1334,7 @@
|
|||
"display_name": "Schema Name",
|
||||
"dynamic": false,
|
||||
"info": "Provide a name for the output data schema.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1440,9 +1355,7 @@
|
|||
"display_name": "Format Instructions",
|
||||
"dynamic": false,
|
||||
"info": "The instructions to the language model for formatting the output.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1481,9 +1394,7 @@
|
|||
"data": {
|
||||
"id": "ParseDataFrame-PwX09",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"category": "processing",
|
||||
"conditional_paths": [],
|
||||
|
|
@ -1492,11 +1403,7 @@
|
|||
"display_name": "Parse DataFrame",
|
||||
"documentation": "",
|
||||
"edited": false,
|
||||
"field_order": [
|
||||
"df",
|
||||
"template",
|
||||
"sep"
|
||||
],
|
||||
"field_order": ["df", "template", "sep"],
|
||||
"frozen": false,
|
||||
"icon": "braces",
|
||||
"key": "ParseDataFrame",
|
||||
|
|
@ -1514,9 +1421,7 @@
|
|||
"name": "text",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -1548,9 +1453,7 @@
|
|||
"display_name": "DataFrame",
|
||||
"dynamic": false,
|
||||
"info": "The DataFrame to convert to text rows.",
|
||||
"input_types": [
|
||||
"DataFrame"
|
||||
],
|
||||
"input_types": ["DataFrame"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"name": "df",
|
||||
|
|
@ -1589,9 +1492,7 @@
|
|||
"display_name": "Template",
|
||||
"dynamic": false,
|
||||
"info": "The template for formatting each row. Use placeholders matching column names in the DataFrame, for example '{col1}', '{col2}'.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1640,8 +1541,5 @@
|
|||
"is_component": false,
|
||||
"last_tested_version": "1.1.5",
|
||||
"name": "Financial Report Parser",
|
||||
"tags": [
|
||||
"chatbots",
|
||||
"content-generation"
|
||||
]
|
||||
}
|
||||
"tags": ["chatbots", "content-generation"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,16 +9,12 @@
|
|||
"dataType": "ChatInput",
|
||||
"id": "ChatInput-fifot",
|
||||
"name": "message",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "Agent-5rqMu",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -37,18 +33,12 @@
|
|||
"dataType": "Agent",
|
||||
"id": "Agent-5rqMu",
|
||||
"name": "response",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "ChatOutput-mXpv2",
|
||||
"inputTypes": [
|
||||
"Data",
|
||||
"DataFrame",
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Data", "DataFrame", "Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -67,16 +57,12 @@
|
|||
"dataType": "ComposioAPI",
|
||||
"id": "ComposioAPI-Z0Iiy",
|
||||
"name": "tools",
|
||||
"output_types": [
|
||||
"Tool"
|
||||
]
|
||||
"output_types": ["Tool"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "tools",
|
||||
"id": "Agent-5rqMu",
|
||||
"inputTypes": [
|
||||
"Tool"
|
||||
],
|
||||
"inputTypes": ["Tool"],
|
||||
"type": "other"
|
||||
}
|
||||
},
|
||||
|
|
@ -92,9 +78,7 @@
|
|||
"data": {
|
||||
"id": "Agent-5rqMu",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"category": "agents",
|
||||
"conditional_paths": [],
|
||||
|
|
@ -148,9 +132,7 @@
|
|||
"name": "response",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -182,9 +164,7 @@
|
|||
"display_name": "Agent Description [Deprecated]",
|
||||
"dynamic": false,
|
||||
"info": "The description of the agent. This is only used when in Tool Mode. Defaults to 'A helpful assistant with access to the following tools:' and tools are added dynamically. This feature is deprecated and will be removed in future versions.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -238,9 +218,7 @@
|
|||
"display_name": "OpenAI API Key",
|
||||
"dynamic": false,
|
||||
"info": "The OpenAI API Key to use for the OpenAI model.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"load_from_db": true,
|
||||
"name": "api_key",
|
||||
"password": true,
|
||||
|
|
@ -293,9 +271,7 @@
|
|||
"display_name": "Input",
|
||||
"dynamic": false,
|
||||
"info": "The input provided by the user for the agent to process.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -394,9 +370,7 @@
|
|||
"display_name": "External Memory",
|
||||
"dynamic": false,
|
||||
"info": "Retrieve messages from an external memory. If empty, it will use the Langflow tables.",
|
||||
"input_types": [
|
||||
"Memory"
|
||||
],
|
||||
"input_types": ["Memory"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"name": "memory",
|
||||
|
|
@ -501,10 +475,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Order of the messages.",
|
||||
"name": "order",
|
||||
"options": [
|
||||
"Ascending",
|
||||
"Descending"
|
||||
],
|
||||
"options": ["Ascending", "Descending"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -542,11 +513,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Filter by sender type.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User",
|
||||
"Machine and User"
|
||||
],
|
||||
"options": ["Machine", "User", "Machine and User"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -563,9 +530,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Filter by sender name.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -586,9 +551,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -609,9 +572,7 @@
|
|||
"display_name": "Agent Instructions",
|
||||
"dynamic": false,
|
||||
"info": "System Prompt: Initial instructions and context provided to guide the agent's behavior.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -661,9 +622,7 @@
|
|||
"display_name": "Template",
|
||||
"dynamic": false,
|
||||
"info": "The template to use for formatting the data. It can contain the keys {text}, {sender} or any other key in the message data.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -703,9 +662,7 @@
|
|||
"display_name": "Tools",
|
||||
"dynamic": false,
|
||||
"info": "These are the tools that the agent can use to help with tasks.",
|
||||
"input_types": [
|
||||
"Tool"
|
||||
],
|
||||
"input_types": ["Tool"],
|
||||
"list": true,
|
||||
"list_add_label": "Add More",
|
||||
"name": "tools",
|
||||
|
|
@ -758,9 +715,7 @@
|
|||
"data": {
|
||||
"id": "ChatInput-fifot",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"category": "inputs",
|
||||
"conditional_paths": [],
|
||||
|
|
@ -797,9 +752,7 @@
|
|||
"name": "message",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -813,9 +766,7 @@
|
|||
"display_name": "Background Color",
|
||||
"dynamic": false,
|
||||
"info": "The background color of the icon.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -836,9 +787,7 @@
|
|||
"display_name": "Icon",
|
||||
"dynamic": false,
|
||||
"info": "The icon of the message.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -869,7 +818,7 @@
|
|||
"show": true,
|
||||
"title_case": false,
|
||||
"type": "code",
|
||||
"value": "from langflow.base.data.utils import IMG_FILE_TYPES, TEXT_FILE_TYPES\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.inputs import BoolInput\nfrom langflow.io import (\n DropdownInput,\n FileInput,\n MessageTextInput,\n MultilineInput,\n Output,\n)\nfrom langflow.schema.message import Message\nfrom langflow.utils.constants import (\n MESSAGE_SENDER_AI,\n MESSAGE_SENDER_NAME_USER,\n MESSAGE_SENDER_USER,\n)\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"MessagesSquare\"\n name = \"ChatInput\"\n minimized = True\n\n inputs = [\n MultilineInput(\n name=\"input_value\",\n display_name=\"Text\",\n value=\"\",\n info=\"Message to be passed as input.\",\n input_types=[],\n ),\n BoolInput(\n name=\"should_store_message\",\n display_name=\"Store Messages\",\n info=\"Store the message in the history.\",\n value=True,\n advanced=True,\n ),\n DropdownInput(\n name=\"sender\",\n display_name=\"Sender Type\",\n options=[MESSAGE_SENDER_AI, MESSAGE_SENDER_USER],\n value=MESSAGE_SENDER_USER,\n info=\"Type of sender.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"sender_name\",\n display_name=\"Sender Name\",\n info=\"Name of the sender.\",\n value=MESSAGE_SENDER_NAME_USER,\n advanced=True,\n ),\n MessageTextInput(\n name=\"session_id\",\n display_name=\"Session ID\",\n info=\"The session ID of the chat. If empty, the current session ID parameter will be used.\",\n advanced=True,\n ),\n FileInput(\n name=\"files\",\n display_name=\"Files\",\n file_types=TEXT_FILE_TYPES + IMG_FILE_TYPES,\n info=\"Files to be sent with the message.\",\n advanced=True,\n is_list=True,\n ),\n MessageTextInput(\n name=\"background_color\",\n display_name=\"Background Color\",\n info=\"The background color of the icon.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"chat_icon\",\n display_name=\"Icon\",\n info=\"The icon of the message.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"text_color\",\n display_name=\"Text Color\",\n info=\"The text color of the name\",\n advanced=True,\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"message_response\"),\n ]\n\n async def message_response(self) -> Message:\n background_color = self.background_color\n text_color = self.text_color\n icon = self.chat_icon\n\n message = await Message.create(\n text=self.input_value,\n sender=self.sender,\n sender_name=self.sender_name,\n session_id=self.session_id,\n files=self.files,\n properties={\n \"background_color\": background_color,\n \"text_color\": text_color,\n \"icon\": icon,\n },\n )\n if self.session_id and isinstance(message, Message) and self.should_store_message:\n stored_message = await self.send_message(\n message,\n )\n self.message.value = stored_message\n message = stored_message\n\n self.status = message\n return message\n"
|
||||
"value": "from langflow.base.data.utils import IMG_FILE_TYPES, TEXT_FILE_TYPES\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.inputs import BoolInput\nfrom langflow.io import (\n DropdownInput,\n FileInput,\n MessageTextInput,\n MultilineInput,\n Output,\n)\nfrom langflow.schema.message import Message\nfrom langflow.utils.constants import (\n MESSAGE_SENDER_AI,\n MESSAGE_SENDER_NAME_USER,\n MESSAGE_SENDER_USER,\n)\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"MessagesSquare\"\n name = \"ChatInput\"\n minimized = True\n\n inputs = [\n MultilineInput(\n name=\"input_value\",\n display_name=\"Text\",\n value=\"\",\n info=\"Message to be passed as input.\",\n input_types=[],\n ),\n BoolInput(\n name=\"should_store_message\",\n display_name=\"Store Messages\",\n info=\"Store the message in the history.\",\n value=True,\n advanced=True,\n ),\n DropdownInput(\n name=\"sender\",\n display_name=\"Sender Type\",\n options=[MESSAGE_SENDER_AI, MESSAGE_SENDER_USER],\n value=MESSAGE_SENDER_USER,\n info=\"Type of sender.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"sender_name\",\n display_name=\"Sender Name\",\n info=\"Name of the sender.\",\n value=MESSAGE_SENDER_NAME_USER,\n advanced=True,\n ),\n MessageTextInput(\n name=\"session_id\",\n display_name=\"Session ID\",\n info=\"The session ID of the chat. If empty, the current session ID parameter will be used.\",\n advanced=True,\n ),\n FileInput(\n name=\"files\",\n display_name=\"Files\",\n file_types=TEXT_FILE_TYPES + IMG_FILE_TYPES,\n info=\"Files to be sent with the message.\",\n advanced=True,\n is_list=True,\n temp_file=True,\n ),\n MessageTextInput(\n name=\"background_color\",\n display_name=\"Background Color\",\n info=\"The background color of the icon.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"chat_icon\",\n display_name=\"Icon\",\n info=\"The icon of the message.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"text_color\",\n display_name=\"Text Color\",\n info=\"The text color of the name\",\n advanced=True,\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"message_response\"),\n ]\n\n async def message_response(self) -> Message:\n background_color = self.background_color\n text_color = self.text_color\n icon = self.chat_icon\n\n message = await Message.create(\n text=self.input_value,\n sender=self.sender,\n sender_name=self.sender_name,\n session_id=self.session_id,\n files=self.files,\n properties={\n \"background_color\": background_color,\n \"text_color\": text_color,\n \"icon\": icon,\n },\n )\n if self.session_id and isinstance(message, Message) and self.should_store_message:\n stored_message = await self.send_message(\n message,\n )\n self.message.value = stored_message\n message = stored_message\n\n self.status = message\n return message\n"
|
||||
},
|
||||
"files": {
|
||||
"_input_type": "FileInput",
|
||||
|
|
@ -909,6 +858,7 @@
|
|||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
"temp_file": true,
|
||||
"title_case": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "file",
|
||||
|
|
@ -945,10 +895,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Type of sender.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User"
|
||||
],
|
||||
"options": ["Machine", "User"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -965,9 +912,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Name of the sender.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -988,9 +933,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1029,9 +972,7 @@
|
|||
"display_name": "Text Color",
|
||||
"dynamic": false,
|
||||
"info": "The text color of the name",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1069,9 +1010,7 @@
|
|||
"data": {
|
||||
"id": "ChatOutput-mXpv2",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"category": "outputs",
|
||||
"conditional_paths": [],
|
||||
|
|
@ -1108,9 +1047,7 @@
|
|||
"name": "message",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -1124,9 +1061,7 @@
|
|||
"display_name": "Background Color",
|
||||
"dynamic": false,
|
||||
"info": "The background color of the icon.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1147,9 +1082,7 @@
|
|||
"display_name": "Icon",
|
||||
"dynamic": false,
|
||||
"info": "The icon of the message.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1206,9 +1139,7 @@
|
|||
"display_name": "Data Template",
|
||||
"dynamic": false,
|
||||
"info": "Template to convert Data to Text. If left empty, it will be dynamically set to the Data's text key.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1229,11 +1160,7 @@
|
|||
"display_name": "Text",
|
||||
"dynamic": false,
|
||||
"info": "Message to be passed as output.",
|
||||
"input_types": [
|
||||
"Data",
|
||||
"DataFrame",
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Data", "DataFrame", "Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1257,10 +1184,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Type of sender.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User"
|
||||
],
|
||||
"options": ["Machine", "User"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -1277,9 +1201,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Name of the sender.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1300,9 +1222,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1341,9 +1261,7 @@
|
|||
"display_name": "Text Color",
|
||||
"dynamic": false,
|
||||
"info": "The text color of the name",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1410,9 +1328,7 @@
|
|||
"display_name": "Composio Tools",
|
||||
"id": "ComposioAPI-Z0Iiy",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Tool"
|
||||
],
|
||||
"base_classes": ["Tool"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -1448,9 +1364,7 @@
|
|||
"required_inputs": null,
|
||||
"selected": "Tool",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Tool"
|
||||
],
|
||||
"types": ["Tool"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -1497,9 +1411,7 @@
|
|||
"tool_mode": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "str",
|
||||
"value": [
|
||||
"GMAIL_GET_PEOPLE"
|
||||
]
|
||||
"value": ["GMAIL_GET_PEOPLE"]
|
||||
},
|
||||
"api_key": {
|
||||
"_input_type": "SecretStrInput",
|
||||
|
|
@ -1507,9 +1419,7 @@
|
|||
"display_name": "Composio API Key",
|
||||
"dynamic": false,
|
||||
"info": "Refer to https://docs.composio.dev/faq/api_key/api_key",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"load_from_db": true,
|
||||
"name": "api_key",
|
||||
"password": true,
|
||||
|
|
@ -1527,9 +1437,7 @@
|
|||
"display_name": "App Credentials",
|
||||
"dynamic": true,
|
||||
"info": "Credentials for app authentication (API Key, Password, etc)",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"load_from_db": false,
|
||||
"name": "app_credentials",
|
||||
"password": true,
|
||||
|
|
@ -1747,9 +1655,7 @@
|
|||
"display_name": "Entity ID",
|
||||
"dynamic": false,
|
||||
"info": "",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1770,9 +1676,7 @@
|
|||
"display_name": "Username",
|
||||
"dynamic": true,
|
||||
"info": "Username for Basic authentication",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1818,7 +1722,5 @@
|
|||
"id": "0473161e-ca7e-413c-9113-e98a142313ed",
|
||||
"is_component": false,
|
||||
"name": "Gmail Agent",
|
||||
"tags": [
|
||||
"agents"
|
||||
]
|
||||
}
|
||||
"tags": ["agents"]
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -9,16 +9,12 @@
|
|||
"dataType": "StructuredOutputComponent",
|
||||
"id": "StructuredOutputComponent-XYoUc",
|
||||
"name": "structured_output",
|
||||
"output_types": [
|
||||
"Data"
|
||||
]
|
||||
"output_types": ["Data"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "data",
|
||||
"id": "ParseData-HzweJ",
|
||||
"inputTypes": [
|
||||
"Data"
|
||||
],
|
||||
"inputTypes": ["Data"],
|
||||
"type": "other"
|
||||
}
|
||||
},
|
||||
|
|
@ -37,18 +33,12 @@
|
|||
"dataType": "ParseData",
|
||||
"id": "ParseData-HzweJ",
|
||||
"name": "text",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "ChatOutput-xQxLm",
|
||||
"inputTypes": [
|
||||
"Data",
|
||||
"DataFrame",
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Data", "DataFrame", "Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -66,16 +56,12 @@
|
|||
"dataType": "ChatInput",
|
||||
"id": "ChatInput-rAWlE",
|
||||
"name": "message",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "OpenAIModel-cqeNw",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -93,16 +79,12 @@
|
|||
"dataType": "Prompt",
|
||||
"id": "Prompt-AzK6t",
|
||||
"name": "prompt",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "system_message",
|
||||
"id": "OpenAIModel-cqeNw",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -120,16 +102,12 @@
|
|||
"dataType": "OpenAIModel",
|
||||
"id": "OpenAIModel-cqeNw",
|
||||
"name": "text_output",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "StructuredOutputComponent-XYoUc",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -147,16 +125,12 @@
|
|||
"dataType": "OpenAIModel",
|
||||
"id": "OpenAIModel-cqeNw",
|
||||
"name": "model_output",
|
||||
"output_types": [
|
||||
"LanguageModel"
|
||||
]
|
||||
"output_types": ["LanguageModel"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "llm",
|
||||
"id": "StructuredOutputComponent-XYoUc",
|
||||
"inputTypes": [
|
||||
"LanguageModel"
|
||||
],
|
||||
"inputTypes": ["LanguageModel"],
|
||||
"type": "other"
|
||||
}
|
||||
},
|
||||
|
|
@ -175,9 +149,7 @@
|
|||
"display_name": "Chat Input",
|
||||
"id": "ChatInput-rAWlE",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -211,9 +183,7 @@
|
|||
"name": "message",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -226,9 +196,7 @@
|
|||
"display_name": "Background Color",
|
||||
"dynamic": false,
|
||||
"info": "The background color of the icon.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "background_color",
|
||||
|
|
@ -248,9 +216,7 @@
|
|||
"display_name": "Icon",
|
||||
"dynamic": false,
|
||||
"info": "The icon of the message.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "chat_icon",
|
||||
|
|
@ -280,7 +246,7 @@
|
|||
"show": true,
|
||||
"title_case": false,
|
||||
"type": "code",
|
||||
"value": "from langflow.base.data.utils import IMG_FILE_TYPES, TEXT_FILE_TYPES\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.inputs import BoolInput\nfrom langflow.io import (\n DropdownInput,\n FileInput,\n MessageTextInput,\n MultilineInput,\n Output,\n)\nfrom langflow.schema.message import Message\nfrom langflow.utils.constants import (\n MESSAGE_SENDER_AI,\n MESSAGE_SENDER_NAME_USER,\n MESSAGE_SENDER_USER,\n)\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"MessagesSquare\"\n name = \"ChatInput\"\n minimized = True\n\n inputs = [\n MultilineInput(\n name=\"input_value\",\n display_name=\"Text\",\n value=\"\",\n info=\"Message to be passed as input.\",\n input_types=[],\n ),\n BoolInput(\n name=\"should_store_message\",\n display_name=\"Store Messages\",\n info=\"Store the message in the history.\",\n value=True,\n advanced=True,\n ),\n DropdownInput(\n name=\"sender\",\n display_name=\"Sender Type\",\n options=[MESSAGE_SENDER_AI, MESSAGE_SENDER_USER],\n value=MESSAGE_SENDER_USER,\n info=\"Type of sender.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"sender_name\",\n display_name=\"Sender Name\",\n info=\"Name of the sender.\",\n value=MESSAGE_SENDER_NAME_USER,\n advanced=True,\n ),\n MessageTextInput(\n name=\"session_id\",\n display_name=\"Session ID\",\n info=\"The session ID of the chat. If empty, the current session ID parameter will be used.\",\n advanced=True,\n ),\n FileInput(\n name=\"files\",\n display_name=\"Files\",\n file_types=TEXT_FILE_TYPES + IMG_FILE_TYPES,\n info=\"Files to be sent with the message.\",\n advanced=True,\n is_list=True,\n ),\n MessageTextInput(\n name=\"background_color\",\n display_name=\"Background Color\",\n info=\"The background color of the icon.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"chat_icon\",\n display_name=\"Icon\",\n info=\"The icon of the message.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"text_color\",\n display_name=\"Text Color\",\n info=\"The text color of the name\",\n advanced=True,\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"message_response\"),\n ]\n\n async def message_response(self) -> Message:\n background_color = self.background_color\n text_color = self.text_color\n icon = self.chat_icon\n\n message = await Message.create(\n text=self.input_value,\n sender=self.sender,\n sender_name=self.sender_name,\n session_id=self.session_id,\n files=self.files,\n properties={\n \"background_color\": background_color,\n \"text_color\": text_color,\n \"icon\": icon,\n },\n )\n if self.session_id and isinstance(message, Message) and self.should_store_message:\n stored_message = await self.send_message(\n message,\n )\n self.message.value = stored_message\n message = stored_message\n\n self.status = message\n return message\n"
|
||||
"value": "from langflow.base.data.utils import IMG_FILE_TYPES, TEXT_FILE_TYPES\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.inputs import BoolInput\nfrom langflow.io import (\n DropdownInput,\n FileInput,\n MessageTextInput,\n MultilineInput,\n Output,\n)\nfrom langflow.schema.message import Message\nfrom langflow.utils.constants import (\n MESSAGE_SENDER_AI,\n MESSAGE_SENDER_NAME_USER,\n MESSAGE_SENDER_USER,\n)\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"MessagesSquare\"\n name = \"ChatInput\"\n minimized = True\n\n inputs = [\n MultilineInput(\n name=\"input_value\",\n display_name=\"Text\",\n value=\"\",\n info=\"Message to be passed as input.\",\n input_types=[],\n ),\n BoolInput(\n name=\"should_store_message\",\n display_name=\"Store Messages\",\n info=\"Store the message in the history.\",\n value=True,\n advanced=True,\n ),\n DropdownInput(\n name=\"sender\",\n display_name=\"Sender Type\",\n options=[MESSAGE_SENDER_AI, MESSAGE_SENDER_USER],\n value=MESSAGE_SENDER_USER,\n info=\"Type of sender.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"sender_name\",\n display_name=\"Sender Name\",\n info=\"Name of the sender.\",\n value=MESSAGE_SENDER_NAME_USER,\n advanced=True,\n ),\n MessageTextInput(\n name=\"session_id\",\n display_name=\"Session ID\",\n info=\"The session ID of the chat. If empty, the current session ID parameter will be used.\",\n advanced=True,\n ),\n FileInput(\n name=\"files\",\n display_name=\"Files\",\n file_types=TEXT_FILE_TYPES + IMG_FILE_TYPES,\n info=\"Files to be sent with the message.\",\n advanced=True,\n is_list=True,\n temp_file=True,\n ),\n MessageTextInput(\n name=\"background_color\",\n display_name=\"Background Color\",\n info=\"The background color of the icon.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"chat_icon\",\n display_name=\"Icon\",\n info=\"The icon of the message.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"text_color\",\n display_name=\"Text Color\",\n info=\"The text color of the name\",\n advanced=True,\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"message_response\"),\n ]\n\n async def message_response(self) -> Message:\n background_color = self.background_color\n text_color = self.text_color\n icon = self.chat_icon\n\n message = await Message.create(\n text=self.input_value,\n sender=self.sender,\n sender_name=self.sender_name,\n session_id=self.session_id,\n files=self.files,\n properties={\n \"background_color\": background_color,\n \"text_color\": text_color,\n \"icon\": icon,\n },\n )\n if self.session_id and isinstance(message, Message) and self.should_store_message:\n stored_message = await self.send_message(\n message,\n )\n self.message.value = stored_message\n message = stored_message\n\n self.status = message\n return message\n"
|
||||
},
|
||||
"files": {
|
||||
"_input_type": "FileInput",
|
||||
|
|
@ -319,6 +285,7 @@
|
|||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
"temp_file": true,
|
||||
"title_case": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "file",
|
||||
|
|
@ -353,10 +320,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Type of sender.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User"
|
||||
],
|
||||
"options": ["Machine", "User"],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
|
|
@ -372,9 +336,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Name of the sender.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "sender_name",
|
||||
|
|
@ -394,9 +356,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "session_id",
|
||||
|
|
@ -432,9 +392,7 @@
|
|||
"display_name": "Text Color",
|
||||
"dynamic": false,
|
||||
"info": "The text color of the name",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "text_color",
|
||||
|
|
@ -478,9 +436,7 @@
|
|||
"display_name": "Chat Output",
|
||||
"id": "ChatOutput-xQxLm",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -514,9 +470,7 @@
|
|||
"name": "message",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -529,9 +483,7 @@
|
|||
"display_name": "Background Color",
|
||||
"dynamic": false,
|
||||
"info": "The background color of the icon.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "background_color",
|
||||
|
|
@ -551,9 +503,7 @@
|
|||
"display_name": "Icon",
|
||||
"dynamic": false,
|
||||
"info": "The icon of the message.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "chat_icon",
|
||||
|
|
@ -609,9 +559,7 @@
|
|||
"display_name": "Data Template",
|
||||
"dynamic": false,
|
||||
"info": "Template to convert Data to Text. If left empty, it will be dynamically set to the Data's text key.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "data_template",
|
||||
|
|
@ -631,11 +579,7 @@
|
|||
"display_name": "Text",
|
||||
"dynamic": false,
|
||||
"info": "Message to be passed as output.",
|
||||
"input_types": [
|
||||
"Data",
|
||||
"DataFrame",
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Data", "DataFrame", "Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "input_value",
|
||||
|
|
@ -656,10 +600,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Type of sender.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User"
|
||||
],
|
||||
"options": ["Machine", "User"],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
|
|
@ -675,9 +616,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Name of the sender.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "sender_name",
|
||||
|
|
@ -697,9 +636,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "session_id",
|
||||
|
|
@ -735,9 +672,7 @@
|
|||
"display_name": "Text Color",
|
||||
"dynamic": false,
|
||||
"info": "The text color of the name",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "text_color",
|
||||
|
|
@ -816,9 +751,7 @@
|
|||
"display_name": "Structured Output",
|
||||
"id": "StructuredOutputComponent-XYoUc",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Data"
|
||||
],
|
||||
"base_classes": ["Data"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -846,9 +779,7 @@
|
|||
"method": "build_structured_output",
|
||||
"name": "structured_output",
|
||||
"selected": "Data",
|
||||
"types": [
|
||||
"Data"
|
||||
],
|
||||
"types": ["Data"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -879,9 +810,7 @@
|
|||
"display_name": "Input message",
|
||||
"dynamic": false,
|
||||
"info": "",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "input_value",
|
||||
|
|
@ -901,9 +830,7 @@
|
|||
"display_name": "Language Model",
|
||||
"dynamic": false,
|
||||
"info": "The language model to use to generate the structured output.",
|
||||
"input_types": [
|
||||
"LanguageModel"
|
||||
],
|
||||
"input_types": ["LanguageModel"],
|
||||
"list": false,
|
||||
"name": "llm",
|
||||
"placeholder": "",
|
||||
|
|
@ -1047,9 +974,7 @@
|
|||
"data": {
|
||||
"id": "ParseData-HzweJ",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -1057,11 +982,7 @@
|
|||
"display_name": "Parse Data",
|
||||
"documentation": "",
|
||||
"edited": false,
|
||||
"field_order": [
|
||||
"data",
|
||||
"template",
|
||||
"sep"
|
||||
],
|
||||
"field_order": ["data", "template", "sep"],
|
||||
"frozen": false,
|
||||
"icon": "message-square",
|
||||
"legacy": false,
|
||||
|
|
@ -1079,9 +1000,7 @@
|
|||
"name": "text",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
},
|
||||
{
|
||||
|
|
@ -1092,9 +1011,7 @@
|
|||
"name": "data_list",
|
||||
"selected": "Data",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Data"
|
||||
],
|
||||
"types": ["Data"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -1125,9 +1042,7 @@
|
|||
"display_name": "Data",
|
||||
"dynamic": false,
|
||||
"info": "The data to convert to text.",
|
||||
"input_types": [
|
||||
"Data"
|
||||
],
|
||||
"input_types": ["Data"],
|
||||
"list": true,
|
||||
"name": "data",
|
||||
"placeholder": "",
|
||||
|
|
@ -1163,9 +1078,7 @@
|
|||
"display_name": "Template",
|
||||
"dynamic": false,
|
||||
"info": "The template to use for formatting the data. It can contain the keys {text}, {data} or any other key in the Data.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"multiline": true,
|
||||
|
|
@ -1210,9 +1123,7 @@
|
|||
"display_name": "Prompt",
|
||||
"id": "Prompt-AzK6t",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {
|
||||
|
|
@ -1222,9 +1133,7 @@
|
|||
"display_name": "Prompt",
|
||||
"documentation": "",
|
||||
"edited": false,
|
||||
"field_order": [
|
||||
"template"
|
||||
],
|
||||
"field_order": ["template"],
|
||||
"frozen": false,
|
||||
"icon": "prompts",
|
||||
"legacy": false,
|
||||
|
|
@ -1240,9 +1149,7 @@
|
|||
"name": "prompt",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -1291,9 +1198,7 @@
|
|||
"display_name": "Tool Placeholder",
|
||||
"dynamic": false,
|
||||
"info": "A placeholder input for tool mode.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "tool_placeholder",
|
||||
|
|
@ -1335,10 +1240,7 @@
|
|||
"data": {
|
||||
"id": "OpenAIModel-cqeNw",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"LanguageModel",
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["LanguageModel", "Message"],
|
||||
"beta": false,
|
||||
"category": "models",
|
||||
"conditional_paths": [],
|
||||
|
|
@ -1377,9 +1279,7 @@
|
|||
"required_inputs": [],
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
},
|
||||
{
|
||||
|
|
@ -1388,14 +1288,10 @@
|
|||
"display_name": "Language Model",
|
||||
"method": "build_model",
|
||||
"name": "model_output",
|
||||
"required_inputs": [
|
||||
"api_key"
|
||||
],
|
||||
"required_inputs": ["api_key"],
|
||||
"selected": "LanguageModel",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"LanguageModel"
|
||||
],
|
||||
"types": ["LanguageModel"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -1409,9 +1305,7 @@
|
|||
"display_name": "OpenAI API Key",
|
||||
"dynamic": false,
|
||||
"info": "The OpenAI API Key to use for the OpenAI model.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"load_from_db": true,
|
||||
"name": "api_key",
|
||||
"password": true,
|
||||
|
|
@ -1446,9 +1340,7 @@
|
|||
"display_name": "Input",
|
||||
"dynamic": false,
|
||||
"info": "",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1630,9 +1522,7 @@
|
|||
"display_name": "System Message",
|
||||
"dynamic": false,
|
||||
"info": "System message to pass to the model.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1728,7 +1618,5 @@
|
|||
"is_component": false,
|
||||
"last_tested_version": "1.0.19.post2",
|
||||
"name": "Image Sentiment Analysis",
|
||||
"tags": [
|
||||
"classification"
|
||||
]
|
||||
}
|
||||
"tags": ["classification"]
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -9,16 +9,12 @@
|
|||
"dataType": "Prompt",
|
||||
"id": "Prompt-WRaed",
|
||||
"name": "prompt",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "system_prompt",
|
||||
"id": "Agent-IDDA1",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -37,16 +33,12 @@
|
|||
"dataType": "needle",
|
||||
"id": "needle-nk3Lq",
|
||||
"name": "component_as_tool",
|
||||
"output_types": [
|
||||
"Tool"
|
||||
]
|
||||
"output_types": ["Tool"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "tools",
|
||||
"id": "Agent-IDDA1",
|
||||
"inputTypes": [
|
||||
"Tool"
|
||||
],
|
||||
"inputTypes": ["Tool"],
|
||||
"type": "other"
|
||||
}
|
||||
},
|
||||
|
|
@ -65,16 +57,12 @@
|
|||
"dataType": "ChatInput",
|
||||
"id": "ChatInput-V0cjZ",
|
||||
"name": "message",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "Agent-IDDA1",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -91,18 +79,12 @@
|
|||
"dataType": "Agent",
|
||||
"id": "Agent-IDDA1",
|
||||
"name": "response",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "ChatOutput-Ftr5v",
|
||||
"inputTypes": [
|
||||
"Data",
|
||||
"DataFrame",
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Data", "DataFrame", "Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -147,9 +129,7 @@
|
|||
"data": {
|
||||
"id": "Prompt-WRaed",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {
|
||||
|
|
@ -160,10 +140,7 @@
|
|||
"documentation": "",
|
||||
"edited": false,
|
||||
"error": null,
|
||||
"field_order": [
|
||||
"template",
|
||||
"tool_placeholder"
|
||||
],
|
||||
"field_order": ["template", "tool_placeholder"],
|
||||
"frozen": false,
|
||||
"full_path": null,
|
||||
"icon": "prompts",
|
||||
|
|
@ -184,9 +161,7 @@
|
|||
"name": "prompt",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -235,9 +210,7 @@
|
|||
"display_name": "Tool Placeholder",
|
||||
"dynamic": false,
|
||||
"info": "A placeholder input for tool mode.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -275,9 +248,7 @@
|
|||
"data": {
|
||||
"id": "ChatOutput-Ftr5v",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -312,9 +283,7 @@
|
|||
"name": "message",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -327,9 +296,7 @@
|
|||
"display_name": "Background Color",
|
||||
"dynamic": false,
|
||||
"info": "The background color of the icon.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -350,9 +317,7 @@
|
|||
"display_name": "Icon",
|
||||
"dynamic": false,
|
||||
"info": "The icon of the message.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -409,9 +374,7 @@
|
|||
"display_name": "Data Template",
|
||||
"dynamic": false,
|
||||
"info": "Template to convert Data to Text. If left empty, it will be dynamically set to the Data's text key.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -432,11 +395,7 @@
|
|||
"display_name": "Text",
|
||||
"dynamic": false,
|
||||
"info": "Message to be passed as output.",
|
||||
"input_types": [
|
||||
"Data",
|
||||
"DataFrame",
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Data", "DataFrame", "Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -460,10 +419,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Type of sender.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User"
|
||||
],
|
||||
"options": ["Machine", "User"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -480,9 +436,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Name of the sender.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -503,9 +457,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -544,9 +496,7 @@
|
|||
"display_name": "Text Color",
|
||||
"dynamic": false,
|
||||
"info": "The text color of the name",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -639,9 +589,7 @@
|
|||
"data": {
|
||||
"id": "needle-nk3Lq",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"category": "needle",
|
||||
"conditional_paths": [],
|
||||
|
|
@ -674,9 +622,7 @@
|
|||
"required_inputs": null,
|
||||
"selected": "Tool",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Tool"
|
||||
],
|
||||
"types": ["Tool"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -708,9 +654,7 @@
|
|||
"display_name": "Collection ID",
|
||||
"dynamic": false,
|
||||
"info": "The ID of the Needle collection.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -731,9 +675,7 @@
|
|||
"display_name": "Needle API Key",
|
||||
"dynamic": false,
|
||||
"info": "Your Needle API key.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"load_from_db": false,
|
||||
"name": "needle_api_key",
|
||||
"password": true,
|
||||
|
|
@ -750,9 +692,7 @@
|
|||
"display_name": "User Query",
|
||||
"dynamic": false,
|
||||
"info": "Enter your question here. In tool mode, you can also specify top_k parameter (min: 20).",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -792,10 +732,7 @@
|
|||
"description": "Modify tool names and descriptions to help agents understand when to use each tool.",
|
||||
"field_parsers": {
|
||||
"commands": "commands",
|
||||
"name": [
|
||||
"snake_case",
|
||||
"no_blank"
|
||||
]
|
||||
"name": ["snake_case", "no_blank"]
|
||||
},
|
||||
"hide_options": true
|
||||
},
|
||||
|
|
@ -865,9 +802,7 @@
|
|||
{
|
||||
"description": "run(collection_id: Message, needle_api_key: Message, query: Message, top_k: FieldTypes.INTEGER) - A retriever that uses the Needle API to search collections.",
|
||||
"name": "needle-run",
|
||||
"tags": [
|
||||
"needle-run"
|
||||
]
|
||||
"tags": ["needle-run"]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
@ -911,9 +846,7 @@
|
|||
"data": {
|
||||
"id": "ChatInput-V0cjZ",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"category": "inputs",
|
||||
"conditional_paths": [],
|
||||
|
|
@ -949,9 +882,7 @@
|
|||
"name": "message",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -965,9 +896,7 @@
|
|||
"display_name": "Background Color",
|
||||
"dynamic": false,
|
||||
"info": "The background color of the icon.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -988,9 +917,7 @@
|
|||
"display_name": "Icon",
|
||||
"dynamic": false,
|
||||
"info": "The icon of the message.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1021,7 +948,7 @@
|
|||
"show": true,
|
||||
"title_case": false,
|
||||
"type": "code",
|
||||
"value": "from langflow.base.data.utils import IMG_FILE_TYPES, TEXT_FILE_TYPES\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.inputs import BoolInput\nfrom langflow.io import (\n DropdownInput,\n FileInput,\n MessageTextInput,\n MultilineInput,\n Output,\n)\nfrom langflow.schema.message import Message\nfrom langflow.utils.constants import (\n MESSAGE_SENDER_AI,\n MESSAGE_SENDER_NAME_USER,\n MESSAGE_SENDER_USER,\n)\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"MessagesSquare\"\n name = \"ChatInput\"\n minimized = True\n\n inputs = [\n MultilineInput(\n name=\"input_value\",\n display_name=\"Text\",\n value=\"\",\n info=\"Message to be passed as input.\",\n input_types=[],\n ),\n BoolInput(\n name=\"should_store_message\",\n display_name=\"Store Messages\",\n info=\"Store the message in the history.\",\n value=True,\n advanced=True,\n ),\n DropdownInput(\n name=\"sender\",\n display_name=\"Sender Type\",\n options=[MESSAGE_SENDER_AI, MESSAGE_SENDER_USER],\n value=MESSAGE_SENDER_USER,\n info=\"Type of sender.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"sender_name\",\n display_name=\"Sender Name\",\n info=\"Name of the sender.\",\n value=MESSAGE_SENDER_NAME_USER,\n advanced=True,\n ),\n MessageTextInput(\n name=\"session_id\",\n display_name=\"Session ID\",\n info=\"The session ID of the chat. If empty, the current session ID parameter will be used.\",\n advanced=True,\n ),\n FileInput(\n name=\"files\",\n display_name=\"Files\",\n file_types=TEXT_FILE_TYPES + IMG_FILE_TYPES,\n info=\"Files to be sent with the message.\",\n advanced=True,\n is_list=True,\n ),\n MessageTextInput(\n name=\"background_color\",\n display_name=\"Background Color\",\n info=\"The background color of the icon.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"chat_icon\",\n display_name=\"Icon\",\n info=\"The icon of the message.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"text_color\",\n display_name=\"Text Color\",\n info=\"The text color of the name\",\n advanced=True,\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"message_response\"),\n ]\n\n async def message_response(self) -> Message:\n background_color = self.background_color\n text_color = self.text_color\n icon = self.chat_icon\n\n message = await Message.create(\n text=self.input_value,\n sender=self.sender,\n sender_name=self.sender_name,\n session_id=self.session_id,\n files=self.files,\n properties={\n \"background_color\": background_color,\n \"text_color\": text_color,\n \"icon\": icon,\n },\n )\n if self.session_id and isinstance(message, Message) and self.should_store_message:\n stored_message = await self.send_message(\n message,\n )\n self.message.value = stored_message\n message = stored_message\n\n self.status = message\n return message\n"
|
||||
"value": "from langflow.base.data.utils import IMG_FILE_TYPES, TEXT_FILE_TYPES\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.inputs import BoolInput\nfrom langflow.io import (\n DropdownInput,\n FileInput,\n MessageTextInput,\n MultilineInput,\n Output,\n)\nfrom langflow.schema.message import Message\nfrom langflow.utils.constants import (\n MESSAGE_SENDER_AI,\n MESSAGE_SENDER_NAME_USER,\n MESSAGE_SENDER_USER,\n)\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"MessagesSquare\"\n name = \"ChatInput\"\n minimized = True\n\n inputs = [\n MultilineInput(\n name=\"input_value\",\n display_name=\"Text\",\n value=\"\",\n info=\"Message to be passed as input.\",\n input_types=[],\n ),\n BoolInput(\n name=\"should_store_message\",\n display_name=\"Store Messages\",\n info=\"Store the message in the history.\",\n value=True,\n advanced=True,\n ),\n DropdownInput(\n name=\"sender\",\n display_name=\"Sender Type\",\n options=[MESSAGE_SENDER_AI, MESSAGE_SENDER_USER],\n value=MESSAGE_SENDER_USER,\n info=\"Type of sender.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"sender_name\",\n display_name=\"Sender Name\",\n info=\"Name of the sender.\",\n value=MESSAGE_SENDER_NAME_USER,\n advanced=True,\n ),\n MessageTextInput(\n name=\"session_id\",\n display_name=\"Session ID\",\n info=\"The session ID of the chat. If empty, the current session ID parameter will be used.\",\n advanced=True,\n ),\n FileInput(\n name=\"files\",\n display_name=\"Files\",\n file_types=TEXT_FILE_TYPES + IMG_FILE_TYPES,\n info=\"Files to be sent with the message.\",\n advanced=True,\n is_list=True,\n temp_file=True,\n ),\n MessageTextInput(\n name=\"background_color\",\n display_name=\"Background Color\",\n info=\"The background color of the icon.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"chat_icon\",\n display_name=\"Icon\",\n info=\"The icon of the message.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"text_color\",\n display_name=\"Text Color\",\n info=\"The text color of the name\",\n advanced=True,\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"message_response\"),\n ]\n\n async def message_response(self) -> Message:\n background_color = self.background_color\n text_color = self.text_color\n icon = self.chat_icon\n\n message = await Message.create(\n text=self.input_value,\n sender=self.sender,\n sender_name=self.sender_name,\n session_id=self.session_id,\n files=self.files,\n properties={\n \"background_color\": background_color,\n \"text_color\": text_color,\n \"icon\": icon,\n },\n )\n if self.session_id and isinstance(message, Message) and self.should_store_message:\n stored_message = await self.send_message(\n message,\n )\n self.message.value = stored_message\n message = stored_message\n\n self.status = message\n return message\n"
|
||||
},
|
||||
"files": {
|
||||
"_input_type": "FileInput",
|
||||
|
|
@ -1061,6 +988,7 @@
|
|||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
"temp_file": true,
|
||||
"title_case": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "file",
|
||||
|
|
@ -1097,10 +1025,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Type of sender.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User"
|
||||
],
|
||||
"options": ["Machine", "User"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -1117,9 +1042,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Name of the sender.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1140,9 +1063,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1181,9 +1102,7 @@
|
|||
"display_name": "Text Color",
|
||||
"dynamic": false,
|
||||
"info": "The text color of the name",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1221,9 +1140,7 @@
|
|||
"data": {
|
||||
"id": "Agent-IDDA1",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"category": "agents",
|
||||
"conditional_paths": [],
|
||||
|
|
@ -1276,9 +1193,7 @@
|
|||
"name": "response",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -1311,9 +1226,7 @@
|
|||
"display_name": "Agent Description [Deprecated]",
|
||||
"dynamic": false,
|
||||
"info": "The description of the agent. This is only used when in Tool Mode. Defaults to 'A helpful assistant with access to the following tools:' and tools are added dynamically. This feature is deprecated and will be removed in future versions.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1395,9 +1308,7 @@
|
|||
"display_name": "OpenAI API Key",
|
||||
"dynamic": false,
|
||||
"info": "The OpenAI API Key to use for the OpenAI model.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"load_from_db": false,
|
||||
"name": "api_key",
|
||||
"password": true,
|
||||
|
|
@ -1450,9 +1361,7 @@
|
|||
"display_name": "Input",
|
||||
"dynamic": false,
|
||||
"info": "The input provided by the user for the agent to process.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1551,9 +1460,7 @@
|
|||
"display_name": "External Memory",
|
||||
"dynamic": false,
|
||||
"info": "Retrieve messages from an external memory. If empty, it will use the Langflow tables.",
|
||||
"input_types": [
|
||||
"Memory"
|
||||
],
|
||||
"input_types": ["Memory"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"name": "memory",
|
||||
|
|
@ -1658,10 +1565,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Order of the messages.",
|
||||
"name": "order",
|
||||
"options": [
|
||||
"Ascending",
|
||||
"Descending"
|
||||
],
|
||||
"options": ["Ascending", "Descending"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -1699,11 +1603,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Filter by sender type.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User",
|
||||
"Machine and User"
|
||||
],
|
||||
"options": ["Machine", "User", "Machine and User"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -1720,9 +1620,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Filter by sender name.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1743,9 +1641,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1767,9 +1663,7 @@
|
|||
"display_name": "Agent Instructions",
|
||||
"dynamic": false,
|
||||
"info": "System Prompt: Initial instructions and context provided to guide the agent's behavior.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1820,9 +1714,7 @@
|
|||
"display_name": "Template",
|
||||
"dynamic": false,
|
||||
"info": "The template to use for formatting the data. It can contain the keys {text}, {sender} or any other key in the message data.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1862,9 +1754,7 @@
|
|||
"display_name": "Tools",
|
||||
"dynamic": false,
|
||||
"info": "These are the tools that the agent can use to help with tasks.",
|
||||
"input_types": [
|
||||
"Tool"
|
||||
],
|
||||
"input_types": ["Tool"],
|
||||
"list": true,
|
||||
"list_add_label": "Add More",
|
||||
"name": "tools",
|
||||
|
|
@ -1925,11 +1815,5 @@
|
|||
"is_component": false,
|
||||
"last_tested_version": "1.2.0",
|
||||
"name": "Invoice Summarizer",
|
||||
"tags": [
|
||||
"chatbots",
|
||||
"content-generation",
|
||||
"agent",
|
||||
"assistants",
|
||||
"agents"
|
||||
]
|
||||
}
|
||||
"tags": ["chatbots", "content-generation", "agent", "assistants", "agents"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,16 +9,12 @@
|
|||
"dataType": "LoopComponent",
|
||||
"id": "LoopComponent-QhsXW",
|
||||
"name": "item",
|
||||
"output_types": [
|
||||
"Data"
|
||||
]
|
||||
"output_types": ["Data"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "data",
|
||||
"id": "ParseData-x6wkY",
|
||||
"inputTypes": [
|
||||
"Data"
|
||||
],
|
||||
"inputTypes": ["Data"],
|
||||
"type": "other"
|
||||
}
|
||||
},
|
||||
|
|
@ -37,16 +33,12 @@
|
|||
"dataType": "ParseData",
|
||||
"id": "ParseData-x6wkY",
|
||||
"name": "text",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "AnthropicModel-uuAY6",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -65,16 +57,12 @@
|
|||
"dataType": "AnthropicModel",
|
||||
"id": "AnthropicModel-uuAY6",
|
||||
"name": "text_output",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "message",
|
||||
"id": "MessagetoData-9Kbcj",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -93,17 +81,13 @@
|
|||
"dataType": "MessagetoData",
|
||||
"id": "MessagetoData-9Kbcj",
|
||||
"name": "data",
|
||||
"output_types": [
|
||||
"Data"
|
||||
]
|
||||
"output_types": ["Data"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"dataType": "LoopComponent",
|
||||
"id": "LoopComponent-QhsXW",
|
||||
"name": "item",
|
||||
"output_types": [
|
||||
"Data"
|
||||
]
|
||||
"output_types": ["Data"]
|
||||
}
|
||||
},
|
||||
"id": "reactflow__edge-MessagetoData-9Kbcj{œdataTypeœ:œMessagetoDataœ,œidœ:œMessagetoData-9Kbcjœ,œnameœ:œdataœ,œoutput_typesœ:[œDataœ]}-LoopComponent-QhsXW{œdataTypeœ:œLoopComponentœ,œidœ:œLoopComponent-QhsXWœ,œnameœ:œitemœ,œoutput_typesœ:[œDataœ]}",
|
||||
|
|
@ -121,16 +105,12 @@
|
|||
"dataType": "LoopComponent",
|
||||
"id": "LoopComponent-QhsXW",
|
||||
"name": "done",
|
||||
"output_types": [
|
||||
"Data"
|
||||
]
|
||||
"output_types": ["Data"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "data",
|
||||
"id": "ParseData-NpCtQ",
|
||||
"inputTypes": [
|
||||
"Data"
|
||||
],
|
||||
"inputTypes": ["Data"],
|
||||
"type": "other"
|
||||
}
|
||||
},
|
||||
|
|
@ -149,18 +129,12 @@
|
|||
"dataType": "ParseData",
|
||||
"id": "ParseData-NpCtQ",
|
||||
"name": "text",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "ChatOutput-Uq5M0",
|
||||
"inputTypes": [
|
||||
"Data",
|
||||
"DataFrame",
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Data", "DataFrame", "Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -179,16 +153,12 @@
|
|||
"dataType": "ChatInput",
|
||||
"id": "ChatInput-doR66",
|
||||
"name": "message",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "search_query",
|
||||
"id": "ArXivComponent-Vwek5",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -205,16 +175,12 @@
|
|||
"dataType": "ArXivComponent",
|
||||
"id": "ArXivComponent-Vwek5",
|
||||
"name": "data",
|
||||
"output_types": [
|
||||
"Data"
|
||||
]
|
||||
"output_types": ["Data"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "data",
|
||||
"id": "LoopComponent-QhsXW",
|
||||
"inputTypes": [
|
||||
"Data"
|
||||
],
|
||||
"inputTypes": ["Data"],
|
||||
"type": "other"
|
||||
}
|
||||
},
|
||||
|
|
@ -230,9 +196,7 @@
|
|||
"data": {
|
||||
"id": "ArXivComponent-Vwek5",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Data"
|
||||
],
|
||||
"base_classes": ["Data"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -240,11 +204,7 @@
|
|||
"display_name": "arXiv",
|
||||
"documentation": "",
|
||||
"edited": false,
|
||||
"field_order": [
|
||||
"search_query",
|
||||
"search_type",
|
||||
"max_results"
|
||||
],
|
||||
"field_order": ["search_query", "search_type", "max_results"],
|
||||
"frozen": false,
|
||||
"icon": "arXiv",
|
||||
"legacy": false,
|
||||
|
|
@ -261,9 +221,7 @@
|
|||
"name": "data",
|
||||
"selected": "Data",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Data"
|
||||
],
|
||||
"types": ["Data"],
|
||||
"value": "__UNDEFINED__"
|
||||
},
|
||||
{
|
||||
|
|
@ -274,9 +232,7 @@
|
|||
"name": "dataframe",
|
||||
"selected": "DataFrame",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"DataFrame"
|
||||
],
|
||||
"types": ["DataFrame"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -325,9 +281,7 @@
|
|||
"display_name": "Search Query",
|
||||
"dynamic": false,
|
||||
"info": "The search query for arXiv papers (e.g., 'quantum computing')",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -351,13 +305,7 @@
|
|||
"dynamic": false,
|
||||
"info": "The field to search in",
|
||||
"name": "search_type",
|
||||
"options": [
|
||||
"all",
|
||||
"title",
|
||||
"abstract",
|
||||
"author",
|
||||
"cat"
|
||||
],
|
||||
"options": ["all", "title", "abstract", "author", "cat"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -391,9 +339,7 @@
|
|||
"data": {
|
||||
"id": "LoopComponent-QhsXW",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Data"
|
||||
],
|
||||
"base_classes": ["Data"],
|
||||
"beta": false,
|
||||
"category": "logic",
|
||||
"conditional_paths": [],
|
||||
|
|
@ -402,9 +348,7 @@
|
|||
"display_name": "Loop",
|
||||
"documentation": "",
|
||||
"edited": false,
|
||||
"field_order": [
|
||||
"data"
|
||||
],
|
||||
"field_order": ["data"],
|
||||
"frozen": false,
|
||||
"icon": "infinity",
|
||||
"key": "LoopComponent",
|
||||
|
|
@ -422,9 +366,7 @@
|
|||
"name": "item",
|
||||
"selected": "Data",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Data"
|
||||
],
|
||||
"types": ["Data"],
|
||||
"value": "__UNDEFINED__"
|
||||
},
|
||||
{
|
||||
|
|
@ -435,9 +377,7 @@
|
|||
"name": "done",
|
||||
"selected": "Data",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Data"
|
||||
],
|
||||
"types": ["Data"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -469,9 +409,7 @@
|
|||
"display_name": "Data",
|
||||
"dynamic": false,
|
||||
"info": "The initial list of Data objects to iterate over.",
|
||||
"input_types": [
|
||||
"Data"
|
||||
],
|
||||
"input_types": ["Data"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"name": "data",
|
||||
|
|
@ -508,10 +446,7 @@
|
|||
"data": {
|
||||
"id": "ParseData-x6wkY",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Data",
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Data", "Message"],
|
||||
"beta": false,
|
||||
"category": "processing",
|
||||
"conditional_paths": [],
|
||||
|
|
@ -520,11 +455,7 @@
|
|||
"display_name": "Data to Message",
|
||||
"documentation": "",
|
||||
"edited": false,
|
||||
"field_order": [
|
||||
"data",
|
||||
"template",
|
||||
"sep"
|
||||
],
|
||||
"field_order": ["data", "template", "sep"],
|
||||
"frozen": false,
|
||||
"icon": "message-square",
|
||||
"key": "ParseData",
|
||||
|
|
@ -544,9 +475,7 @@
|
|||
"name": "text",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
},
|
||||
{
|
||||
|
|
@ -557,9 +486,7 @@
|
|||
"name": "data_list",
|
||||
"selected": "Data",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Data"
|
||||
],
|
||||
"types": ["Data"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -591,9 +518,7 @@
|
|||
"display_name": "Data",
|
||||
"dynamic": false,
|
||||
"info": "The data to convert to text.",
|
||||
"input_types": [
|
||||
"Data"
|
||||
],
|
||||
"input_types": ["Data"],
|
||||
"list": true,
|
||||
"list_add_label": "Add More",
|
||||
"name": "data",
|
||||
|
|
@ -632,9 +557,7 @@
|
|||
"display_name": "Template",
|
||||
"dynamic": false,
|
||||
"info": "The template to use for formatting the data. It can contain the keys {text}, {data} or any other key in the Data.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -673,10 +596,7 @@
|
|||
"data": {
|
||||
"id": "AnthropicModel-uuAY6",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"LanguageModel",
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["LanguageModel", "Message"],
|
||||
"beta": false,
|
||||
"category": "models",
|
||||
"conditional_paths": [],
|
||||
|
|
@ -715,9 +635,7 @@
|
|||
"required_inputs": [],
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
},
|
||||
{
|
||||
|
|
@ -726,14 +644,10 @@
|
|||
"display_name": "Language Model",
|
||||
"method": "build_model",
|
||||
"name": "model_output",
|
||||
"required_inputs": [
|
||||
"api_key"
|
||||
],
|
||||
"required_inputs": ["api_key"],
|
||||
"selected": "LanguageModel",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"LanguageModel"
|
||||
],
|
||||
"types": ["LanguageModel"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -747,9 +661,7 @@
|
|||
"display_name": "Anthropic API Key",
|
||||
"dynamic": false,
|
||||
"info": "Your Anthropic API key.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"load_from_db": true,
|
||||
"name": "api_key",
|
||||
"password": true,
|
||||
|
|
@ -767,9 +679,7 @@
|
|||
"display_name": "Anthropic API URL",
|
||||
"dynamic": false,
|
||||
"info": "Endpoint of the Anthropic API. Defaults to 'https://api.anthropic.com' if not specified.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -809,9 +719,7 @@
|
|||
"display_name": "Input",
|
||||
"dynamic": false,
|
||||
"info": "",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -880,9 +788,7 @@
|
|||
"display_name": "Prefill",
|
||||
"dynamic": false,
|
||||
"info": "Prefill text to guide the model's response.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -921,9 +827,7 @@
|
|||
"display_name": "System Message",
|
||||
"dynamic": false,
|
||||
"info": "System message to pass to the model.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1009,9 +913,7 @@
|
|||
"data": {
|
||||
"id": "MessagetoData-9Kbcj",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Data"
|
||||
],
|
||||
"base_classes": ["Data"],
|
||||
"beta": true,
|
||||
"category": "processing",
|
||||
"conditional_paths": [],
|
||||
|
|
@ -1020,9 +922,7 @@
|
|||
"display_name": "Message to Data",
|
||||
"documentation": "",
|
||||
"edited": false,
|
||||
"field_order": [
|
||||
"message"
|
||||
],
|
||||
"field_order": ["message"],
|
||||
"frozen": false,
|
||||
"icon": "message-square-share",
|
||||
"key": "MessagetoData",
|
||||
|
|
@ -1040,9 +940,7 @@
|
|||
"name": "data",
|
||||
"selected": "Data",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Data"
|
||||
],
|
||||
"types": ["Data"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -1074,9 +972,7 @@
|
|||
"display_name": "Message",
|
||||
"dynamic": false,
|
||||
"info": "The Message object to convert to a Data object",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1114,10 +1010,7 @@
|
|||
"data": {
|
||||
"id": "ParseData-NpCtQ",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Data",
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Data", "Message"],
|
||||
"beta": false,
|
||||
"category": "processing",
|
||||
"conditional_paths": [],
|
||||
|
|
@ -1126,11 +1019,7 @@
|
|||
"display_name": "Data to Message",
|
||||
"documentation": "",
|
||||
"edited": false,
|
||||
"field_order": [
|
||||
"data",
|
||||
"template",
|
||||
"sep"
|
||||
],
|
||||
"field_order": ["data", "template", "sep"],
|
||||
"frozen": false,
|
||||
"icon": "message-square",
|
||||
"key": "ParseData",
|
||||
|
|
@ -1150,9 +1039,7 @@
|
|||
"name": "text",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
},
|
||||
{
|
||||
|
|
@ -1163,9 +1050,7 @@
|
|||
"name": "data_list",
|
||||
"selected": "Data",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Data"
|
||||
],
|
||||
"types": ["Data"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -1197,9 +1082,7 @@
|
|||
"display_name": "Data",
|
||||
"dynamic": false,
|
||||
"info": "The data to convert to text.",
|
||||
"input_types": [
|
||||
"Data"
|
||||
],
|
||||
"input_types": ["Data"],
|
||||
"list": true,
|
||||
"list_add_label": "Add More",
|
||||
"name": "data",
|
||||
|
|
@ -1238,9 +1121,7 @@
|
|||
"display_name": "Template",
|
||||
"dynamic": false,
|
||||
"info": "The template to use for formatting the data. It can contain the keys {text}, {data} or any other key in the Data.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1279,9 +1160,7 @@
|
|||
"data": {
|
||||
"id": "ChatOutput-Uq5M0",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -1316,9 +1195,7 @@
|
|||
"name": "message",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -1331,9 +1208,7 @@
|
|||
"display_name": "Background Color",
|
||||
"dynamic": false,
|
||||
"info": "The background color of the icon.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1354,9 +1229,7 @@
|
|||
"display_name": "Icon",
|
||||
"dynamic": false,
|
||||
"info": "The icon of the message.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1413,9 +1286,7 @@
|
|||
"display_name": "Data Template",
|
||||
"dynamic": false,
|
||||
"info": "Template to convert Data to Text. If left empty, it will be dynamically set to the Data's text key.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1436,11 +1307,7 @@
|
|||
"display_name": "Text",
|
||||
"dynamic": false,
|
||||
"info": "Message to be passed as output.",
|
||||
"input_types": [
|
||||
"Data",
|
||||
"DataFrame",
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Data", "DataFrame", "Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1464,10 +1331,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Type of sender.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User"
|
||||
],
|
||||
"options": ["Machine", "User"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -1484,9 +1348,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Name of the sender.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1507,9 +1369,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1548,9 +1408,7 @@
|
|||
"display_name": "Text Color",
|
||||
"dynamic": false,
|
||||
"info": "The text color of the name",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1588,9 +1446,7 @@
|
|||
"data": {
|
||||
"id": "ChatInput-doR66",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -1625,9 +1481,7 @@
|
|||
"name": "message",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -1640,9 +1494,7 @@
|
|||
"display_name": "Background Color",
|
||||
"dynamic": false,
|
||||
"info": "The background color of the icon.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1663,9 +1515,7 @@
|
|||
"display_name": "Icon",
|
||||
"dynamic": false,
|
||||
"info": "The icon of the message.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1696,7 +1546,7 @@
|
|||
"show": true,
|
||||
"title_case": false,
|
||||
"type": "code",
|
||||
"value": "from langflow.base.data.utils import IMG_FILE_TYPES, TEXT_FILE_TYPES\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.inputs import BoolInput\nfrom langflow.io import (\n DropdownInput,\n FileInput,\n MessageTextInput,\n MultilineInput,\n Output,\n)\nfrom langflow.schema.message import Message\nfrom langflow.utils.constants import (\n MESSAGE_SENDER_AI,\n MESSAGE_SENDER_NAME_USER,\n MESSAGE_SENDER_USER,\n)\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"MessagesSquare\"\n name = \"ChatInput\"\n minimized = True\n\n inputs = [\n MultilineInput(\n name=\"input_value\",\n display_name=\"Text\",\n value=\"\",\n info=\"Message to be passed as input.\",\n input_types=[],\n ),\n BoolInput(\n name=\"should_store_message\",\n display_name=\"Store Messages\",\n info=\"Store the message in the history.\",\n value=True,\n advanced=True,\n ),\n DropdownInput(\n name=\"sender\",\n display_name=\"Sender Type\",\n options=[MESSAGE_SENDER_AI, MESSAGE_SENDER_USER],\n value=MESSAGE_SENDER_USER,\n info=\"Type of sender.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"sender_name\",\n display_name=\"Sender Name\",\n info=\"Name of the sender.\",\n value=MESSAGE_SENDER_NAME_USER,\n advanced=True,\n ),\n MessageTextInput(\n name=\"session_id\",\n display_name=\"Session ID\",\n info=\"The session ID of the chat. If empty, the current session ID parameter will be used.\",\n advanced=True,\n ),\n FileInput(\n name=\"files\",\n display_name=\"Files\",\n file_types=TEXT_FILE_TYPES + IMG_FILE_TYPES,\n info=\"Files to be sent with the message.\",\n advanced=True,\n is_list=True,\n ),\n MessageTextInput(\n name=\"background_color\",\n display_name=\"Background Color\",\n info=\"The background color of the icon.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"chat_icon\",\n display_name=\"Icon\",\n info=\"The icon of the message.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"text_color\",\n display_name=\"Text Color\",\n info=\"The text color of the name\",\n advanced=True,\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"message_response\"),\n ]\n\n async def message_response(self) -> Message:\n background_color = self.background_color\n text_color = self.text_color\n icon = self.chat_icon\n\n message = await Message.create(\n text=self.input_value,\n sender=self.sender,\n sender_name=self.sender_name,\n session_id=self.session_id,\n files=self.files,\n properties={\n \"background_color\": background_color,\n \"text_color\": text_color,\n \"icon\": icon,\n },\n )\n if self.session_id and isinstance(message, Message) and self.should_store_message:\n stored_message = await self.send_message(\n message,\n )\n self.message.value = stored_message\n message = stored_message\n\n self.status = message\n return message\n"
|
||||
"value": "from langflow.base.data.utils import IMG_FILE_TYPES, TEXT_FILE_TYPES\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.inputs import BoolInput\nfrom langflow.io import (\n DropdownInput,\n FileInput,\n MessageTextInput,\n MultilineInput,\n Output,\n)\nfrom langflow.schema.message import Message\nfrom langflow.utils.constants import (\n MESSAGE_SENDER_AI,\n MESSAGE_SENDER_NAME_USER,\n MESSAGE_SENDER_USER,\n)\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"MessagesSquare\"\n name = \"ChatInput\"\n minimized = True\n\n inputs = [\n MultilineInput(\n name=\"input_value\",\n display_name=\"Text\",\n value=\"\",\n info=\"Message to be passed as input.\",\n input_types=[],\n ),\n BoolInput(\n name=\"should_store_message\",\n display_name=\"Store Messages\",\n info=\"Store the message in the history.\",\n value=True,\n advanced=True,\n ),\n DropdownInput(\n name=\"sender\",\n display_name=\"Sender Type\",\n options=[MESSAGE_SENDER_AI, MESSAGE_SENDER_USER],\n value=MESSAGE_SENDER_USER,\n info=\"Type of sender.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"sender_name\",\n display_name=\"Sender Name\",\n info=\"Name of the sender.\",\n value=MESSAGE_SENDER_NAME_USER,\n advanced=True,\n ),\n MessageTextInput(\n name=\"session_id\",\n display_name=\"Session ID\",\n info=\"The session ID of the chat. If empty, the current session ID parameter will be used.\",\n advanced=True,\n ),\n FileInput(\n name=\"files\",\n display_name=\"Files\",\n file_types=TEXT_FILE_TYPES + IMG_FILE_TYPES,\n info=\"Files to be sent with the message.\",\n advanced=True,\n is_list=True,\n temp_file=True,\n ),\n MessageTextInput(\n name=\"background_color\",\n display_name=\"Background Color\",\n info=\"The background color of the icon.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"chat_icon\",\n display_name=\"Icon\",\n info=\"The icon of the message.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"text_color\",\n display_name=\"Text Color\",\n info=\"The text color of the name\",\n advanced=True,\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"message_response\"),\n ]\n\n async def message_response(self) -> Message:\n background_color = self.background_color\n text_color = self.text_color\n icon = self.chat_icon\n\n message = await Message.create(\n text=self.input_value,\n sender=self.sender,\n sender_name=self.sender_name,\n session_id=self.session_id,\n files=self.files,\n properties={\n \"background_color\": background_color,\n \"text_color\": text_color,\n \"icon\": icon,\n },\n )\n if self.session_id and isinstance(message, Message) and self.should_store_message:\n stored_message = await self.send_message(\n message,\n )\n self.message.value = stored_message\n message = stored_message\n\n self.status = message\n return message\n"
|
||||
},
|
||||
"files": {
|
||||
"_input_type": "FileInput",
|
||||
|
|
@ -1736,6 +1586,7 @@
|
|||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
"temp_file": true,
|
||||
"title_case": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "file",
|
||||
|
|
@ -1772,10 +1623,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Type of sender.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User"
|
||||
],
|
||||
"options": ["Machine", "User"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -1792,9 +1640,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Name of the sender.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1815,9 +1661,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1856,9 +1700,7 @@
|
|||
"display_name": "Text Color",
|
||||
"dynamic": false,
|
||||
"info": "The text color of the name",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1963,8 +1805,5 @@
|
|||
"is_component": false,
|
||||
"last_tested_version": "1.1.5",
|
||||
"name": "Research Translation Loop",
|
||||
"tags": [
|
||||
"chatbots",
|
||||
"content-generation"
|
||||
]
|
||||
}
|
||||
"tags": ["chatbots", "content-generation"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,16 +9,12 @@
|
|||
"dataType": "StructuredOutputComponent",
|
||||
"id": "StructuredOutputComponent-Kqbq4",
|
||||
"name": "structured_output",
|
||||
"output_types": [
|
||||
"Data"
|
||||
]
|
||||
"output_types": ["Data"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "data",
|
||||
"id": "ParseData-7XOFR",
|
||||
"inputTypes": [
|
||||
"Data"
|
||||
],
|
||||
"inputTypes": ["Data"],
|
||||
"type": "other"
|
||||
}
|
||||
},
|
||||
|
|
@ -37,16 +33,12 @@
|
|||
"dataType": "ChatInput",
|
||||
"id": "ChatInput-tMLRq",
|
||||
"name": "message",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "Agent-dcKuR",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -65,16 +57,12 @@
|
|||
"dataType": "Agent",
|
||||
"id": "Agent-dcKuR",
|
||||
"name": "response",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "StructuredOutputComponent-Kqbq4",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -93,16 +81,12 @@
|
|||
"dataType": "TavilySearchComponent",
|
||||
"id": "TavilySearchComponent-cGK9T",
|
||||
"name": "component_as_tool",
|
||||
"output_types": [
|
||||
"Tool"
|
||||
]
|
||||
"output_types": ["Tool"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "tools",
|
||||
"id": "Agent-dcKuR",
|
||||
"inputTypes": [
|
||||
"Tool"
|
||||
],
|
||||
"inputTypes": ["Tool"],
|
||||
"type": "other"
|
||||
}
|
||||
},
|
||||
|
|
@ -120,16 +104,12 @@
|
|||
"dataType": "OpenAIModel",
|
||||
"id": "OpenAIModel-prL67",
|
||||
"name": "model_output",
|
||||
"output_types": [
|
||||
"LanguageModel"
|
||||
]
|
||||
"output_types": ["LanguageModel"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "llm",
|
||||
"id": "StructuredOutputComponent-Kqbq4",
|
||||
"inputTypes": [
|
||||
"LanguageModel"
|
||||
],
|
||||
"inputTypes": ["LanguageModel"],
|
||||
"type": "other"
|
||||
}
|
||||
},
|
||||
|
|
@ -145,18 +125,12 @@
|
|||
"dataType": "ParseData",
|
||||
"id": "ParseData-7XOFR",
|
||||
"name": "text",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "ChatOutput-JrLxU",
|
||||
"inputTypes": [
|
||||
"Data",
|
||||
"DataFrame",
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Data", "DataFrame", "Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -174,9 +148,7 @@
|
|||
"display_name": "Chat Input",
|
||||
"id": "ChatInput-tMLRq",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -210,9 +182,7 @@
|
|||
"name": "message",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -225,9 +195,7 @@
|
|||
"display_name": "Background Color",
|
||||
"dynamic": false,
|
||||
"info": "The background color of the icon.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "background_color",
|
||||
|
|
@ -246,9 +214,7 @@
|
|||
"display_name": "Icon",
|
||||
"dynamic": false,
|
||||
"info": "The icon of the message.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "chat_icon",
|
||||
|
|
@ -277,7 +243,7 @@
|
|||
"show": true,
|
||||
"title_case": false,
|
||||
"type": "code",
|
||||
"value": "from langflow.base.data.utils import IMG_FILE_TYPES, TEXT_FILE_TYPES\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.inputs import BoolInput\nfrom langflow.io import (\n DropdownInput,\n FileInput,\n MessageTextInput,\n MultilineInput,\n Output,\n)\nfrom langflow.schema.message import Message\nfrom langflow.utils.constants import (\n MESSAGE_SENDER_AI,\n MESSAGE_SENDER_NAME_USER,\n MESSAGE_SENDER_USER,\n)\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"MessagesSquare\"\n name = \"ChatInput\"\n minimized = True\n\n inputs = [\n MultilineInput(\n name=\"input_value\",\n display_name=\"Text\",\n value=\"\",\n info=\"Message to be passed as input.\",\n input_types=[],\n ),\n BoolInput(\n name=\"should_store_message\",\n display_name=\"Store Messages\",\n info=\"Store the message in the history.\",\n value=True,\n advanced=True,\n ),\n DropdownInput(\n name=\"sender\",\n display_name=\"Sender Type\",\n options=[MESSAGE_SENDER_AI, MESSAGE_SENDER_USER],\n value=MESSAGE_SENDER_USER,\n info=\"Type of sender.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"sender_name\",\n display_name=\"Sender Name\",\n info=\"Name of the sender.\",\n value=MESSAGE_SENDER_NAME_USER,\n advanced=True,\n ),\n MessageTextInput(\n name=\"session_id\",\n display_name=\"Session ID\",\n info=\"The session ID of the chat. If empty, the current session ID parameter will be used.\",\n advanced=True,\n ),\n FileInput(\n name=\"files\",\n display_name=\"Files\",\n file_types=TEXT_FILE_TYPES + IMG_FILE_TYPES,\n info=\"Files to be sent with the message.\",\n advanced=True,\n is_list=True,\n ),\n MessageTextInput(\n name=\"background_color\",\n display_name=\"Background Color\",\n info=\"The background color of the icon.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"chat_icon\",\n display_name=\"Icon\",\n info=\"The icon of the message.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"text_color\",\n display_name=\"Text Color\",\n info=\"The text color of the name\",\n advanced=True,\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"message_response\"),\n ]\n\n async def message_response(self) -> Message:\n background_color = self.background_color\n text_color = self.text_color\n icon = self.chat_icon\n\n message = await Message.create(\n text=self.input_value,\n sender=self.sender,\n sender_name=self.sender_name,\n session_id=self.session_id,\n files=self.files,\n properties={\n \"background_color\": background_color,\n \"text_color\": text_color,\n \"icon\": icon,\n },\n )\n if self.session_id and isinstance(message, Message) and self.should_store_message:\n stored_message = await self.send_message(\n message,\n )\n self.message.value = stored_message\n message = stored_message\n\n self.status = message\n return message\n"
|
||||
"value": "from langflow.base.data.utils import IMG_FILE_TYPES, TEXT_FILE_TYPES\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.inputs import BoolInput\nfrom langflow.io import (\n DropdownInput,\n FileInput,\n MessageTextInput,\n MultilineInput,\n Output,\n)\nfrom langflow.schema.message import Message\nfrom langflow.utils.constants import (\n MESSAGE_SENDER_AI,\n MESSAGE_SENDER_NAME_USER,\n MESSAGE_SENDER_USER,\n)\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"MessagesSquare\"\n name = \"ChatInput\"\n minimized = True\n\n inputs = [\n MultilineInput(\n name=\"input_value\",\n display_name=\"Text\",\n value=\"\",\n info=\"Message to be passed as input.\",\n input_types=[],\n ),\n BoolInput(\n name=\"should_store_message\",\n display_name=\"Store Messages\",\n info=\"Store the message in the history.\",\n value=True,\n advanced=True,\n ),\n DropdownInput(\n name=\"sender\",\n display_name=\"Sender Type\",\n options=[MESSAGE_SENDER_AI, MESSAGE_SENDER_USER],\n value=MESSAGE_SENDER_USER,\n info=\"Type of sender.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"sender_name\",\n display_name=\"Sender Name\",\n info=\"Name of the sender.\",\n value=MESSAGE_SENDER_NAME_USER,\n advanced=True,\n ),\n MessageTextInput(\n name=\"session_id\",\n display_name=\"Session ID\",\n info=\"The session ID of the chat. If empty, the current session ID parameter will be used.\",\n advanced=True,\n ),\n FileInput(\n name=\"files\",\n display_name=\"Files\",\n file_types=TEXT_FILE_TYPES + IMG_FILE_TYPES,\n info=\"Files to be sent with the message.\",\n advanced=True,\n is_list=True,\n temp_file=True,\n ),\n MessageTextInput(\n name=\"background_color\",\n display_name=\"Background Color\",\n info=\"The background color of the icon.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"chat_icon\",\n display_name=\"Icon\",\n info=\"The icon of the message.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"text_color\",\n display_name=\"Text Color\",\n info=\"The text color of the name\",\n advanced=True,\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"message_response\"),\n ]\n\n async def message_response(self) -> Message:\n background_color = self.background_color\n text_color = self.text_color\n icon = self.chat_icon\n\n message = await Message.create(\n text=self.input_value,\n sender=self.sender,\n sender_name=self.sender_name,\n session_id=self.session_id,\n files=self.files,\n properties={\n \"background_color\": background_color,\n \"text_color\": text_color,\n \"icon\": icon,\n },\n )\n if self.session_id and isinstance(message, Message) and self.should_store_message:\n stored_message = await self.send_message(\n message,\n )\n self.message.value = stored_message\n message = stored_message\n\n self.status = message\n return message\n"
|
||||
},
|
||||
"files": {
|
||||
"_input_type": "FileInput",
|
||||
|
|
@ -316,6 +282,7 @@
|
|||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
"temp_file": true,
|
||||
"title_case": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "file",
|
||||
|
|
@ -349,10 +316,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Type of sender.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User"
|
||||
],
|
||||
"options": ["Machine", "User"],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
|
|
@ -367,9 +331,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Name of the sender.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "sender_name",
|
||||
|
|
@ -388,9 +350,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "session_id",
|
||||
|
|
@ -425,9 +385,7 @@
|
|||
"display_name": "Text Color",
|
||||
"dynamic": false,
|
||||
"info": "The text color of the name",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "text_color",
|
||||
|
|
@ -469,9 +427,7 @@
|
|||
"display_name": "Chat Output",
|
||||
"id": "ChatOutput-JrLxU",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -505,9 +461,7 @@
|
|||
"name": "message",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -520,9 +474,7 @@
|
|||
"display_name": "Background Color",
|
||||
"dynamic": false,
|
||||
"info": "The background color of the icon.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "background_color",
|
||||
|
|
@ -542,9 +494,7 @@
|
|||
"display_name": "Icon",
|
||||
"dynamic": false,
|
||||
"info": "The icon of the message.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "chat_icon",
|
||||
|
|
@ -600,9 +550,7 @@
|
|||
"display_name": "Data Template",
|
||||
"dynamic": false,
|
||||
"info": "Template to convert Data to Text. If left empty, it will be dynamically set to the Data's text key.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "data_template",
|
||||
|
|
@ -622,11 +570,7 @@
|
|||
"display_name": "Text",
|
||||
"dynamic": false,
|
||||
"info": "Message to be passed as output.",
|
||||
"input_types": [
|
||||
"Data",
|
||||
"DataFrame",
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Data", "DataFrame", "Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "input_value",
|
||||
|
|
@ -647,10 +591,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Type of sender.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User"
|
||||
],
|
||||
"options": ["Machine", "User"],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
|
|
@ -666,9 +607,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Name of the sender.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "sender_name",
|
||||
|
|
@ -688,9 +627,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "session_id",
|
||||
|
|
@ -726,9 +663,7 @@
|
|||
"display_name": "Text Color",
|
||||
"dynamic": false,
|
||||
"info": "The text color of the name",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "text_color",
|
||||
|
|
@ -883,9 +818,7 @@
|
|||
"display_name": "Structured Output",
|
||||
"id": "StructuredOutputComponent-Kqbq4",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Data"
|
||||
],
|
||||
"base_classes": ["Data"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -913,9 +846,7 @@
|
|||
"method": "build_structured_output",
|
||||
"name": "structured_output",
|
||||
"selected": "Data",
|
||||
"types": [
|
||||
"Data"
|
||||
],
|
||||
"types": ["Data"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -946,9 +877,7 @@
|
|||
"display_name": "Input message",
|
||||
"dynamic": false,
|
||||
"info": "",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "input_value",
|
||||
|
|
@ -968,9 +897,7 @@
|
|||
"display_name": "Language Model",
|
||||
"dynamic": false,
|
||||
"info": "The language model to use to generate the structured output.",
|
||||
"input_types": [
|
||||
"LanguageModel"
|
||||
],
|
||||
"input_types": ["LanguageModel"],
|
||||
"list": false,
|
||||
"name": "llm",
|
||||
"placeholder": "",
|
||||
|
|
@ -1162,9 +1089,7 @@
|
|||
"data": {
|
||||
"id": "ParseData-7XOFR",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"category": "helpers",
|
||||
"conditional_paths": [],
|
||||
|
|
@ -1173,11 +1098,7 @@
|
|||
"display_name": "Parse Data",
|
||||
"documentation": "",
|
||||
"edited": false,
|
||||
"field_order": [
|
||||
"data",
|
||||
"template",
|
||||
"sep"
|
||||
],
|
||||
"field_order": ["data", "template", "sep"],
|
||||
"frozen": false,
|
||||
"icon": "message-square",
|
||||
"key": "ParseData",
|
||||
|
|
@ -1196,9 +1117,7 @@
|
|||
"name": "text",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
},
|
||||
{
|
||||
|
|
@ -1209,9 +1128,7 @@
|
|||
"name": "data_list",
|
||||
"selected": "Data",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Data"
|
||||
],
|
||||
"types": ["Data"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -1242,9 +1159,7 @@
|
|||
"display_name": "Data",
|
||||
"dynamic": false,
|
||||
"info": "The data to convert to text.",
|
||||
"input_types": [
|
||||
"Data"
|
||||
],
|
||||
"input_types": ["Data"],
|
||||
"list": true,
|
||||
"name": "data",
|
||||
"placeholder": "",
|
||||
|
|
@ -1279,9 +1194,7 @@
|
|||
"display_name": "Template",
|
||||
"dynamic": false,
|
||||
"info": "The template to use for formatting the data. It can contain the keys {text}, {data} or any other key in the Data.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"multiline": true,
|
||||
|
|
@ -1324,9 +1237,7 @@
|
|||
"display_name": "Agent",
|
||||
"id": "Agent-dcKuR",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -1377,9 +1288,7 @@
|
|||
"name": "response",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -1408,9 +1317,7 @@
|
|||
"display_name": "Agent Description [Deprecated]",
|
||||
"dynamic": false,
|
||||
"info": "The description of the agent. This is only used when in Tool Mode. Defaults to 'A helpful assistant with access to the following tools:' and tools are added dynamically. This feature is deprecated and will be removed in future versions.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"multiline": true,
|
||||
|
|
@ -1461,9 +1368,7 @@
|
|||
"display_name": "OpenAI API Key",
|
||||
"dynamic": false,
|
||||
"info": "The OpenAI API Key to use for the OpenAI model.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"load_from_db": true,
|
||||
"name": "api_key",
|
||||
"password": true,
|
||||
|
|
@ -1514,9 +1419,7 @@
|
|||
"display_name": "Input",
|
||||
"dynamic": false,
|
||||
"info": "The input provided by the user for the agent to process.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "input_value",
|
||||
|
|
@ -1608,9 +1511,7 @@
|
|||
"display_name": "External Memory",
|
||||
"dynamic": false,
|
||||
"info": "Retrieve messages from an external memory. If empty, it will use the Langflow tables.",
|
||||
"input_types": [
|
||||
"Memory"
|
||||
],
|
||||
"input_types": ["Memory"],
|
||||
"list": false,
|
||||
"name": "memory",
|
||||
"placeholder": "",
|
||||
|
|
@ -1704,10 +1605,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Order of the messages.",
|
||||
"name": "order",
|
||||
"options": [
|
||||
"Ascending",
|
||||
"Descending"
|
||||
],
|
||||
"options": ["Ascending", "Descending"],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
|
|
@ -1741,11 +1639,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Filter by sender type.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User",
|
||||
"Machine and User"
|
||||
],
|
||||
"options": ["Machine", "User", "Machine and User"],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
|
|
@ -1761,9 +1655,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Filter by sender name.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "sender_name",
|
||||
|
|
@ -1783,9 +1675,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "session_id",
|
||||
|
|
@ -1805,9 +1695,7 @@
|
|||
"display_name": "Agent Instructions",
|
||||
"dynamic": false,
|
||||
"info": "System Prompt: Initial instructions and context provided to guide the agent's behavior.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"multiline": true,
|
||||
|
|
@ -1844,9 +1732,7 @@
|
|||
"display_name": "Template",
|
||||
"dynamic": false,
|
||||
"info": "The template to use for formatting the data. It can contain the keys {text}, {sender} or any other key in the message data.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"multiline": true,
|
||||
|
|
@ -1885,9 +1771,7 @@
|
|||
"display_name": "Tools",
|
||||
"dynamic": false,
|
||||
"info": "These are the tools that the agent can use to help with tasks.",
|
||||
"input_types": [
|
||||
"Tool"
|
||||
],
|
||||
"input_types": ["Tool"],
|
||||
"list": true,
|
||||
"name": "tools",
|
||||
"placeholder": "",
|
||||
|
|
@ -1972,10 +1856,7 @@
|
|||
"display_name": "Tavily AI Search",
|
||||
"id": "TavilySearchComponent-cGK9T",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Data",
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Data", "Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -2010,9 +1891,7 @@
|
|||
"required_inputs": null,
|
||||
"selected": "Tool",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Tool"
|
||||
],
|
||||
"types": ["Tool"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -2025,9 +1904,7 @@
|
|||
"display_name": "Tavily API Key",
|
||||
"dynamic": false,
|
||||
"info": "Your Tavily API Key.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"load_from_db": true,
|
||||
"name": "api_key",
|
||||
"password": true,
|
||||
|
|
@ -2116,9 +1993,7 @@
|
|||
"display_name": "Search Query",
|
||||
"dynamic": false,
|
||||
"info": "The search query you want to execute with Tavily.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -2142,10 +2017,7 @@
|
|||
"dynamic": false,
|
||||
"info": "The depth of the search.",
|
||||
"name": "search_depth",
|
||||
"options": [
|
||||
"basic",
|
||||
"advanced"
|
||||
],
|
||||
"options": ["basic", "advanced"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -2165,12 +2037,7 @@
|
|||
"dynamic": false,
|
||||
"info": "The time range back from the current date to include in the search results.",
|
||||
"name": "time_range",
|
||||
"options": [
|
||||
"day",
|
||||
"week",
|
||||
"month",
|
||||
"year"
|
||||
],
|
||||
"options": ["day", "week", "month", "year"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -2205,10 +2072,7 @@
|
|||
"description": "Modify tool names and descriptions to help agents understand when to use each tool.",
|
||||
"field_parsers": {
|
||||
"commands": "commands",
|
||||
"name": [
|
||||
"snake_case",
|
||||
"no_blank"
|
||||
]
|
||||
"name": ["snake_case", "no_blank"]
|
||||
},
|
||||
"hide_options": true
|
||||
},
|
||||
|
|
@ -2262,16 +2126,12 @@
|
|||
{
|
||||
"description": "fetch_content(api_key: Message) - **Tavily AI** is a search engine optimized for LLMs and RAG, aimed at efficient, quick, and persistent search results.",
|
||||
"name": "TavilySearchComponent-fetch_content",
|
||||
"tags": [
|
||||
"TavilySearchComponent-fetch_content"
|
||||
]
|
||||
"tags": ["TavilySearchComponent-fetch_content"]
|
||||
},
|
||||
{
|
||||
"description": "fetch_content_text(api_key: Message) - **Tavily AI** is a search engine optimized for LLMs and RAG, aimed at efficient, quick, and persistent search results.",
|
||||
"name": "TavilySearchComponent-fetch_content_text",
|
||||
"tags": [
|
||||
"TavilySearchComponent-fetch_content_text"
|
||||
]
|
||||
"tags": ["TavilySearchComponent-fetch_content_text"]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
@ -2284,10 +2144,7 @@
|
|||
"dynamic": false,
|
||||
"info": "The category of the search.",
|
||||
"name": "topic",
|
||||
"options": [
|
||||
"general",
|
||||
"news"
|
||||
],
|
||||
"options": ["general", "news"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -2321,10 +2178,7 @@
|
|||
"data": {
|
||||
"id": "OpenAIModel-prL67",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"LanguageModel",
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["LanguageModel", "Message"],
|
||||
"beta": false,
|
||||
"category": "models",
|
||||
"conditional_paths": [],
|
||||
|
|
@ -2363,9 +2217,7 @@
|
|||
"required_inputs": [],
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
},
|
||||
{
|
||||
|
|
@ -2374,14 +2226,10 @@
|
|||
"display_name": "Language Model",
|
||||
"method": "build_model",
|
||||
"name": "model_output",
|
||||
"required_inputs": [
|
||||
"api_key"
|
||||
],
|
||||
"required_inputs": ["api_key"],
|
||||
"selected": "LanguageModel",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"LanguageModel"
|
||||
],
|
||||
"types": ["LanguageModel"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -2395,9 +2243,7 @@
|
|||
"display_name": "OpenAI API Key",
|
||||
"dynamic": false,
|
||||
"info": "The OpenAI API Key to use for the OpenAI model.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"load_from_db": true,
|
||||
"name": "api_key",
|
||||
"password": true,
|
||||
|
|
@ -2432,9 +2278,7 @@
|
|||
"display_name": "Input",
|
||||
"dynamic": false,
|
||||
"info": "",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -2616,9 +2460,7 @@
|
|||
"display_name": "System Message",
|
||||
"dynamic": false,
|
||||
"info": "System message to pass to the model.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -2714,8 +2556,5 @@
|
|||
"is_component": false,
|
||||
"last_tested_version": "1.1.1",
|
||||
"name": "Market Research",
|
||||
"tags": [
|
||||
"assistants",
|
||||
"agents"
|
||||
]
|
||||
}
|
||||
"tags": ["assistants", "agents"]
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -8,17 +8,12 @@
|
|||
"dataType": "Memory",
|
||||
"id": "Memory-gWJrq",
|
||||
"name": "messages_text",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "memory",
|
||||
"id": "Prompt-yhdMP",
|
||||
"inputTypes": [
|
||||
"Message",
|
||||
"Text"
|
||||
],
|
||||
"inputTypes": ["Message", "Text"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -36,16 +31,12 @@
|
|||
"dataType": "ChatInput",
|
||||
"id": "ChatInput-PEO9d",
|
||||
"name": "message",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "OpenAIModel-63o3Q",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -63,16 +54,12 @@
|
|||
"dataType": "Prompt",
|
||||
"id": "Prompt-yhdMP",
|
||||
"name": "prompt",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "system_message",
|
||||
"id": "OpenAIModel-63o3Q",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -90,18 +77,12 @@
|
|||
"dataType": "OpenAIModel",
|
||||
"id": "OpenAIModel-63o3Q",
|
||||
"name": "text_output",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "ChatOutput-BIXzI",
|
||||
"inputTypes": [
|
||||
"Data",
|
||||
"DataFrame",
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Data", "DataFrame", "Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -118,9 +99,7 @@
|
|||
"data": {
|
||||
"id": "ChatInput-PEO9d",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -154,9 +133,7 @@
|
|||
"name": "message",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -169,9 +146,7 @@
|
|||
"display_name": "Background Color",
|
||||
"dynamic": false,
|
||||
"info": "The background color of the icon.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "background_color",
|
||||
|
|
@ -191,9 +166,7 @@
|
|||
"display_name": "Icon",
|
||||
"dynamic": false,
|
||||
"info": "The icon of the message.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "chat_icon",
|
||||
|
|
@ -223,7 +196,7 @@
|
|||
"show": true,
|
||||
"title_case": false,
|
||||
"type": "code",
|
||||
"value": "from langflow.base.data.utils import IMG_FILE_TYPES, TEXT_FILE_TYPES\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.inputs import BoolInput\nfrom langflow.io import (\n DropdownInput,\n FileInput,\n MessageTextInput,\n MultilineInput,\n Output,\n)\nfrom langflow.schema.message import Message\nfrom langflow.utils.constants import (\n MESSAGE_SENDER_AI,\n MESSAGE_SENDER_NAME_USER,\n MESSAGE_SENDER_USER,\n)\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"MessagesSquare\"\n name = \"ChatInput\"\n minimized = True\n\n inputs = [\n MultilineInput(\n name=\"input_value\",\n display_name=\"Text\",\n value=\"\",\n info=\"Message to be passed as input.\",\n input_types=[],\n ),\n BoolInput(\n name=\"should_store_message\",\n display_name=\"Store Messages\",\n info=\"Store the message in the history.\",\n value=True,\n advanced=True,\n ),\n DropdownInput(\n name=\"sender\",\n display_name=\"Sender Type\",\n options=[MESSAGE_SENDER_AI, MESSAGE_SENDER_USER],\n value=MESSAGE_SENDER_USER,\n info=\"Type of sender.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"sender_name\",\n display_name=\"Sender Name\",\n info=\"Name of the sender.\",\n value=MESSAGE_SENDER_NAME_USER,\n advanced=True,\n ),\n MessageTextInput(\n name=\"session_id\",\n display_name=\"Session ID\",\n info=\"The session ID of the chat. If empty, the current session ID parameter will be used.\",\n advanced=True,\n ),\n FileInput(\n name=\"files\",\n display_name=\"Files\",\n file_types=TEXT_FILE_TYPES + IMG_FILE_TYPES,\n info=\"Files to be sent with the message.\",\n advanced=True,\n is_list=True,\n ),\n MessageTextInput(\n name=\"background_color\",\n display_name=\"Background Color\",\n info=\"The background color of the icon.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"chat_icon\",\n display_name=\"Icon\",\n info=\"The icon of the message.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"text_color\",\n display_name=\"Text Color\",\n info=\"The text color of the name\",\n advanced=True,\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"message_response\"),\n ]\n\n async def message_response(self) -> Message:\n background_color = self.background_color\n text_color = self.text_color\n icon = self.chat_icon\n\n message = await Message.create(\n text=self.input_value,\n sender=self.sender,\n sender_name=self.sender_name,\n session_id=self.session_id,\n files=self.files,\n properties={\n \"background_color\": background_color,\n \"text_color\": text_color,\n \"icon\": icon,\n },\n )\n if self.session_id and isinstance(message, Message) and self.should_store_message:\n stored_message = await self.send_message(\n message,\n )\n self.message.value = stored_message\n message = stored_message\n\n self.status = message\n return message\n"
|
||||
"value": "from langflow.base.data.utils import IMG_FILE_TYPES, TEXT_FILE_TYPES\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.inputs import BoolInput\nfrom langflow.io import (\n DropdownInput,\n FileInput,\n MessageTextInput,\n MultilineInput,\n Output,\n)\nfrom langflow.schema.message import Message\nfrom langflow.utils.constants import (\n MESSAGE_SENDER_AI,\n MESSAGE_SENDER_NAME_USER,\n MESSAGE_SENDER_USER,\n)\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"MessagesSquare\"\n name = \"ChatInput\"\n minimized = True\n\n inputs = [\n MultilineInput(\n name=\"input_value\",\n display_name=\"Text\",\n value=\"\",\n info=\"Message to be passed as input.\",\n input_types=[],\n ),\n BoolInput(\n name=\"should_store_message\",\n display_name=\"Store Messages\",\n info=\"Store the message in the history.\",\n value=True,\n advanced=True,\n ),\n DropdownInput(\n name=\"sender\",\n display_name=\"Sender Type\",\n options=[MESSAGE_SENDER_AI, MESSAGE_SENDER_USER],\n value=MESSAGE_SENDER_USER,\n info=\"Type of sender.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"sender_name\",\n display_name=\"Sender Name\",\n info=\"Name of the sender.\",\n value=MESSAGE_SENDER_NAME_USER,\n advanced=True,\n ),\n MessageTextInput(\n name=\"session_id\",\n display_name=\"Session ID\",\n info=\"The session ID of the chat. If empty, the current session ID parameter will be used.\",\n advanced=True,\n ),\n FileInput(\n name=\"files\",\n display_name=\"Files\",\n file_types=TEXT_FILE_TYPES + IMG_FILE_TYPES,\n info=\"Files to be sent with the message.\",\n advanced=True,\n is_list=True,\n temp_file=True,\n ),\n MessageTextInput(\n name=\"background_color\",\n display_name=\"Background Color\",\n info=\"The background color of the icon.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"chat_icon\",\n display_name=\"Icon\",\n info=\"The icon of the message.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"text_color\",\n display_name=\"Text Color\",\n info=\"The text color of the name\",\n advanced=True,\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"message_response\"),\n ]\n\n async def message_response(self) -> Message:\n background_color = self.background_color\n text_color = self.text_color\n icon = self.chat_icon\n\n message = await Message.create(\n text=self.input_value,\n sender=self.sender,\n sender_name=self.sender_name,\n session_id=self.session_id,\n files=self.files,\n properties={\n \"background_color\": background_color,\n \"text_color\": text_color,\n \"icon\": icon,\n },\n )\n if self.session_id and isinstance(message, Message) and self.should_store_message:\n stored_message = await self.send_message(\n message,\n )\n self.message.value = stored_message\n message = stored_message\n\n self.status = message\n return message\n"
|
||||
},
|
||||
"files": {
|
||||
"_input_type": "FileInput",
|
||||
|
|
@ -262,6 +235,7 @@
|
|||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
"temp_file": true,
|
||||
"title_case": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "file",
|
||||
|
|
@ -296,10 +270,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Type of sender.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User"
|
||||
],
|
||||
"options": ["Machine", "User"],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
|
|
@ -315,9 +286,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Name of the sender.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "sender_name",
|
||||
|
|
@ -337,9 +306,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "session_id",
|
||||
|
|
@ -375,9 +342,7 @@
|
|||
"display_name": "Text Color",
|
||||
"dynamic": false,
|
||||
"info": "The text color of the name",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "text_color",
|
||||
|
|
@ -421,9 +386,7 @@
|
|||
"display_name": "Chat Output",
|
||||
"id": "ChatOutput-BIXzI",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -457,9 +420,7 @@
|
|||
"name": "message",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -472,9 +433,7 @@
|
|||
"display_name": "Background Color",
|
||||
"dynamic": false,
|
||||
"info": "The background color of the icon.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "background_color",
|
||||
|
|
@ -494,9 +453,7 @@
|
|||
"display_name": "Icon",
|
||||
"dynamic": false,
|
||||
"info": "The icon of the message.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "chat_icon",
|
||||
|
|
@ -552,9 +509,7 @@
|
|||
"display_name": "Data Template",
|
||||
"dynamic": false,
|
||||
"info": "Template to convert Data to Text. If left empty, it will be dynamically set to the Data's text key.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "data_template",
|
||||
|
|
@ -574,11 +529,7 @@
|
|||
"display_name": "Text",
|
||||
"dynamic": false,
|
||||
"info": "Message to be passed as output.",
|
||||
"input_types": [
|
||||
"Data",
|
||||
"DataFrame",
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Data", "DataFrame", "Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "input_value",
|
||||
|
|
@ -599,10 +550,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Type of sender.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User"
|
||||
],
|
||||
"options": ["Machine", "User"],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
|
|
@ -618,9 +566,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Name of the sender.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "sender_name",
|
||||
|
|
@ -640,9 +586,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "session_id",
|
||||
|
|
@ -678,9 +622,7 @@
|
|||
"display_name": "Text Color",
|
||||
"dynamic": false,
|
||||
"info": "The text color of the name",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "text_color",
|
||||
|
|
@ -789,10 +731,7 @@
|
|||
"data": {
|
||||
"id": "Memory-gWJrq",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Data",
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Data", "Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -824,9 +763,7 @@
|
|||
"name": "messages",
|
||||
"selected": "Data",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Data"
|
||||
],
|
||||
"types": ["Data"],
|
||||
"value": "__UNDEFINED__"
|
||||
},
|
||||
{
|
||||
|
|
@ -837,9 +774,7 @@
|
|||
"name": "messages_text",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
},
|
||||
{
|
||||
|
|
@ -850,9 +785,7 @@
|
|||
"name": "dataframe",
|
||||
"selected": "DataFrame",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"DataFrame"
|
||||
],
|
||||
"types": ["DataFrame"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -883,9 +816,7 @@
|
|||
"display_name": "External Memory",
|
||||
"dynamic": false,
|
||||
"info": "Retrieve messages from an external memory. If empty, it will use the Langflow tables.",
|
||||
"input_types": [
|
||||
"Memory"
|
||||
],
|
||||
"input_types": ["Memory"],
|
||||
"list": false,
|
||||
"name": "memory",
|
||||
"placeholder": "",
|
||||
|
|
@ -920,10 +851,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Order of the messages.",
|
||||
"name": "order",
|
||||
"options": [
|
||||
"Ascending",
|
||||
"Descending"
|
||||
],
|
||||
"options": ["Ascending", "Descending"],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
|
|
@ -941,11 +869,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Filter by sender type.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User",
|
||||
"Machine and User"
|
||||
],
|
||||
"options": ["Machine", "User", "Machine and User"],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
|
|
@ -961,9 +885,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Filter by sender name.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "sender_name",
|
||||
|
|
@ -983,9 +905,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "session_id",
|
||||
|
|
@ -1005,9 +925,7 @@
|
|||
"display_name": "Template",
|
||||
"dynamic": false,
|
||||
"info": "The template to use for formatting the data. It can contain the keys {text}, {sender} or any other key in the message data.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"multiline": true,
|
||||
|
|
@ -1050,24 +968,18 @@
|
|||
"data": {
|
||||
"id": "Prompt-yhdMP",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {
|
||||
"template": [
|
||||
"memory"
|
||||
]
|
||||
"template": ["memory"]
|
||||
},
|
||||
"description": "Create a prompt template with dynamic variables.",
|
||||
"display_name": "Prompt",
|
||||
"documentation": "",
|
||||
"edited": false,
|
||||
"error": null,
|
||||
"field_order": [
|
||||
"template"
|
||||
],
|
||||
"field_order": ["template"],
|
||||
"frozen": false,
|
||||
"full_path": null,
|
||||
"icon": "prompts",
|
||||
|
|
@ -1088,9 +1000,7 @@
|
|||
"name": "prompt",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -1123,10 +1033,7 @@
|
|||
"fileTypes": [],
|
||||
"file_path": "",
|
||||
"info": "",
|
||||
"input_types": [
|
||||
"Message",
|
||||
"Text"
|
||||
],
|
||||
"input_types": ["Message", "Text"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"multiline": true,
|
||||
|
|
@ -1161,9 +1068,7 @@
|
|||
"display_name": "Tool Placeholder",
|
||||
"dynamic": false,
|
||||
"info": "A placeholder input for tool mode.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "tool_placeholder",
|
||||
|
|
@ -1205,10 +1110,7 @@
|
|||
"data": {
|
||||
"id": "OpenAIModel-63o3Q",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"LanguageModel",
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["LanguageModel", "Message"],
|
||||
"beta": false,
|
||||
"category": "models",
|
||||
"conditional_paths": [],
|
||||
|
|
@ -1247,9 +1149,7 @@
|
|||
"required_inputs": [],
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
},
|
||||
{
|
||||
|
|
@ -1258,14 +1158,10 @@
|
|||
"display_name": "Language Model",
|
||||
"method": "build_model",
|
||||
"name": "model_output",
|
||||
"required_inputs": [
|
||||
"api_key"
|
||||
],
|
||||
"required_inputs": ["api_key"],
|
||||
"selected": "LanguageModel",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"LanguageModel"
|
||||
],
|
||||
"types": ["LanguageModel"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -1279,9 +1175,7 @@
|
|||
"display_name": "OpenAI API Key",
|
||||
"dynamic": false,
|
||||
"info": "The OpenAI API Key to use for the OpenAI model.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"load_from_db": true,
|
||||
"name": "api_key",
|
||||
"password": true,
|
||||
|
|
@ -1316,9 +1210,7 @@
|
|||
"display_name": "Input",
|
||||
"dynamic": false,
|
||||
"info": "",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1500,9 +1392,7 @@
|
|||
"display_name": "System Message",
|
||||
"dynamic": false,
|
||||
"info": "System message to pass to the model.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1598,9 +1488,5 @@
|
|||
"is_component": false,
|
||||
"last_tested_version": "1.0.19.post2",
|
||||
"name": "Memory Chatbot",
|
||||
"tags": [
|
||||
"chatbots",
|
||||
"openai",
|
||||
"assistants"
|
||||
]
|
||||
}
|
||||
"tags": ["chatbots", "openai", "assistants"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,16 +9,12 @@
|
|||
"dataType": "AgentQL",
|
||||
"id": "AgentQL-QrQyl",
|
||||
"name": "component_as_tool",
|
||||
"output_types": [
|
||||
"Tool"
|
||||
]
|
||||
"output_types": ["Tool"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "tools",
|
||||
"id": "Agent-DlbOP",
|
||||
"inputTypes": [
|
||||
"Tool"
|
||||
],
|
||||
"inputTypes": ["Tool"],
|
||||
"type": "other"
|
||||
}
|
||||
},
|
||||
|
|
@ -37,16 +33,12 @@
|
|||
"dataType": "ChatInput",
|
||||
"id": "ChatInput-rZZHB",
|
||||
"name": "message",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "Agent-DlbOP",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -64,18 +56,12 @@
|
|||
"dataType": "Agent",
|
||||
"id": "Agent-DlbOP",
|
||||
"name": "response",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "ChatOutput-tCBqx",
|
||||
"inputTypes": [
|
||||
"Data",
|
||||
"DataFrame",
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Data", "DataFrame", "Message"],
|
||||
"type": "other"
|
||||
}
|
||||
},
|
||||
|
|
@ -147,9 +133,7 @@
|
|||
"display_name": "AgentQL Query Data",
|
||||
"id": "AgentQL-QrQyl",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Data"
|
||||
],
|
||||
"base_classes": ["Data"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -186,9 +170,7 @@
|
|||
"required_inputs": null,
|
||||
"selected": "Tool",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Tool"
|
||||
],
|
||||
"types": ["Tool"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -201,9 +183,7 @@
|
|||
"display_name": "API Key",
|
||||
"dynamic": false,
|
||||
"info": "Your AgentQL API key from dev.agentql.com",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"load_from_db": false,
|
||||
"name": "api_key",
|
||||
"password": true,
|
||||
|
|
@ -295,10 +275,7 @@
|
|||
"dynamic": false,
|
||||
"info": "'standard' uses deep data analysis, while 'fast' trades some depth of analysis for speed.",
|
||||
"name": "mode",
|
||||
"options": [
|
||||
"fast",
|
||||
"standard"
|
||||
],
|
||||
"options": ["fast", "standard"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -316,9 +293,7 @@
|
|||
"display_name": "Prompt",
|
||||
"dynamic": false,
|
||||
"info": "A Natural Language description of the data to extract from the page. Alternative to AgentQL query.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -341,9 +316,7 @@
|
|||
"display_name": "AgentQL Query",
|
||||
"dynamic": false,
|
||||
"info": "The AgentQL query to execute. Learn more at https://docs.agentql.com/agentql-query or use a prompt.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -402,10 +375,7 @@
|
|||
"description": "Modify tool names and descriptions to help agents understand when to use each tool.",
|
||||
"field_parsers": {
|
||||
"commands": "commands",
|
||||
"name": [
|
||||
"snake_case",
|
||||
"no_blank"
|
||||
]
|
||||
"name": ["snake_case", "no_blank"]
|
||||
},
|
||||
"hide_options": true
|
||||
},
|
||||
|
|
@ -489,9 +459,7 @@
|
|||
"description": "build_output(api_key: Message, url: Message) - Extracts structured data from a web page using an AgentQL query or a Natural Language description.",
|
||||
"name": "AgentQL-build_output",
|
||||
"status": true,
|
||||
"tags": [
|
||||
"AgentQL-build_output"
|
||||
]
|
||||
"tags": ["AgentQL-build_output"]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
@ -501,9 +469,7 @@
|
|||
"display_name": "URL",
|
||||
"dynamic": false,
|
||||
"info": "The URL of the public web page you want to extract data from.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -565,9 +531,7 @@
|
|||
"data": {
|
||||
"id": "ChatInput-rZZHB",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"category": "inputs",
|
||||
"conditional_paths": [],
|
||||
|
|
@ -604,9 +568,7 @@
|
|||
"name": "message",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -620,9 +582,7 @@
|
|||
"display_name": "Background Color",
|
||||
"dynamic": false,
|
||||
"info": "The background color of the icon.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -643,9 +603,7 @@
|
|||
"display_name": "Icon",
|
||||
"dynamic": false,
|
||||
"info": "The icon of the message.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -676,7 +634,7 @@
|
|||
"show": true,
|
||||
"title_case": false,
|
||||
"type": "code",
|
||||
"value": "from langflow.base.data.utils import IMG_FILE_TYPES, TEXT_FILE_TYPES\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.inputs import BoolInput\nfrom langflow.io import (\n DropdownInput,\n FileInput,\n MessageTextInput,\n MultilineInput,\n Output,\n)\nfrom langflow.schema.message import Message\nfrom langflow.utils.constants import (\n MESSAGE_SENDER_AI,\n MESSAGE_SENDER_NAME_USER,\n MESSAGE_SENDER_USER,\n)\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"MessagesSquare\"\n name = \"ChatInput\"\n minimized = True\n\n inputs = [\n MultilineInput(\n name=\"input_value\",\n display_name=\"Text\",\n value=\"\",\n info=\"Message to be passed as input.\",\n input_types=[],\n ),\n BoolInput(\n name=\"should_store_message\",\n display_name=\"Store Messages\",\n info=\"Store the message in the history.\",\n value=True,\n advanced=True,\n ),\n DropdownInput(\n name=\"sender\",\n display_name=\"Sender Type\",\n options=[MESSAGE_SENDER_AI, MESSAGE_SENDER_USER],\n value=MESSAGE_SENDER_USER,\n info=\"Type of sender.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"sender_name\",\n display_name=\"Sender Name\",\n info=\"Name of the sender.\",\n value=MESSAGE_SENDER_NAME_USER,\n advanced=True,\n ),\n MessageTextInput(\n name=\"session_id\",\n display_name=\"Session ID\",\n info=\"The session ID of the chat. If empty, the current session ID parameter will be used.\",\n advanced=True,\n ),\n FileInput(\n name=\"files\",\n display_name=\"Files\",\n file_types=TEXT_FILE_TYPES + IMG_FILE_TYPES,\n info=\"Files to be sent with the message.\",\n advanced=True,\n is_list=True,\n ),\n MessageTextInput(\n name=\"background_color\",\n display_name=\"Background Color\",\n info=\"The background color of the icon.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"chat_icon\",\n display_name=\"Icon\",\n info=\"The icon of the message.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"text_color\",\n display_name=\"Text Color\",\n info=\"The text color of the name\",\n advanced=True,\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"message_response\"),\n ]\n\n async def message_response(self) -> Message:\n background_color = self.background_color\n text_color = self.text_color\n icon = self.chat_icon\n\n message = await Message.create(\n text=self.input_value,\n sender=self.sender,\n sender_name=self.sender_name,\n session_id=self.session_id,\n files=self.files,\n properties={\n \"background_color\": background_color,\n \"text_color\": text_color,\n \"icon\": icon,\n },\n )\n if self.session_id and isinstance(message, Message) and self.should_store_message:\n stored_message = await self.send_message(\n message,\n )\n self.message.value = stored_message\n message = stored_message\n\n self.status = message\n return message\n"
|
||||
"value": "from langflow.base.data.utils import IMG_FILE_TYPES, TEXT_FILE_TYPES\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.inputs import BoolInput\nfrom langflow.io import (\n DropdownInput,\n FileInput,\n MessageTextInput,\n MultilineInput,\n Output,\n)\nfrom langflow.schema.message import Message\nfrom langflow.utils.constants import (\n MESSAGE_SENDER_AI,\n MESSAGE_SENDER_NAME_USER,\n MESSAGE_SENDER_USER,\n)\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"MessagesSquare\"\n name = \"ChatInput\"\n minimized = True\n\n inputs = [\n MultilineInput(\n name=\"input_value\",\n display_name=\"Text\",\n value=\"\",\n info=\"Message to be passed as input.\",\n input_types=[],\n ),\n BoolInput(\n name=\"should_store_message\",\n display_name=\"Store Messages\",\n info=\"Store the message in the history.\",\n value=True,\n advanced=True,\n ),\n DropdownInput(\n name=\"sender\",\n display_name=\"Sender Type\",\n options=[MESSAGE_SENDER_AI, MESSAGE_SENDER_USER],\n value=MESSAGE_SENDER_USER,\n info=\"Type of sender.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"sender_name\",\n display_name=\"Sender Name\",\n info=\"Name of the sender.\",\n value=MESSAGE_SENDER_NAME_USER,\n advanced=True,\n ),\n MessageTextInput(\n name=\"session_id\",\n display_name=\"Session ID\",\n info=\"The session ID of the chat. If empty, the current session ID parameter will be used.\",\n advanced=True,\n ),\n FileInput(\n name=\"files\",\n display_name=\"Files\",\n file_types=TEXT_FILE_TYPES + IMG_FILE_TYPES,\n info=\"Files to be sent with the message.\",\n advanced=True,\n is_list=True,\n temp_file=True,\n ),\n MessageTextInput(\n name=\"background_color\",\n display_name=\"Background Color\",\n info=\"The background color of the icon.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"chat_icon\",\n display_name=\"Icon\",\n info=\"The icon of the message.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"text_color\",\n display_name=\"Text Color\",\n info=\"The text color of the name\",\n advanced=True,\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"message_response\"),\n ]\n\n async def message_response(self) -> Message:\n background_color = self.background_color\n text_color = self.text_color\n icon = self.chat_icon\n\n message = await Message.create(\n text=self.input_value,\n sender=self.sender,\n sender_name=self.sender_name,\n session_id=self.session_id,\n files=self.files,\n properties={\n \"background_color\": background_color,\n \"text_color\": text_color,\n \"icon\": icon,\n },\n )\n if self.session_id and isinstance(message, Message) and self.should_store_message:\n stored_message = await self.send_message(\n message,\n )\n self.message.value = stored_message\n message = stored_message\n\n self.status = message\n return message\n"
|
||||
},
|
||||
"files": {
|
||||
"_input_type": "FileInput",
|
||||
|
|
@ -716,6 +674,7 @@
|
|||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
"temp_file": true,
|
||||
"title_case": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "file",
|
||||
|
|
@ -752,10 +711,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Type of sender.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User"
|
||||
],
|
||||
"options": ["Machine", "User"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -772,9 +728,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Name of the sender.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -795,9 +749,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -836,9 +788,7 @@
|
|||
"display_name": "Text Color",
|
||||
"dynamic": false,
|
||||
"info": "The text color of the name",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -876,9 +826,7 @@
|
|||
"data": {
|
||||
"id": "ChatOutput-tCBqx",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -913,9 +861,7 @@
|
|||
"name": "message",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -928,9 +874,7 @@
|
|||
"display_name": "Background Color",
|
||||
"dynamic": false,
|
||||
"info": "The background color of the icon.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -951,9 +895,7 @@
|
|||
"display_name": "Icon",
|
||||
"dynamic": false,
|
||||
"info": "The icon of the message.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1010,9 +952,7 @@
|
|||
"display_name": "Data Template",
|
||||
"dynamic": false,
|
||||
"info": "Template to convert Data to Text. If left empty, it will be dynamically set to the Data's text key.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1033,11 +973,7 @@
|
|||
"display_name": "Text",
|
||||
"dynamic": false,
|
||||
"info": "Message to be passed as output.",
|
||||
"input_types": [
|
||||
"Data",
|
||||
"DataFrame",
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Data", "DataFrame", "Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"name": "input_value",
|
||||
|
|
@ -1058,10 +994,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Type of sender.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User"
|
||||
],
|
||||
"options": ["Machine", "User"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -1078,9 +1011,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Name of the sender.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1101,9 +1032,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1142,9 +1071,7 @@
|
|||
"display_name": "Text Color",
|
||||
"dynamic": false,
|
||||
"info": "The text color of the name",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1182,9 +1109,7 @@
|
|||
"data": {
|
||||
"id": "Agent-DlbOP",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -1235,9 +1160,7 @@
|
|||
"name": "response",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -1268,9 +1191,7 @@
|
|||
"display_name": "Agent Description [Deprecated]",
|
||||
"dynamic": false,
|
||||
"info": "The description of the agent. This is only used when in Tool Mode. Defaults to 'A helpful assistant with access to the following tools:' and tools are added dynamically. This feature is deprecated and will be removed in future versions.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1352,9 +1273,7 @@
|
|||
"display_name": "OpenAI API Key",
|
||||
"dynamic": false,
|
||||
"info": "The OpenAI API Key to use for the OpenAI model.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"load_from_db": true,
|
||||
"name": "api_key",
|
||||
"password": true,
|
||||
|
|
@ -1407,9 +1326,7 @@
|
|||
"display_name": "Input",
|
||||
"dynamic": false,
|
||||
"info": "The input provided by the user for the agent to process.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1508,9 +1425,7 @@
|
|||
"display_name": "External Memory",
|
||||
"dynamic": false,
|
||||
"info": "Retrieve messages from an external memory. If empty, it will use the Langflow tables.",
|
||||
"input_types": [
|
||||
"Memory"
|
||||
],
|
||||
"input_types": ["Memory"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"name": "memory",
|
||||
|
|
@ -1615,10 +1530,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Order of the messages.",
|
||||
"name": "order",
|
||||
"options": [
|
||||
"Ascending",
|
||||
"Descending"
|
||||
],
|
||||
"options": ["Ascending", "Descending"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -1656,11 +1568,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Filter by sender type.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User",
|
||||
"Machine and User"
|
||||
],
|
||||
"options": ["Machine", "User", "Machine and User"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -1677,9 +1585,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Filter by sender name.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1700,9 +1606,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1723,9 +1627,7 @@
|
|||
"display_name": "Agent Instructions",
|
||||
"dynamic": false,
|
||||
"info": "System Prompt: Initial instructions and context provided to guide the agent's behavior.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1775,9 +1677,7 @@
|
|||
"display_name": "Template",
|
||||
"dynamic": false,
|
||||
"info": "The template to use for formatting the data. It can contain the keys {text}, {sender} or any other key in the message data.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1817,9 +1717,7 @@
|
|||
"display_name": "Tools",
|
||||
"dynamic": false,
|
||||
"info": "These are the tools that the agent can use to help with tasks.",
|
||||
"input_types": [
|
||||
"Tool"
|
||||
],
|
||||
"input_types": ["Tool"],
|
||||
"list": true,
|
||||
"list_add_label": "Add More",
|
||||
"name": "tools",
|
||||
|
|
@ -1907,8 +1805,5 @@
|
|||
"is_component": false,
|
||||
"last_tested_version": "1.2.0",
|
||||
"name": "News Aggregator",
|
||||
"tags": [
|
||||
"web-scraping",
|
||||
"agents"
|
||||
]
|
||||
}
|
||||
"tags": ["web-scraping", "agents"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,16 +9,12 @@
|
|||
"dataType": "APIRequest",
|
||||
"id": "APIRequest-KJLNf",
|
||||
"name": "component_as_tool",
|
||||
"output_types": [
|
||||
"Tool"
|
||||
]
|
||||
"output_types": ["Tool"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "tools",
|
||||
"id": "Agent-gZkrx",
|
||||
"inputTypes": [
|
||||
"Tool"
|
||||
],
|
||||
"inputTypes": ["Tool"],
|
||||
"type": "other"
|
||||
}
|
||||
},
|
||||
|
|
@ -37,16 +33,12 @@
|
|||
"dataType": "ChatInput",
|
||||
"id": "ChatInput-eumKo",
|
||||
"name": "message",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "Agent-gZkrx",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -65,18 +57,12 @@
|
|||
"dataType": "Agent",
|
||||
"id": "Agent-gZkrx",
|
||||
"name": "response",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "ChatOutput-D4JWF",
|
||||
"inputTypes": [
|
||||
"Data",
|
||||
"DataFrame",
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Data", "DataFrame", "Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -95,10 +81,7 @@
|
|||
"display_name": "API Request",
|
||||
"id": "APIRequest-KJLNf",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Data",
|
||||
"DataFrame"
|
||||
],
|
||||
"base_classes": ["Data", "DataFrame"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -137,9 +120,7 @@
|
|||
"required_inputs": null,
|
||||
"selected": "Tool",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Tool"
|
||||
],
|
||||
"types": ["Tool"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -152,9 +133,7 @@
|
|||
"display_name": "Body",
|
||||
"dynamic": false,
|
||||
"info": "The body to send with the request as a dictionary (for POST, PATCH, PUT).",
|
||||
"input_types": [
|
||||
"Data"
|
||||
],
|
||||
"input_types": ["Data"],
|
||||
"is_list": true,
|
||||
"list_add_label": "Add More",
|
||||
"name": "body",
|
||||
|
|
@ -223,9 +202,7 @@
|
|||
"display_name": "cURL",
|
||||
"dynamic": false,
|
||||
"info": "Paste a curl command to populate the fields. This will fill in the dictionary fields for headers and body.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -266,9 +243,7 @@
|
|||
"display_name": "Headers",
|
||||
"dynamic": false,
|
||||
"info": "The headers to send with the request as a dictionary.",
|
||||
"input_types": [
|
||||
"Data"
|
||||
],
|
||||
"input_types": ["Data"],
|
||||
"is_list": true,
|
||||
"list_add_label": "Add More",
|
||||
"name": "headers",
|
||||
|
|
@ -342,13 +317,7 @@
|
|||
"info": "The HTTP method to use.",
|
||||
"load_from_db": false,
|
||||
"name": "method",
|
||||
"options": [
|
||||
"GET",
|
||||
"POST",
|
||||
"PATCH",
|
||||
"PUT",
|
||||
"DELETE"
|
||||
],
|
||||
"options": ["GET", "POST", "PATCH", "PUT", "DELETE"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"real_time_refresh": true,
|
||||
|
|
@ -366,9 +335,7 @@
|
|||
"display_name": "Query Parameters",
|
||||
"dynamic": false,
|
||||
"info": "The query parameters to append to the URL.",
|
||||
"input_types": [
|
||||
"Data"
|
||||
],
|
||||
"input_types": ["Data"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -444,10 +411,7 @@
|
|||
"description": "Modify tool names and descriptions to help agents understand when to use each tool.",
|
||||
"field_parsers": {
|
||||
"commands": "commands",
|
||||
"name": [
|
||||
"snake_case",
|
||||
"no_blank"
|
||||
]
|
||||
"name": ["snake_case", "no_blank"]
|
||||
},
|
||||
"hide_options": true
|
||||
},
|
||||
|
|
@ -518,17 +482,13 @@
|
|||
"description": "make_requests() - Make HTTP requests using URLs or cURL commands.",
|
||||
"name": "APIRequest-make_requests",
|
||||
"status": true,
|
||||
"tags": [
|
||||
"APIRequest-make_requests"
|
||||
]
|
||||
"tags": ["APIRequest-make_requests"]
|
||||
},
|
||||
{
|
||||
"description": "as_dataframe() - Make HTTP requests using URLs or cURL commands.",
|
||||
"name": "APIRequest-as_dataframe",
|
||||
"status": true,
|
||||
"tags": [
|
||||
"APIRequest-as_dataframe"
|
||||
]
|
||||
"tags": ["APIRequest-as_dataframe"]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
@ -538,9 +498,7 @@
|
|||
"display_name": "URLs",
|
||||
"dynamic": false,
|
||||
"info": "Enter one or more URLs, separated by commas.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": true,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -553,9 +511,7 @@
|
|||
"trace_as_input": true,
|
||||
"trace_as_metadata": true,
|
||||
"type": "str",
|
||||
"value": [
|
||||
""
|
||||
]
|
||||
"value": [""]
|
||||
},
|
||||
"use_curl": {
|
||||
"_input_type": "BoolInput",
|
||||
|
|
@ -599,9 +555,7 @@
|
|||
"data": {
|
||||
"id": "ChatInput-eumKo",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"category": "inputs",
|
||||
"conditional_paths": [],
|
||||
|
|
@ -638,9 +592,7 @@
|
|||
"name": "message",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -654,9 +606,7 @@
|
|||
"display_name": "Background Color",
|
||||
"dynamic": false,
|
||||
"info": "The background color of the icon.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -677,9 +627,7 @@
|
|||
"display_name": "Icon",
|
||||
"dynamic": false,
|
||||
"info": "The icon of the message.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -710,7 +658,7 @@
|
|||
"show": true,
|
||||
"title_case": false,
|
||||
"type": "code",
|
||||
"value": "from langflow.base.data.utils import IMG_FILE_TYPES, TEXT_FILE_TYPES\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.inputs import BoolInput\nfrom langflow.io import (\n DropdownInput,\n FileInput,\n MessageTextInput,\n MultilineInput,\n Output,\n)\nfrom langflow.schema.message import Message\nfrom langflow.utils.constants import (\n MESSAGE_SENDER_AI,\n MESSAGE_SENDER_NAME_USER,\n MESSAGE_SENDER_USER,\n)\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"MessagesSquare\"\n name = \"ChatInput\"\n minimized = True\n\n inputs = [\n MultilineInput(\n name=\"input_value\",\n display_name=\"Text\",\n value=\"\",\n info=\"Message to be passed as input.\",\n input_types=[],\n ),\n BoolInput(\n name=\"should_store_message\",\n display_name=\"Store Messages\",\n info=\"Store the message in the history.\",\n value=True,\n advanced=True,\n ),\n DropdownInput(\n name=\"sender\",\n display_name=\"Sender Type\",\n options=[MESSAGE_SENDER_AI, MESSAGE_SENDER_USER],\n value=MESSAGE_SENDER_USER,\n info=\"Type of sender.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"sender_name\",\n display_name=\"Sender Name\",\n info=\"Name of the sender.\",\n value=MESSAGE_SENDER_NAME_USER,\n advanced=True,\n ),\n MessageTextInput(\n name=\"session_id\",\n display_name=\"Session ID\",\n info=\"The session ID of the chat. If empty, the current session ID parameter will be used.\",\n advanced=True,\n ),\n FileInput(\n name=\"files\",\n display_name=\"Files\",\n file_types=TEXT_FILE_TYPES + IMG_FILE_TYPES,\n info=\"Files to be sent with the message.\",\n advanced=True,\n is_list=True,\n ),\n MessageTextInput(\n name=\"background_color\",\n display_name=\"Background Color\",\n info=\"The background color of the icon.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"chat_icon\",\n display_name=\"Icon\",\n info=\"The icon of the message.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"text_color\",\n display_name=\"Text Color\",\n info=\"The text color of the name\",\n advanced=True,\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"message_response\"),\n ]\n\n async def message_response(self) -> Message:\n background_color = self.background_color\n text_color = self.text_color\n icon = self.chat_icon\n\n message = await Message.create(\n text=self.input_value,\n sender=self.sender,\n sender_name=self.sender_name,\n session_id=self.session_id,\n files=self.files,\n properties={\n \"background_color\": background_color,\n \"text_color\": text_color,\n \"icon\": icon,\n },\n )\n if self.session_id and isinstance(message, Message) and self.should_store_message:\n stored_message = await self.send_message(\n message,\n )\n self.message.value = stored_message\n message = stored_message\n\n self.status = message\n return message\n"
|
||||
"value": "from langflow.base.data.utils import IMG_FILE_TYPES, TEXT_FILE_TYPES\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.inputs import BoolInput\nfrom langflow.io import (\n DropdownInput,\n FileInput,\n MessageTextInput,\n MultilineInput,\n Output,\n)\nfrom langflow.schema.message import Message\nfrom langflow.utils.constants import (\n MESSAGE_SENDER_AI,\n MESSAGE_SENDER_NAME_USER,\n MESSAGE_SENDER_USER,\n)\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"MessagesSquare\"\n name = \"ChatInput\"\n minimized = True\n\n inputs = [\n MultilineInput(\n name=\"input_value\",\n display_name=\"Text\",\n value=\"\",\n info=\"Message to be passed as input.\",\n input_types=[],\n ),\n BoolInput(\n name=\"should_store_message\",\n display_name=\"Store Messages\",\n info=\"Store the message in the history.\",\n value=True,\n advanced=True,\n ),\n DropdownInput(\n name=\"sender\",\n display_name=\"Sender Type\",\n options=[MESSAGE_SENDER_AI, MESSAGE_SENDER_USER],\n value=MESSAGE_SENDER_USER,\n info=\"Type of sender.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"sender_name\",\n display_name=\"Sender Name\",\n info=\"Name of the sender.\",\n value=MESSAGE_SENDER_NAME_USER,\n advanced=True,\n ),\n MessageTextInput(\n name=\"session_id\",\n display_name=\"Session ID\",\n info=\"The session ID of the chat. If empty, the current session ID parameter will be used.\",\n advanced=True,\n ),\n FileInput(\n name=\"files\",\n display_name=\"Files\",\n file_types=TEXT_FILE_TYPES + IMG_FILE_TYPES,\n info=\"Files to be sent with the message.\",\n advanced=True,\n is_list=True,\n temp_file=True,\n ),\n MessageTextInput(\n name=\"background_color\",\n display_name=\"Background Color\",\n info=\"The background color of the icon.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"chat_icon\",\n display_name=\"Icon\",\n info=\"The icon of the message.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"text_color\",\n display_name=\"Text Color\",\n info=\"The text color of the name\",\n advanced=True,\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"message_response\"),\n ]\n\n async def message_response(self) -> Message:\n background_color = self.background_color\n text_color = self.text_color\n icon = self.chat_icon\n\n message = await Message.create(\n text=self.input_value,\n sender=self.sender,\n sender_name=self.sender_name,\n session_id=self.session_id,\n files=self.files,\n properties={\n \"background_color\": background_color,\n \"text_color\": text_color,\n \"icon\": icon,\n },\n )\n if self.session_id and isinstance(message, Message) and self.should_store_message:\n stored_message = await self.send_message(\n message,\n )\n self.message.value = stored_message\n message = stored_message\n\n self.status = message\n return message\n"
|
||||
},
|
||||
"files": {
|
||||
"_input_type": "FileInput",
|
||||
|
|
@ -750,6 +698,7 @@
|
|||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
"temp_file": true,
|
||||
"title_case": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "file",
|
||||
|
|
@ -786,10 +735,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Type of sender.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User"
|
||||
],
|
||||
"options": ["Machine", "User"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -806,9 +752,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Name of the sender.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -829,9 +773,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -870,9 +812,7 @@
|
|||
"display_name": "Text Color",
|
||||
"dynamic": false,
|
||||
"info": "The text color of the name",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -910,9 +850,7 @@
|
|||
"data": {
|
||||
"id": "ChatOutput-D4JWF",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"category": "outputs",
|
||||
"conditional_paths": [],
|
||||
|
|
@ -949,9 +887,7 @@
|
|||
"name": "message",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -965,9 +901,7 @@
|
|||
"display_name": "Background Color",
|
||||
"dynamic": false,
|
||||
"info": "The background color of the icon.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -988,9 +922,7 @@
|
|||
"display_name": "Icon",
|
||||
"dynamic": false,
|
||||
"info": "The icon of the message.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1047,9 +979,7 @@
|
|||
"display_name": "Data Template",
|
||||
"dynamic": false,
|
||||
"info": "Template to convert Data to Text. If left empty, it will be dynamically set to the Data's text key.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1070,11 +1000,7 @@
|
|||
"display_name": "Text",
|
||||
"dynamic": false,
|
||||
"info": "Message to be passed as output.",
|
||||
"input_types": [
|
||||
"Data",
|
||||
"DataFrame",
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Data", "DataFrame", "Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1098,10 +1024,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Type of sender.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User"
|
||||
],
|
||||
"options": ["Machine", "User"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -1118,9 +1041,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Name of the sender.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1141,9 +1062,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1182,9 +1101,7 @@
|
|||
"display_name": "Text Color",
|
||||
"dynamic": false,
|
||||
"info": "The text color of the name",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1306,9 +1223,7 @@
|
|||
"data": {
|
||||
"id": "Agent-gZkrx",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"category": "agents",
|
||||
"conditional_paths": [],
|
||||
|
|
@ -1361,9 +1276,7 @@
|
|||
"name": "response",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -1396,9 +1309,7 @@
|
|||
"display_name": "Agent Description [Deprecated]",
|
||||
"dynamic": false,
|
||||
"info": "The description of the agent. This is only used when in Tool Mode. Defaults to 'A helpful assistant with access to the following tools:' and tools are added dynamically. This feature is deprecated and will be removed in future versions.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1480,9 +1391,7 @@
|
|||
"display_name": "OpenAI API Key",
|
||||
"dynamic": false,
|
||||
"info": "The OpenAI API Key to use for the OpenAI model.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"load_from_db": true,
|
||||
"name": "api_key",
|
||||
"password": true,
|
||||
|
|
@ -1535,9 +1444,7 @@
|
|||
"display_name": "Input",
|
||||
"dynamic": false,
|
||||
"info": "The input provided by the user for the agent to process.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1636,9 +1543,7 @@
|
|||
"display_name": "External Memory",
|
||||
"dynamic": false,
|
||||
"info": "Retrieve messages from an external memory. If empty, it will use the Langflow tables.",
|
||||
"input_types": [
|
||||
"Memory"
|
||||
],
|
||||
"input_types": ["Memory"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"name": "memory",
|
||||
|
|
@ -1743,10 +1648,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Order of the messages.",
|
||||
"name": "order",
|
||||
"options": [
|
||||
"Ascending",
|
||||
"Descending"
|
||||
],
|
||||
"options": ["Ascending", "Descending"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -1784,11 +1686,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Filter by sender type.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User",
|
||||
"Machine and User"
|
||||
],
|
||||
"options": ["Machine", "User", "Machine and User"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -1805,9 +1703,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Filter by sender name.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1828,9 +1724,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1852,9 +1746,7 @@
|
|||
"display_name": "Agent Instructions",
|
||||
"dynamic": false,
|
||||
"info": "System Prompt: Initial instructions and context provided to guide the agent's behavior.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1905,9 +1797,7 @@
|
|||
"display_name": "Template",
|
||||
"dynamic": false,
|
||||
"info": "The template to use for formatting the data. It can contain the keys {text}, {sender} or any other key in the message data.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1947,9 +1837,7 @@
|
|||
"display_name": "Tools",
|
||||
"dynamic": false,
|
||||
"info": "These are the tools that the agent can use to help with tasks.",
|
||||
"input_types": [
|
||||
"Tool"
|
||||
],
|
||||
"input_types": ["Tool"],
|
||||
"list": true,
|
||||
"list_add_label": "Add More",
|
||||
"name": "tools",
|
||||
|
|
@ -2010,7 +1898,5 @@
|
|||
"is_component": false,
|
||||
"last_tested_version": "1.2.0",
|
||||
"name": "Pokédex Agent",
|
||||
"tags": [
|
||||
"agents"
|
||||
]
|
||||
}
|
||||
"tags": ["agents"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2297,7 +2297,7 @@
|
|||
"path": {
|
||||
"_input_type": "FileInput",
|
||||
"advanced": false,
|
||||
"display_name": "Path",
|
||||
"display_name": "Files",
|
||||
"dynamic": false,
|
||||
"fileTypes": [
|
||||
"txt",
|
||||
|
|
@ -2326,7 +2326,7 @@
|
|||
],
|
||||
"file_path": "",
|
||||
"info": "Supported file extensions: txt, md, mdx, csv, json, yaml, yml, xml, html, htm, pdf, docx, py, sh, sql, js, ts, tsx; optionally bundled in file extensions: zip, tar, tgz, bz2, gz",
|
||||
"list": false,
|
||||
"list": true,
|
||||
"list_add_label": "Add More",
|
||||
"name": "path",
|
||||
"placeholder": "",
|
||||
|
|
|
|||
|
|
@ -9,16 +9,12 @@
|
|||
"dataType": "AgentQL",
|
||||
"id": "AgentQL-FEfZe",
|
||||
"name": "component_as_tool",
|
||||
"output_types": [
|
||||
"Tool"
|
||||
]
|
||||
"output_types": ["Tool"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "tools",
|
||||
"id": "Agent-C2lNW",
|
||||
"inputTypes": [
|
||||
"Tool"
|
||||
],
|
||||
"inputTypes": ["Tool"],
|
||||
"type": "other"
|
||||
}
|
||||
},
|
||||
|
|
@ -37,16 +33,12 @@
|
|||
"dataType": "TavilySearchComponent",
|
||||
"id": "TavilySearchComponent-ilBh2",
|
||||
"name": "component_as_tool",
|
||||
"output_types": [
|
||||
"Tool"
|
||||
]
|
||||
"output_types": ["Tool"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "tools",
|
||||
"id": "Agent-C2lNW",
|
||||
"inputTypes": [
|
||||
"Tool"
|
||||
],
|
||||
"inputTypes": ["Tool"],
|
||||
"type": "other"
|
||||
}
|
||||
},
|
||||
|
|
@ -65,16 +57,12 @@
|
|||
"dataType": "ChatInput",
|
||||
"id": "ChatInput-ikOpG",
|
||||
"name": "message",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "Agent-C2lNW",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -92,18 +80,12 @@
|
|||
"dataType": "Agent",
|
||||
"id": "Agent-C2lNW",
|
||||
"name": "response",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "ChatOutput-uu7cZ",
|
||||
"inputTypes": [
|
||||
"Data",
|
||||
"DataFrame",
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Data", "DataFrame", "Message"],
|
||||
"type": "other"
|
||||
}
|
||||
},
|
||||
|
|
@ -120,9 +102,7 @@
|
|||
"data": {
|
||||
"id": "ChatInput-ikOpG",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"category": "inputs",
|
||||
"conditional_paths": [],
|
||||
|
|
@ -159,9 +139,7 @@
|
|||
"name": "message",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -175,9 +153,7 @@
|
|||
"display_name": "Background Color",
|
||||
"dynamic": false,
|
||||
"info": "The background color of the icon.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -198,9 +174,7 @@
|
|||
"display_name": "Icon",
|
||||
"dynamic": false,
|
||||
"info": "The icon of the message.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -231,7 +205,7 @@
|
|||
"show": true,
|
||||
"title_case": false,
|
||||
"type": "code",
|
||||
"value": "from langflow.base.data.utils import IMG_FILE_TYPES, TEXT_FILE_TYPES\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.inputs import BoolInput\nfrom langflow.io import (\n DropdownInput,\n FileInput,\n MessageTextInput,\n MultilineInput,\n Output,\n)\nfrom langflow.schema.message import Message\nfrom langflow.utils.constants import (\n MESSAGE_SENDER_AI,\n MESSAGE_SENDER_NAME_USER,\n MESSAGE_SENDER_USER,\n)\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"MessagesSquare\"\n name = \"ChatInput\"\n minimized = True\n\n inputs = [\n MultilineInput(\n name=\"input_value\",\n display_name=\"Text\",\n value=\"\",\n info=\"Message to be passed as input.\",\n input_types=[],\n ),\n BoolInput(\n name=\"should_store_message\",\n display_name=\"Store Messages\",\n info=\"Store the message in the history.\",\n value=True,\n advanced=True,\n ),\n DropdownInput(\n name=\"sender\",\n display_name=\"Sender Type\",\n options=[MESSAGE_SENDER_AI, MESSAGE_SENDER_USER],\n value=MESSAGE_SENDER_USER,\n info=\"Type of sender.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"sender_name\",\n display_name=\"Sender Name\",\n info=\"Name of the sender.\",\n value=MESSAGE_SENDER_NAME_USER,\n advanced=True,\n ),\n MessageTextInput(\n name=\"session_id\",\n display_name=\"Session ID\",\n info=\"The session ID of the chat. If empty, the current session ID parameter will be used.\",\n advanced=True,\n ),\n FileInput(\n name=\"files\",\n display_name=\"Files\",\n file_types=TEXT_FILE_TYPES + IMG_FILE_TYPES,\n info=\"Files to be sent with the message.\",\n advanced=True,\n is_list=True,\n ),\n MessageTextInput(\n name=\"background_color\",\n display_name=\"Background Color\",\n info=\"The background color of the icon.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"chat_icon\",\n display_name=\"Icon\",\n info=\"The icon of the message.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"text_color\",\n display_name=\"Text Color\",\n info=\"The text color of the name\",\n advanced=True,\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"message_response\"),\n ]\n\n async def message_response(self) -> Message:\n background_color = self.background_color\n text_color = self.text_color\n icon = self.chat_icon\n\n message = await Message.create(\n text=self.input_value,\n sender=self.sender,\n sender_name=self.sender_name,\n session_id=self.session_id,\n files=self.files,\n properties={\n \"background_color\": background_color,\n \"text_color\": text_color,\n \"icon\": icon,\n },\n )\n if self.session_id and isinstance(message, Message) and self.should_store_message:\n stored_message = await self.send_message(\n message,\n )\n self.message.value = stored_message\n message = stored_message\n\n self.status = message\n return message\n"
|
||||
"value": "from langflow.base.data.utils import IMG_FILE_TYPES, TEXT_FILE_TYPES\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.inputs import BoolInput\nfrom langflow.io import (\n DropdownInput,\n FileInput,\n MessageTextInput,\n MultilineInput,\n Output,\n)\nfrom langflow.schema.message import Message\nfrom langflow.utils.constants import (\n MESSAGE_SENDER_AI,\n MESSAGE_SENDER_NAME_USER,\n MESSAGE_SENDER_USER,\n)\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"MessagesSquare\"\n name = \"ChatInput\"\n minimized = True\n\n inputs = [\n MultilineInput(\n name=\"input_value\",\n display_name=\"Text\",\n value=\"\",\n info=\"Message to be passed as input.\",\n input_types=[],\n ),\n BoolInput(\n name=\"should_store_message\",\n display_name=\"Store Messages\",\n info=\"Store the message in the history.\",\n value=True,\n advanced=True,\n ),\n DropdownInput(\n name=\"sender\",\n display_name=\"Sender Type\",\n options=[MESSAGE_SENDER_AI, MESSAGE_SENDER_USER],\n value=MESSAGE_SENDER_USER,\n info=\"Type of sender.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"sender_name\",\n display_name=\"Sender Name\",\n info=\"Name of the sender.\",\n value=MESSAGE_SENDER_NAME_USER,\n advanced=True,\n ),\n MessageTextInput(\n name=\"session_id\",\n display_name=\"Session ID\",\n info=\"The session ID of the chat. If empty, the current session ID parameter will be used.\",\n advanced=True,\n ),\n FileInput(\n name=\"files\",\n display_name=\"Files\",\n file_types=TEXT_FILE_TYPES + IMG_FILE_TYPES,\n info=\"Files to be sent with the message.\",\n advanced=True,\n is_list=True,\n temp_file=True,\n ),\n MessageTextInput(\n name=\"background_color\",\n display_name=\"Background Color\",\n info=\"The background color of the icon.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"chat_icon\",\n display_name=\"Icon\",\n info=\"The icon of the message.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"text_color\",\n display_name=\"Text Color\",\n info=\"The text color of the name\",\n advanced=True,\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"message_response\"),\n ]\n\n async def message_response(self) -> Message:\n background_color = self.background_color\n text_color = self.text_color\n icon = self.chat_icon\n\n message = await Message.create(\n text=self.input_value,\n sender=self.sender,\n sender_name=self.sender_name,\n session_id=self.session_id,\n files=self.files,\n properties={\n \"background_color\": background_color,\n \"text_color\": text_color,\n \"icon\": icon,\n },\n )\n if self.session_id and isinstance(message, Message) and self.should_store_message:\n stored_message = await self.send_message(\n message,\n )\n self.message.value = stored_message\n message = stored_message\n\n self.status = message\n return message\n"
|
||||
},
|
||||
"files": {
|
||||
"_input_type": "FileInput",
|
||||
|
|
@ -271,6 +245,7 @@
|
|||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
"temp_file": true,
|
||||
"title_case": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "file",
|
||||
|
|
@ -307,10 +282,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Type of sender.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User"
|
||||
],
|
||||
"options": ["Machine", "User"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -327,9 +299,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Name of the sender.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -350,9 +320,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -391,9 +359,7 @@
|
|||
"display_name": "Text Color",
|
||||
"dynamic": false,
|
||||
"info": "The text color of the name",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -431,9 +397,7 @@
|
|||
"data": {
|
||||
"id": "ChatOutput-uu7cZ",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -468,9 +432,7 @@
|
|||
"name": "message",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -483,9 +445,7 @@
|
|||
"display_name": "Background Color",
|
||||
"dynamic": false,
|
||||
"info": "The background color of the icon.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -506,9 +466,7 @@
|
|||
"display_name": "Icon",
|
||||
"dynamic": false,
|
||||
"info": "The icon of the message.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -565,9 +523,7 @@
|
|||
"display_name": "Data Template",
|
||||
"dynamic": false,
|
||||
"info": "Template to convert Data to Text. If left empty, it will be dynamically set to the Data's text key.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -588,11 +544,7 @@
|
|||
"display_name": "Text",
|
||||
"dynamic": false,
|
||||
"info": "Message to be passed as output.",
|
||||
"input_types": [
|
||||
"Data",
|
||||
"DataFrame",
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Data", "DataFrame", "Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"name": "input_value",
|
||||
|
|
@ -613,10 +565,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Type of sender.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User"
|
||||
],
|
||||
"options": ["Machine", "User"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -633,9 +582,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Name of the sender.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -656,9 +603,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -697,9 +642,7 @@
|
|||
"display_name": "Text Color",
|
||||
"dynamic": false,
|
||||
"info": "The text color of the name",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -737,10 +680,7 @@
|
|||
"data": {
|
||||
"id": "TavilySearchComponent-ilBh2",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Data",
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Data", "Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -776,9 +716,7 @@
|
|||
"required_inputs": null,
|
||||
"selected": "Tool",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Tool"
|
||||
],
|
||||
"types": ["Tool"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -791,9 +729,7 @@
|
|||
"display_name": "Tavily API Key",
|
||||
"dynamic": false,
|
||||
"info": "Your Tavily API Key.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"load_from_db": false,
|
||||
"name": "api_key",
|
||||
"password": true,
|
||||
|
|
@ -882,9 +818,7 @@
|
|||
"display_name": "Search Query",
|
||||
"dynamic": false,
|
||||
"info": "The search query you want to execute with Tavily.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -908,10 +842,7 @@
|
|||
"dynamic": false,
|
||||
"info": "The depth of the search.",
|
||||
"name": "search_depth",
|
||||
"options": [
|
||||
"basic",
|
||||
"advanced"
|
||||
],
|
||||
"options": ["basic", "advanced"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -931,12 +862,7 @@
|
|||
"dynamic": false,
|
||||
"info": "The time range back from the current date to include in the search results.",
|
||||
"name": "time_range",
|
||||
"options": [
|
||||
"day",
|
||||
"week",
|
||||
"month",
|
||||
"year"
|
||||
],
|
||||
"options": ["day", "week", "month", "year"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -971,10 +897,7 @@
|
|||
"description": "Modify tool names and descriptions to help agents understand when to use each tool.",
|
||||
"field_parsers": {
|
||||
"commands": "commands",
|
||||
"name": [
|
||||
"snake_case",
|
||||
"no_blank"
|
||||
]
|
||||
"name": ["snake_case", "no_blank"]
|
||||
},
|
||||
"hide_options": true
|
||||
},
|
||||
|
|
@ -1025,16 +948,12 @@
|
|||
{
|
||||
"description": "fetch_content(api_key: Message) - **Tavily AI** is a search engine optimized for LLMs and RAG, aimed at efficient, quick, and persistent search results.",
|
||||
"name": "TavilySearchComponent-fetch_content",
|
||||
"tags": [
|
||||
"TavilySearchComponent-fetch_content"
|
||||
]
|
||||
"tags": ["TavilySearchComponent-fetch_content"]
|
||||
},
|
||||
{
|
||||
"description": "fetch_content_text(api_key: Message) - **Tavily AI** is a search engine optimized for LLMs and RAG, aimed at efficient, quick, and persistent search results.",
|
||||
"name": "TavilySearchComponent-fetch_content_text",
|
||||
"tags": [
|
||||
"TavilySearchComponent-fetch_content_text"
|
||||
]
|
||||
"tags": ["TavilySearchComponent-fetch_content_text"]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
@ -1047,10 +966,7 @@
|
|||
"dynamic": false,
|
||||
"info": "The category of the search.",
|
||||
"name": "topic",
|
||||
"options": [
|
||||
"general",
|
||||
"news"
|
||||
],
|
||||
"options": ["general", "news"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -1086,9 +1002,7 @@
|
|||
"display_name": "AgentQL Query Data",
|
||||
"id": "AgentQL-FEfZe",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Data"
|
||||
],
|
||||
"base_classes": ["Data"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -1125,9 +1039,7 @@
|
|||
"required_inputs": null,
|
||||
"selected": "Tool",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Tool"
|
||||
],
|
||||
"types": ["Tool"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -1140,9 +1052,7 @@
|
|||
"display_name": "API Key",
|
||||
"dynamic": false,
|
||||
"info": "Your AgentQL API key from dev.agentql.com",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"load_from_db": false,
|
||||
"name": "api_key",
|
||||
"password": true,
|
||||
|
|
@ -1234,10 +1144,7 @@
|
|||
"dynamic": false,
|
||||
"info": "'standard' uses deep data analysis, while 'fast' trades some depth of analysis for speed.",
|
||||
"name": "mode",
|
||||
"options": [
|
||||
"fast",
|
||||
"standard"
|
||||
],
|
||||
"options": ["fast", "standard"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -1255,9 +1162,7 @@
|
|||
"display_name": "Prompt",
|
||||
"dynamic": false,
|
||||
"info": "A Natural Language description of the data to extract from the page. Alternative to AgentQL query.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1280,9 +1185,7 @@
|
|||
"display_name": "AgentQL Query",
|
||||
"dynamic": false,
|
||||
"info": "The AgentQL query to execute. Learn more at https://docs.agentql.com/agentql-query or use a prompt.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1341,10 +1244,7 @@
|
|||
"description": "Modify tool names and descriptions to help agents understand when to use each tool.",
|
||||
"field_parsers": {
|
||||
"commands": "commands",
|
||||
"name": [
|
||||
"snake_case",
|
||||
"no_blank"
|
||||
]
|
||||
"name": ["snake_case", "no_blank"]
|
||||
},
|
||||
"hide_options": true
|
||||
},
|
||||
|
|
@ -1428,9 +1328,7 @@
|
|||
"description": "build_output(api_key: Message, url: Message) - Extracts structured data from a web page using an AgentQL query or a Natural Language description.",
|
||||
"name": "AgentQL-build_output",
|
||||
"status": true,
|
||||
"tags": [
|
||||
"AgentQL-build_output"
|
||||
]
|
||||
"tags": ["AgentQL-build_output"]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
@ -1440,9 +1338,7 @@
|
|||
"display_name": "URL",
|
||||
"dynamic": false,
|
||||
"info": "The URL of the public web page you want to extract data from.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1504,9 +1400,7 @@
|
|||
"data": {
|
||||
"id": "Agent-C2lNW",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -1557,9 +1451,7 @@
|
|||
"name": "response",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -1590,9 +1482,7 @@
|
|||
"display_name": "Agent Description [Deprecated]",
|
||||
"dynamic": false,
|
||||
"info": "The description of the agent. This is only used when in Tool Mode. Defaults to 'A helpful assistant with access to the following tools:' and tools are added dynamically. This feature is deprecated and will be removed in future versions.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1674,9 +1564,7 @@
|
|||
"display_name": "OpenAI API Key",
|
||||
"dynamic": false,
|
||||
"info": "The OpenAI API Key to use for the OpenAI model.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"load_from_db": true,
|
||||
"name": "api_key",
|
||||
"password": true,
|
||||
|
|
@ -1729,9 +1617,7 @@
|
|||
"display_name": "Input",
|
||||
"dynamic": false,
|
||||
"info": "The input provided by the user for the agent to process.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1830,9 +1716,7 @@
|
|||
"display_name": "External Memory",
|
||||
"dynamic": false,
|
||||
"info": "Retrieve messages from an external memory. If empty, it will use the Langflow tables.",
|
||||
"input_types": [
|
||||
"Memory"
|
||||
],
|
||||
"input_types": ["Memory"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"name": "memory",
|
||||
|
|
@ -1937,10 +1821,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Order of the messages.",
|
||||
"name": "order",
|
||||
"options": [
|
||||
"Ascending",
|
||||
"Descending"
|
||||
],
|
||||
"options": ["Ascending", "Descending"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -1978,11 +1859,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Filter by sender type.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User",
|
||||
"Machine and User"
|
||||
],
|
||||
"options": ["Machine", "User", "Machine and User"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -1999,9 +1876,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Filter by sender name.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -2022,9 +1897,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -2045,9 +1918,7 @@
|
|||
"display_name": "Agent Instructions",
|
||||
"dynamic": false,
|
||||
"info": "System Prompt: Initial instructions and context provided to guide the agent's behavior.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -2097,9 +1968,7 @@
|
|||
"display_name": "Template",
|
||||
"dynamic": false,
|
||||
"info": "The template to use for formatting the data. It can contain the keys {text}, {sender} or any other key in the message data.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -2139,9 +2008,7 @@
|
|||
"display_name": "Tools",
|
||||
"dynamic": false,
|
||||
"info": "These are the tools that the agent can use to help with tasks.",
|
||||
"input_types": [
|
||||
"Tool"
|
||||
],
|
||||
"input_types": ["Tool"],
|
||||
"list": true,
|
||||
"list_add_label": "Add More",
|
||||
"name": "tools",
|
||||
|
|
@ -2312,8 +2179,5 @@
|
|||
"is_component": false,
|
||||
"last_tested_version": "1.2.0",
|
||||
"name": "Price Deal Finder",
|
||||
"tags": [
|
||||
"web-scraping",
|
||||
"agents"
|
||||
]
|
||||
}
|
||||
"tags": ["web-scraping", "agents"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,17 +9,12 @@
|
|||
"dataType": "ChatInput",
|
||||
"id": "ChatInput-ODlE4",
|
||||
"name": "message",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "Prompt-0159s",
|
||||
"inputTypes": [
|
||||
"Message",
|
||||
"Text"
|
||||
],
|
||||
"inputTypes": ["Message", "Text"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -38,16 +33,12 @@
|
|||
"dataType": "Prompt",
|
||||
"id": "Prompt-Lj4w8",
|
||||
"name": "prompt",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "Agent-gNoaI",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -66,17 +57,12 @@
|
|||
"dataType": "Agent",
|
||||
"id": "Agent-gNoaI",
|
||||
"name": "response",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "search_results",
|
||||
"id": "Prompt-0159s",
|
||||
"inputTypes": [
|
||||
"Message",
|
||||
"Text"
|
||||
],
|
||||
"inputTypes": ["Message", "Text"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -94,16 +80,12 @@
|
|||
"dataType": "TavilySearchComponent",
|
||||
"id": "TavilySearchComponent-dk7WW",
|
||||
"name": "component_as_tool",
|
||||
"output_types": [
|
||||
"Tool"
|
||||
]
|
||||
"output_types": ["Tool"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "tools",
|
||||
"id": "Agent-gNoaI",
|
||||
"inputTypes": [
|
||||
"Tool"
|
||||
],
|
||||
"inputTypes": ["Tool"],
|
||||
"type": "other"
|
||||
}
|
||||
},
|
||||
|
|
@ -120,16 +102,12 @@
|
|||
"dataType": "Prompt",
|
||||
"id": "Prompt-5lo5d",
|
||||
"name": "prompt",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "system_message",
|
||||
"id": "OpenAIModel-1sVXW",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -146,16 +124,12 @@
|
|||
"dataType": "ChatInput",
|
||||
"id": "ChatInput-ODlE4",
|
||||
"name": "message",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "OpenAIModel-1sVXW",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -172,17 +146,12 @@
|
|||
"dataType": "OpenAIModel",
|
||||
"id": "OpenAIModel-1sVXW",
|
||||
"name": "text_output",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "previous_response",
|
||||
"id": "Prompt-Lj4w8",
|
||||
"inputTypes": [
|
||||
"Message",
|
||||
"Text"
|
||||
],
|
||||
"inputTypes": ["Message", "Text"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -199,16 +168,12 @@
|
|||
"dataType": "Prompt",
|
||||
"id": "Prompt-0159s",
|
||||
"name": "prompt",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "OpenAIModel-Rg8Kn",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -225,16 +190,12 @@
|
|||
"dataType": "Prompt",
|
||||
"id": "Prompt-4HHcE",
|
||||
"name": "prompt",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "system_message",
|
||||
"id": "OpenAIModel-Rg8Kn",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -250,18 +211,12 @@
|
|||
"dataType": "OpenAIModel",
|
||||
"id": "OpenAIModel-Rg8Kn",
|
||||
"name": "text_output",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "ChatOutput-SIV0E",
|
||||
"inputTypes": [
|
||||
"Data",
|
||||
"DataFrame",
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Data", "DataFrame", "Message"],
|
||||
"type": "other"
|
||||
}
|
||||
},
|
||||
|
|
@ -279,23 +234,17 @@
|
|||
"display_name": "Prompt",
|
||||
"id": "Prompt-Lj4w8",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {
|
||||
"template": [
|
||||
"previous_response"
|
||||
]
|
||||
"template": ["previous_response"]
|
||||
},
|
||||
"description": "Create a prompt template with dynamic variables.",
|
||||
"display_name": "Prompt",
|
||||
"documentation": "",
|
||||
"edited": false,
|
||||
"field_order": [
|
||||
"template"
|
||||
],
|
||||
"field_order": ["template"],
|
||||
"frozen": false,
|
||||
"icon": "prompts",
|
||||
"legacy": false,
|
||||
|
|
@ -311,9 +260,7 @@
|
|||
"name": "prompt",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -346,10 +293,7 @@
|
|||
"fileTypes": [],
|
||||
"file_path": "",
|
||||
"info": "",
|
||||
"input_types": [
|
||||
"Message",
|
||||
"Text"
|
||||
],
|
||||
"input_types": ["Message", "Text"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"multiline": true,
|
||||
|
|
@ -385,9 +329,7 @@
|
|||
"display_name": "Tool Placeholder",
|
||||
"dynamic": false,
|
||||
"info": "A placeholder input for tool mode.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "tool_placeholder",
|
||||
|
|
@ -429,9 +371,7 @@
|
|||
"data": {
|
||||
"id": "ChatInput-ODlE4",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"category": "inputs",
|
||||
"conditional_paths": [],
|
||||
|
|
@ -467,9 +407,7 @@
|
|||
"name": "message",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -482,9 +420,7 @@
|
|||
"display_name": "Background Color",
|
||||
"dynamic": false,
|
||||
"info": "The background color of the icon.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "background_color",
|
||||
|
|
@ -503,9 +439,7 @@
|
|||
"display_name": "Icon",
|
||||
"dynamic": false,
|
||||
"info": "The icon of the message.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "chat_icon",
|
||||
|
|
@ -534,7 +468,7 @@
|
|||
"show": true,
|
||||
"title_case": false,
|
||||
"type": "code",
|
||||
"value": "from langflow.base.data.utils import IMG_FILE_TYPES, TEXT_FILE_TYPES\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.inputs import BoolInput\nfrom langflow.io import (\n DropdownInput,\n FileInput,\n MessageTextInput,\n MultilineInput,\n Output,\n)\nfrom langflow.schema.message import Message\nfrom langflow.utils.constants import (\n MESSAGE_SENDER_AI,\n MESSAGE_SENDER_NAME_USER,\n MESSAGE_SENDER_USER,\n)\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"MessagesSquare\"\n name = \"ChatInput\"\n minimized = True\n\n inputs = [\n MultilineInput(\n name=\"input_value\",\n display_name=\"Text\",\n value=\"\",\n info=\"Message to be passed as input.\",\n input_types=[],\n ),\n BoolInput(\n name=\"should_store_message\",\n display_name=\"Store Messages\",\n info=\"Store the message in the history.\",\n value=True,\n advanced=True,\n ),\n DropdownInput(\n name=\"sender\",\n display_name=\"Sender Type\",\n options=[MESSAGE_SENDER_AI, MESSAGE_SENDER_USER],\n value=MESSAGE_SENDER_USER,\n info=\"Type of sender.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"sender_name\",\n display_name=\"Sender Name\",\n info=\"Name of the sender.\",\n value=MESSAGE_SENDER_NAME_USER,\n advanced=True,\n ),\n MessageTextInput(\n name=\"session_id\",\n display_name=\"Session ID\",\n info=\"The session ID of the chat. If empty, the current session ID parameter will be used.\",\n advanced=True,\n ),\n FileInput(\n name=\"files\",\n display_name=\"Files\",\n file_types=TEXT_FILE_TYPES + IMG_FILE_TYPES,\n info=\"Files to be sent with the message.\",\n advanced=True,\n is_list=True,\n ),\n MessageTextInput(\n name=\"background_color\",\n display_name=\"Background Color\",\n info=\"The background color of the icon.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"chat_icon\",\n display_name=\"Icon\",\n info=\"The icon of the message.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"text_color\",\n display_name=\"Text Color\",\n info=\"The text color of the name\",\n advanced=True,\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"message_response\"),\n ]\n\n async def message_response(self) -> Message:\n background_color = self.background_color\n text_color = self.text_color\n icon = self.chat_icon\n\n message = await Message.create(\n text=self.input_value,\n sender=self.sender,\n sender_name=self.sender_name,\n session_id=self.session_id,\n files=self.files,\n properties={\n \"background_color\": background_color,\n \"text_color\": text_color,\n \"icon\": icon,\n },\n )\n if self.session_id and isinstance(message, Message) and self.should_store_message:\n stored_message = await self.send_message(\n message,\n )\n self.message.value = stored_message\n message = stored_message\n\n self.status = message\n return message\n"
|
||||
"value": "from langflow.base.data.utils import IMG_FILE_TYPES, TEXT_FILE_TYPES\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.inputs import BoolInput\nfrom langflow.io import (\n DropdownInput,\n FileInput,\n MessageTextInput,\n MultilineInput,\n Output,\n)\nfrom langflow.schema.message import Message\nfrom langflow.utils.constants import (\n MESSAGE_SENDER_AI,\n MESSAGE_SENDER_NAME_USER,\n MESSAGE_SENDER_USER,\n)\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"MessagesSquare\"\n name = \"ChatInput\"\n minimized = True\n\n inputs = [\n MultilineInput(\n name=\"input_value\",\n display_name=\"Text\",\n value=\"\",\n info=\"Message to be passed as input.\",\n input_types=[],\n ),\n BoolInput(\n name=\"should_store_message\",\n display_name=\"Store Messages\",\n info=\"Store the message in the history.\",\n value=True,\n advanced=True,\n ),\n DropdownInput(\n name=\"sender\",\n display_name=\"Sender Type\",\n options=[MESSAGE_SENDER_AI, MESSAGE_SENDER_USER],\n value=MESSAGE_SENDER_USER,\n info=\"Type of sender.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"sender_name\",\n display_name=\"Sender Name\",\n info=\"Name of the sender.\",\n value=MESSAGE_SENDER_NAME_USER,\n advanced=True,\n ),\n MessageTextInput(\n name=\"session_id\",\n display_name=\"Session ID\",\n info=\"The session ID of the chat. If empty, the current session ID parameter will be used.\",\n advanced=True,\n ),\n FileInput(\n name=\"files\",\n display_name=\"Files\",\n file_types=TEXT_FILE_TYPES + IMG_FILE_TYPES,\n info=\"Files to be sent with the message.\",\n advanced=True,\n is_list=True,\n temp_file=True,\n ),\n MessageTextInput(\n name=\"background_color\",\n display_name=\"Background Color\",\n info=\"The background color of the icon.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"chat_icon\",\n display_name=\"Icon\",\n info=\"The icon of the message.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"text_color\",\n display_name=\"Text Color\",\n info=\"The text color of the name\",\n advanced=True,\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"message_response\"),\n ]\n\n async def message_response(self) -> Message:\n background_color = self.background_color\n text_color = self.text_color\n icon = self.chat_icon\n\n message = await Message.create(\n text=self.input_value,\n sender=self.sender,\n sender_name=self.sender_name,\n session_id=self.session_id,\n files=self.files,\n properties={\n \"background_color\": background_color,\n \"text_color\": text_color,\n \"icon\": icon,\n },\n )\n if self.session_id and isinstance(message, Message) and self.should_store_message:\n stored_message = await self.send_message(\n message,\n )\n self.message.value = stored_message\n message = stored_message\n\n self.status = message\n return message\n"
|
||||
},
|
||||
"files": {
|
||||
"_input_type": "FileInput",
|
||||
|
|
@ -573,6 +507,7 @@
|
|||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
"temp_file": true,
|
||||
"title_case": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "file",
|
||||
|
|
@ -606,10 +541,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Type of sender.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User"
|
||||
],
|
||||
"options": ["Machine", "User"],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
|
|
@ -624,9 +556,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Name of the sender.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "sender_name",
|
||||
|
|
@ -645,9 +575,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "session_id",
|
||||
|
|
@ -682,9 +610,7 @@
|
|||
"display_name": "Text Color",
|
||||
"dynamic": false,
|
||||
"info": "The text color of the name",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "text_color",
|
||||
|
|
@ -726,24 +652,17 @@
|
|||
"display_name": "Prompt",
|
||||
"id": "Prompt-0159s",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {
|
||||
"template": [
|
||||
"search_results",
|
||||
"input_value"
|
||||
]
|
||||
"template": ["search_results", "input_value"]
|
||||
},
|
||||
"description": "Create a prompt template with dynamic variables.",
|
||||
"display_name": "Prompt",
|
||||
"documentation": "",
|
||||
"edited": false,
|
||||
"field_order": [
|
||||
"template"
|
||||
],
|
||||
"field_order": ["template"],
|
||||
"frozen": false,
|
||||
"icon": "prompts",
|
||||
"legacy": false,
|
||||
|
|
@ -759,9 +678,7 @@
|
|||
"name": "prompt",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -794,10 +711,7 @@
|
|||
"fileTypes": [],
|
||||
"file_path": "",
|
||||
"info": "",
|
||||
"input_types": [
|
||||
"Message",
|
||||
"Text"
|
||||
],
|
||||
"input_types": ["Message", "Text"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"multiline": true,
|
||||
|
|
@ -817,10 +731,7 @@
|
|||
"fileTypes": [],
|
||||
"file_path": "",
|
||||
"info": "",
|
||||
"input_types": [
|
||||
"Message",
|
||||
"Text"
|
||||
],
|
||||
"input_types": ["Message", "Text"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"multiline": true,
|
||||
|
|
@ -856,9 +767,7 @@
|
|||
"display_name": "Tool Placeholder",
|
||||
"dynamic": false,
|
||||
"info": "A placeholder input for tool mode.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "tool_placeholder",
|
||||
|
|
@ -939,9 +848,7 @@
|
|||
"display_name": "Agent",
|
||||
"id": "Agent-gNoaI",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -992,9 +899,7 @@
|
|||
"name": "response",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -1023,9 +928,7 @@
|
|||
"display_name": "Agent Description [Deprecated]",
|
||||
"dynamic": false,
|
||||
"info": "The description of the agent. This is only used when in Tool Mode. Defaults to 'A helpful assistant with access to the following tools:' and tools are added dynamically. This feature is deprecated and will be removed in future versions.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"multiline": true,
|
||||
|
|
@ -1076,9 +979,7 @@
|
|||
"display_name": "OpenAI API Key",
|
||||
"dynamic": false,
|
||||
"info": "The OpenAI API Key to use for the OpenAI model.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"load_from_db": true,
|
||||
"name": "api_key",
|
||||
"password": true,
|
||||
|
|
@ -1129,9 +1030,7 @@
|
|||
"display_name": "Input",
|
||||
"dynamic": false,
|
||||
"info": "The input provided by the user for the agent to process.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "input_value",
|
||||
|
|
@ -1223,9 +1122,7 @@
|
|||
"display_name": "External Memory",
|
||||
"dynamic": false,
|
||||
"info": "Retrieve messages from an external memory. If empty, it will use the Langflow tables.",
|
||||
"input_types": [
|
||||
"Memory"
|
||||
],
|
||||
"input_types": ["Memory"],
|
||||
"list": false,
|
||||
"name": "memory",
|
||||
"placeholder": "",
|
||||
|
|
@ -1319,10 +1216,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Order of the messages.",
|
||||
"name": "order",
|
||||
"options": [
|
||||
"Ascending",
|
||||
"Descending"
|
||||
],
|
||||
"options": ["Ascending", "Descending"],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
|
|
@ -1356,11 +1250,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Filter by sender type.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User",
|
||||
"Machine and User"
|
||||
],
|
||||
"options": ["Machine", "User", "Machine and User"],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
|
|
@ -1376,9 +1266,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Filter by sender name.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "sender_name",
|
||||
|
|
@ -1398,9 +1286,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "session_id",
|
||||
|
|
@ -1420,9 +1306,7 @@
|
|||
"display_name": "Agent Instructions",
|
||||
"dynamic": false,
|
||||
"info": "System Prompt: Initial instructions and context provided to guide the agent's behavior.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"multiline": true,
|
||||
|
|
@ -1459,9 +1343,7 @@
|
|||
"display_name": "Template",
|
||||
"dynamic": false,
|
||||
"info": "The template to use for formatting the data. It can contain the keys {text}, {sender} or any other key in the message data.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"multiline": true,
|
||||
|
|
@ -1500,9 +1382,7 @@
|
|||
"display_name": "Tools",
|
||||
"dynamic": false,
|
||||
"info": "These are the tools that the agent can use to help with tasks.",
|
||||
"input_types": [
|
||||
"Tool"
|
||||
],
|
||||
"input_types": ["Tool"],
|
||||
"list": true,
|
||||
"name": "tools",
|
||||
"placeholder": "",
|
||||
|
|
@ -1559,9 +1439,7 @@
|
|||
"display_name": "Prompt",
|
||||
"id": "Prompt-5lo5d",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {
|
||||
|
|
@ -1571,9 +1449,7 @@
|
|||
"display_name": "Prompt",
|
||||
"documentation": "",
|
||||
"edited": false,
|
||||
"field_order": [
|
||||
"template"
|
||||
],
|
||||
"field_order": ["template"],
|
||||
"frozen": false,
|
||||
"icon": "prompts",
|
||||
"legacy": false,
|
||||
|
|
@ -1589,9 +1465,7 @@
|
|||
"name": "prompt",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -1640,9 +1514,7 @@
|
|||
"display_name": "Tool Placeholder",
|
||||
"dynamic": false,
|
||||
"info": "A placeholder input for tool mode.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "tool_placeholder",
|
||||
|
|
@ -1686,9 +1558,7 @@
|
|||
"display_name": "Prompt",
|
||||
"id": "Prompt-4HHcE",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {
|
||||
|
|
@ -1698,9 +1568,7 @@
|
|||
"display_name": "Prompt",
|
||||
"documentation": "",
|
||||
"edited": false,
|
||||
"field_order": [
|
||||
"template"
|
||||
],
|
||||
"field_order": ["template"],
|
||||
"frozen": false,
|
||||
"icon": "prompts",
|
||||
"legacy": false,
|
||||
|
|
@ -1716,9 +1584,7 @@
|
|||
"name": "prompt",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -1767,9 +1633,7 @@
|
|||
"display_name": "Tool Placeholder",
|
||||
"dynamic": false,
|
||||
"info": "A placeholder input for tool mode.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "tool_placeholder",
|
||||
|
|
@ -1843,10 +1707,7 @@
|
|||
"data": {
|
||||
"id": "TavilySearchComponent-dk7WW",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Data",
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Data", "Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -1881,9 +1742,7 @@
|
|||
"required_inputs": null,
|
||||
"selected": "Tool",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Tool"
|
||||
],
|
||||
"types": ["Tool"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -1896,9 +1755,7 @@
|
|||
"display_name": "Tavily API Key",
|
||||
"dynamic": false,
|
||||
"info": "Your Tavily API Key.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"load_from_db": false,
|
||||
"name": "api_key",
|
||||
"password": true,
|
||||
|
|
@ -1987,9 +1844,7 @@
|
|||
"display_name": "Search Query",
|
||||
"dynamic": false,
|
||||
"info": "The search query you want to execute with Tavily.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -2013,10 +1868,7 @@
|
|||
"dynamic": false,
|
||||
"info": "The depth of the search.",
|
||||
"name": "search_depth",
|
||||
"options": [
|
||||
"basic",
|
||||
"advanced"
|
||||
],
|
||||
"options": ["basic", "advanced"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -2036,12 +1888,7 @@
|
|||
"dynamic": false,
|
||||
"info": "The time range back from the current date to include in the search results.",
|
||||
"name": "time_range",
|
||||
"options": [
|
||||
"day",
|
||||
"week",
|
||||
"month",
|
||||
"year"
|
||||
],
|
||||
"options": ["day", "week", "month", "year"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -2076,10 +1923,7 @@
|
|||
"description": "Modify tool names and descriptions to help agents understand when to use each tool.",
|
||||
"field_parsers": {
|
||||
"commands": "commands",
|
||||
"name": [
|
||||
"snake_case",
|
||||
"no_blank"
|
||||
]
|
||||
"name": ["snake_case", "no_blank"]
|
||||
},
|
||||
"hide_options": true
|
||||
},
|
||||
|
|
@ -2133,16 +1977,12 @@
|
|||
{
|
||||
"description": "fetch_content(api_key: Message) - **Tavily AI** is a search engine optimized for LLMs and RAG, aimed at efficient, quick, and persistent search results.",
|
||||
"name": "TavilySearchComponent-fetch_content",
|
||||
"tags": [
|
||||
"TavilySearchComponent-fetch_content"
|
||||
]
|
||||
"tags": ["TavilySearchComponent-fetch_content"]
|
||||
},
|
||||
{
|
||||
"description": "fetch_content_text(api_key: Message) - **Tavily AI** is a search engine optimized for LLMs and RAG, aimed at efficient, quick, and persistent search results.",
|
||||
"name": "TavilySearchComponent-fetch_content_text",
|
||||
"tags": [
|
||||
"TavilySearchComponent-fetch_content_text"
|
||||
]
|
||||
"tags": ["TavilySearchComponent-fetch_content_text"]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
@ -2155,10 +1995,7 @@
|
|||
"dynamic": false,
|
||||
"info": "The category of the search.",
|
||||
"name": "topic",
|
||||
"options": [
|
||||
"general",
|
||||
"news"
|
||||
],
|
||||
"options": ["general", "news"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -2192,10 +2029,7 @@
|
|||
"data": {
|
||||
"id": "OpenAIModel-1sVXW",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"LanguageModel",
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["LanguageModel", "Message"],
|
||||
"beta": false,
|
||||
"category": "models",
|
||||
"conditional_paths": [],
|
||||
|
|
@ -2234,9 +2068,7 @@
|
|||
"required_inputs": [],
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
},
|
||||
{
|
||||
|
|
@ -2245,14 +2077,10 @@
|
|||
"display_name": "Language Model",
|
||||
"method": "build_model",
|
||||
"name": "model_output",
|
||||
"required_inputs": [
|
||||
"api_key"
|
||||
],
|
||||
"required_inputs": ["api_key"],
|
||||
"selected": "LanguageModel",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"LanguageModel"
|
||||
],
|
||||
"types": ["LanguageModel"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -2266,9 +2094,7 @@
|
|||
"display_name": "OpenAI API Key",
|
||||
"dynamic": false,
|
||||
"info": "The OpenAI API Key to use for the OpenAI model.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"load_from_db": true,
|
||||
"name": "api_key",
|
||||
"password": true,
|
||||
|
|
@ -2303,9 +2129,7 @@
|
|||
"display_name": "Input",
|
||||
"dynamic": false,
|
||||
"info": "",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -2487,9 +2311,7 @@
|
|||
"display_name": "System Message",
|
||||
"dynamic": false,
|
||||
"info": "System message to pass to the model.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -2574,10 +2396,7 @@
|
|||
"data": {
|
||||
"id": "OpenAIModel-Rg8Kn",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"LanguageModel",
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["LanguageModel", "Message"],
|
||||
"beta": false,
|
||||
"category": "models",
|
||||
"conditional_paths": [],
|
||||
|
|
@ -2616,9 +2435,7 @@
|
|||
"required_inputs": [],
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
},
|
||||
{
|
||||
|
|
@ -2627,14 +2444,10 @@
|
|||
"display_name": "Language Model",
|
||||
"method": "build_model",
|
||||
"name": "model_output",
|
||||
"required_inputs": [
|
||||
"api_key"
|
||||
],
|
||||
"required_inputs": ["api_key"],
|
||||
"selected": "LanguageModel",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"LanguageModel"
|
||||
],
|
||||
"types": ["LanguageModel"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -2648,9 +2461,7 @@
|
|||
"display_name": "OpenAI API Key",
|
||||
"dynamic": false,
|
||||
"info": "The OpenAI API Key to use for the OpenAI model.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"load_from_db": true,
|
||||
"name": "api_key",
|
||||
"password": true,
|
||||
|
|
@ -2685,9 +2496,7 @@
|
|||
"display_name": "Input",
|
||||
"dynamic": false,
|
||||
"info": "",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -2869,9 +2678,7 @@
|
|||
"display_name": "System Message",
|
||||
"dynamic": false,
|
||||
"info": "System message to pass to the model.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -2956,9 +2763,7 @@
|
|||
"data": {
|
||||
"id": "ChatOutput-SIV0E",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"category": "outputs",
|
||||
"conditional_paths": [],
|
||||
|
|
@ -2995,9 +2800,7 @@
|
|||
"name": "message",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -3011,9 +2814,7 @@
|
|||
"display_name": "Background Color",
|
||||
"dynamic": false,
|
||||
"info": "The background color of the icon.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -3034,9 +2835,7 @@
|
|||
"display_name": "Icon",
|
||||
"dynamic": false,
|
||||
"info": "The icon of the message.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -3093,9 +2892,7 @@
|
|||
"display_name": "Data Template",
|
||||
"dynamic": false,
|
||||
"info": "Template to convert Data to Text. If left empty, it will be dynamically set to the Data's text key.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -3116,11 +2913,7 @@
|
|||
"display_name": "Text",
|
||||
"dynamic": false,
|
||||
"info": "Message to be passed as output.",
|
||||
"input_types": [
|
||||
"Data",
|
||||
"DataFrame",
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Data", "DataFrame", "Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"name": "input_value",
|
||||
|
|
@ -3141,10 +2934,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Type of sender.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User"
|
||||
],
|
||||
"options": ["Machine", "User"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -3161,9 +2951,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Name of the sender.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -3184,9 +2972,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -3225,9 +3011,7 @@
|
|||
"display_name": "Text Color",
|
||||
"dynamic": false,
|
||||
"info": "The text color of the name",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -3275,8 +3059,5 @@
|
|||
"is_component": false,
|
||||
"last_tested_version": "1.1.5",
|
||||
"name": "Research Agent",
|
||||
"tags": [
|
||||
"assistants",
|
||||
"agents"
|
||||
]
|
||||
}
|
||||
"tags": ["assistants", "agents"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,16 +9,12 @@
|
|||
"dataType": "ScrapeGraphSearchApi",
|
||||
"id": "ScrapeGraphSearchApi-4qF2k",
|
||||
"name": "component_as_tool",
|
||||
"output_types": [
|
||||
"Tool"
|
||||
]
|
||||
"output_types": ["Tool"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "tools",
|
||||
"id": "Agent-CBAEF",
|
||||
"inputTypes": [
|
||||
"Tool"
|
||||
],
|
||||
"inputTypes": ["Tool"],
|
||||
"type": "other"
|
||||
}
|
||||
},
|
||||
|
|
@ -36,16 +32,12 @@
|
|||
"dataType": "ChatInput",
|
||||
"id": "ChatInput-8hLIp",
|
||||
"name": "message",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "Agent-CBAEF",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -63,18 +55,12 @@
|
|||
"dataType": "Agent",
|
||||
"id": "Agent-CBAEF",
|
||||
"name": "response",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "ChatOutput-9EKQJ",
|
||||
"inputTypes": [
|
||||
"Data",
|
||||
"DataFrame",
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Data", "DataFrame", "Message"],
|
||||
"type": "other"
|
||||
}
|
||||
},
|
||||
|
|
@ -90,9 +76,7 @@
|
|||
"data": {
|
||||
"id": "ScrapeGraphSearchApi-4qF2k",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Data"
|
||||
],
|
||||
"base_classes": ["Data"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -100,10 +84,7 @@
|
|||
"display_name": "ScrapeGraphSearchApi",
|
||||
"documentation": "https://docs.scrapegraphai.com/introduction",
|
||||
"edited": false,
|
||||
"field_order": [
|
||||
"api_key",
|
||||
"user_prompt"
|
||||
],
|
||||
"field_order": ["api_key", "user_prompt"],
|
||||
"frozen": false,
|
||||
"icon": "ScrapeGraph",
|
||||
"legacy": false,
|
||||
|
|
@ -122,9 +103,7 @@
|
|||
"required_inputs": null,
|
||||
"selected": "Tool",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Tool"
|
||||
],
|
||||
"types": ["Tool"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -137,9 +116,7 @@
|
|||
"display_name": "ScrapeGraph API Key",
|
||||
"dynamic": false,
|
||||
"info": "The API key to use ScrapeGraph API.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"load_from_db": false,
|
||||
"name": "api_key",
|
||||
"password": true,
|
||||
|
|
@ -193,10 +170,7 @@
|
|||
"description": "Modify tool names and descriptions to help agents understand when to use each tool.",
|
||||
"field_parsers": {
|
||||
"commands": "commands",
|
||||
"name": [
|
||||
"snake_case",
|
||||
"no_blank"
|
||||
]
|
||||
"name": ["snake_case", "no_blank"]
|
||||
},
|
||||
"hide_options": true
|
||||
},
|
||||
|
|
@ -250,9 +224,7 @@
|
|||
{
|
||||
"description": "search(api_key: Message) - ScrapeGraph Search API.\n Given a search prompt, it will return search results using ScrapeGraph's search functionality.\n More info at https://docs.scrapegraphai.com/services/searchscraper",
|
||||
"name": "ScrapeGraphSearchApi-search",
|
||||
"tags": [
|
||||
"ScrapeGraphSearchApi-search"
|
||||
]
|
||||
"tags": ["ScrapeGraphSearchApi-search"]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
@ -262,9 +234,7 @@
|
|||
"display_name": "Search Prompt",
|
||||
"dynamic": false,
|
||||
"info": "The search prompt to use.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -302,9 +272,7 @@
|
|||
"data": {
|
||||
"id": "Agent-CBAEF",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -356,9 +324,7 @@
|
|||
"name": "response",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -389,9 +355,7 @@
|
|||
"display_name": "Agent Description [Deprecated]",
|
||||
"dynamic": false,
|
||||
"info": "The description of the agent. This is only used when in Tool Mode. Defaults to 'A helpful assistant with access to the following tools:' and tools are added dynamically. This feature is deprecated and will be removed in future versions.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -445,9 +409,7 @@
|
|||
"display_name": "OpenAI API Key",
|
||||
"dynamic": false,
|
||||
"info": "The OpenAI API Key to use for the OpenAI model.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"load_from_db": false,
|
||||
"name": "api_key",
|
||||
"password": true,
|
||||
|
|
@ -500,9 +462,7 @@
|
|||
"display_name": "Input",
|
||||
"dynamic": false,
|
||||
"info": "The input provided by the user for the agent to process.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -601,9 +561,7 @@
|
|||
"display_name": "External Memory",
|
||||
"dynamic": false,
|
||||
"info": "Retrieve messages from an external memory. If empty, it will use the Langflow tables.",
|
||||
"input_types": [
|
||||
"Memory"
|
||||
],
|
||||
"input_types": ["Memory"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"name": "memory",
|
||||
|
|
@ -708,10 +666,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Order of the messages.",
|
||||
"name": "order",
|
||||
"options": [
|
||||
"Ascending",
|
||||
"Descending"
|
||||
],
|
||||
"options": ["Ascending", "Descending"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -749,11 +704,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Filter by sender type.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User",
|
||||
"Machine and User"
|
||||
],
|
||||
"options": ["Machine", "User", "Machine and User"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -770,9 +721,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Filter by sender name.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -793,9 +742,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -816,9 +763,7 @@
|
|||
"display_name": "Agent Instructions",
|
||||
"dynamic": false,
|
||||
"info": "System Prompt: Initial instructions and context provided to guide the agent's behavior.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -868,9 +813,7 @@
|
|||
"display_name": "Template",
|
||||
"dynamic": false,
|
||||
"info": "The template to use for formatting the data. It can contain the keys {text}, {sender} or any other key in the message data.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -910,9 +853,7 @@
|
|||
"display_name": "Tools",
|
||||
"dynamic": false,
|
||||
"info": "These are the tools that the agent can use to help with tasks.",
|
||||
"input_types": [
|
||||
"Tool"
|
||||
],
|
||||
"input_types": ["Tool"],
|
||||
"list": true,
|
||||
"list_add_label": "Add More",
|
||||
"name": "tools",
|
||||
|
|
@ -965,9 +906,7 @@
|
|||
"data": {
|
||||
"id": "ChatInput-8hLIp",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -1002,9 +941,7 @@
|
|||
"name": "message",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -1017,9 +954,7 @@
|
|||
"display_name": "Background Color",
|
||||
"dynamic": false,
|
||||
"info": "The background color of the icon.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1040,9 +975,7 @@
|
|||
"display_name": "Icon",
|
||||
"dynamic": false,
|
||||
"info": "The icon of the message.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1073,7 +1006,7 @@
|
|||
"show": true,
|
||||
"title_case": false,
|
||||
"type": "code",
|
||||
"value": "from langflow.base.data.utils import IMG_FILE_TYPES, TEXT_FILE_TYPES\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.inputs import BoolInput\nfrom langflow.io import (\n DropdownInput,\n FileInput,\n MessageTextInput,\n MultilineInput,\n Output,\n)\nfrom langflow.schema.message import Message\nfrom langflow.utils.constants import (\n MESSAGE_SENDER_AI,\n MESSAGE_SENDER_NAME_USER,\n MESSAGE_SENDER_USER,\n)\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"MessagesSquare\"\n name = \"ChatInput\"\n minimized = True\n\n inputs = [\n MultilineInput(\n name=\"input_value\",\n display_name=\"Text\",\n value=\"\",\n info=\"Message to be passed as input.\",\n input_types=[],\n ),\n BoolInput(\n name=\"should_store_message\",\n display_name=\"Store Messages\",\n info=\"Store the message in the history.\",\n value=True,\n advanced=True,\n ),\n DropdownInput(\n name=\"sender\",\n display_name=\"Sender Type\",\n options=[MESSAGE_SENDER_AI, MESSAGE_SENDER_USER],\n value=MESSAGE_SENDER_USER,\n info=\"Type of sender.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"sender_name\",\n display_name=\"Sender Name\",\n info=\"Name of the sender.\",\n value=MESSAGE_SENDER_NAME_USER,\n advanced=True,\n ),\n MessageTextInput(\n name=\"session_id\",\n display_name=\"Session ID\",\n info=\"The session ID of the chat. If empty, the current session ID parameter will be used.\",\n advanced=True,\n ),\n FileInput(\n name=\"files\",\n display_name=\"Files\",\n file_types=TEXT_FILE_TYPES + IMG_FILE_TYPES,\n info=\"Files to be sent with the message.\",\n advanced=True,\n is_list=True,\n ),\n MessageTextInput(\n name=\"background_color\",\n display_name=\"Background Color\",\n info=\"The background color of the icon.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"chat_icon\",\n display_name=\"Icon\",\n info=\"The icon of the message.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"text_color\",\n display_name=\"Text Color\",\n info=\"The text color of the name\",\n advanced=True,\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"message_response\"),\n ]\n\n async def message_response(self) -> Message:\n background_color = self.background_color\n text_color = self.text_color\n icon = self.chat_icon\n\n message = await Message.create(\n text=self.input_value,\n sender=self.sender,\n sender_name=self.sender_name,\n session_id=self.session_id,\n files=self.files,\n properties={\n \"background_color\": background_color,\n \"text_color\": text_color,\n \"icon\": icon,\n },\n )\n if self.session_id and isinstance(message, Message) and self.should_store_message:\n stored_message = await self.send_message(\n message,\n )\n self.message.value = stored_message\n message = stored_message\n\n self.status = message\n return message\n"
|
||||
"value": "from langflow.base.data.utils import IMG_FILE_TYPES, TEXT_FILE_TYPES\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.inputs import BoolInput\nfrom langflow.io import (\n DropdownInput,\n FileInput,\n MessageTextInput,\n MultilineInput,\n Output,\n)\nfrom langflow.schema.message import Message\nfrom langflow.utils.constants import (\n MESSAGE_SENDER_AI,\n MESSAGE_SENDER_NAME_USER,\n MESSAGE_SENDER_USER,\n)\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"MessagesSquare\"\n name = \"ChatInput\"\n minimized = True\n\n inputs = [\n MultilineInput(\n name=\"input_value\",\n display_name=\"Text\",\n value=\"\",\n info=\"Message to be passed as input.\",\n input_types=[],\n ),\n BoolInput(\n name=\"should_store_message\",\n display_name=\"Store Messages\",\n info=\"Store the message in the history.\",\n value=True,\n advanced=True,\n ),\n DropdownInput(\n name=\"sender\",\n display_name=\"Sender Type\",\n options=[MESSAGE_SENDER_AI, MESSAGE_SENDER_USER],\n value=MESSAGE_SENDER_USER,\n info=\"Type of sender.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"sender_name\",\n display_name=\"Sender Name\",\n info=\"Name of the sender.\",\n value=MESSAGE_SENDER_NAME_USER,\n advanced=True,\n ),\n MessageTextInput(\n name=\"session_id\",\n display_name=\"Session ID\",\n info=\"The session ID of the chat. If empty, the current session ID parameter will be used.\",\n advanced=True,\n ),\n FileInput(\n name=\"files\",\n display_name=\"Files\",\n file_types=TEXT_FILE_TYPES + IMG_FILE_TYPES,\n info=\"Files to be sent with the message.\",\n advanced=True,\n is_list=True,\n temp_file=True,\n ),\n MessageTextInput(\n name=\"background_color\",\n display_name=\"Background Color\",\n info=\"The background color of the icon.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"chat_icon\",\n display_name=\"Icon\",\n info=\"The icon of the message.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"text_color\",\n display_name=\"Text Color\",\n info=\"The text color of the name\",\n advanced=True,\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"message_response\"),\n ]\n\n async def message_response(self) -> Message:\n background_color = self.background_color\n text_color = self.text_color\n icon = self.chat_icon\n\n message = await Message.create(\n text=self.input_value,\n sender=self.sender,\n sender_name=self.sender_name,\n session_id=self.session_id,\n files=self.files,\n properties={\n \"background_color\": background_color,\n \"text_color\": text_color,\n \"icon\": icon,\n },\n )\n if self.session_id and isinstance(message, Message) and self.should_store_message:\n stored_message = await self.send_message(\n message,\n )\n self.message.value = stored_message\n message = stored_message\n\n self.status = message\n return message\n"
|
||||
},
|
||||
"files": {
|
||||
"_input_type": "FileInput",
|
||||
|
|
@ -1113,6 +1046,7 @@
|
|||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
"temp_file": true,
|
||||
"title_case": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "file",
|
||||
|
|
@ -1149,10 +1083,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Type of sender.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User"
|
||||
],
|
||||
"options": ["Machine", "User"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -1169,9 +1100,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Name of the sender.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1192,9 +1121,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1233,9 +1160,7 @@
|
|||
"display_name": "Text Color",
|
||||
"dynamic": false,
|
||||
"info": "The text color of the name",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1273,9 +1198,7 @@
|
|||
"data": {
|
||||
"id": "ChatOutput-9EKQJ",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -1311,9 +1234,7 @@
|
|||
"name": "message",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -1326,9 +1247,7 @@
|
|||
"display_name": "Background Color",
|
||||
"dynamic": false,
|
||||
"info": "The background color of the icon.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1349,9 +1268,7 @@
|
|||
"display_name": "Icon",
|
||||
"dynamic": false,
|
||||
"info": "The icon of the message.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1408,9 +1325,7 @@
|
|||
"display_name": "Data Template",
|
||||
"dynamic": false,
|
||||
"info": "Template to convert Data to Text. If left empty, it will be dynamically set to the Data's text key.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1431,11 +1346,7 @@
|
|||
"display_name": "Text",
|
||||
"dynamic": false,
|
||||
"info": "Message to be passed as output.",
|
||||
"input_types": [
|
||||
"Data",
|
||||
"DataFrame",
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Data", "DataFrame", "Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"name": "input_value",
|
||||
|
|
@ -1456,10 +1367,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Type of sender.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User"
|
||||
],
|
||||
"options": ["Machine", "User"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -1476,9 +1384,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Name of the sender.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1499,9 +1405,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1540,9 +1444,7 @@
|
|||
"display_name": "Text Color",
|
||||
"dynamic": false,
|
||||
"info": "The text color of the name",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1673,9 +1575,5 @@
|
|||
"is_component": false,
|
||||
"last_tested_version": "1.1.5",
|
||||
"name": "Search agent",
|
||||
"tags": [
|
||||
"web-scraping",
|
||||
"agents",
|
||||
"assistants"
|
||||
]
|
||||
}
|
||||
"tags": ["web-scraping", "agents", "assistants"]
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -9,16 +9,12 @@
|
|||
"dataType": "ChatInput",
|
||||
"id": "ChatInput-5rifq",
|
||||
"name": "message",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "Agent-eACmP",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -37,18 +33,12 @@
|
|||
"dataType": "Agent",
|
||||
"id": "Agent-eACmP",
|
||||
"name": "response",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "ChatOutput-jYRjS",
|
||||
"inputTypes": [
|
||||
"Data",
|
||||
"DataFrame",
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Data", "DataFrame", "Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -67,16 +57,12 @@
|
|||
"dataType": "CalculatorComponent",
|
||||
"id": "CalculatorComponent-GTSkO",
|
||||
"name": "component_as_tool",
|
||||
"output_types": [
|
||||
"Tool"
|
||||
]
|
||||
"output_types": ["Tool"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "tools",
|
||||
"id": "Agent-eACmP",
|
||||
"inputTypes": [
|
||||
"Tool"
|
||||
],
|
||||
"inputTypes": ["Tool"],
|
||||
"type": "other"
|
||||
}
|
||||
},
|
||||
|
|
@ -94,16 +80,12 @@
|
|||
"dataType": "URL",
|
||||
"id": "URL-BvxUK",
|
||||
"name": "component_as_tool",
|
||||
"output_types": [
|
||||
"Tool"
|
||||
]
|
||||
"output_types": ["Tool"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "tools",
|
||||
"id": "Agent-eACmP",
|
||||
"inputTypes": [
|
||||
"Tool"
|
||||
],
|
||||
"inputTypes": ["Tool"],
|
||||
"type": "other"
|
||||
}
|
||||
},
|
||||
|
|
@ -121,9 +103,7 @@
|
|||
"display_name": "Agent",
|
||||
"id": "Agent-eACmP",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -174,9 +154,7 @@
|
|||
"name": "response",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -205,9 +183,7 @@
|
|||
"display_name": "Agent Description [Deprecated]",
|
||||
"dynamic": false,
|
||||
"info": "The description of the agent. This is only used when in Tool Mode. Defaults to 'A helpful assistant with access to the following tools:' and tools are added dynamically. This feature is deprecated and will be removed in future versions.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"multiline": true,
|
||||
|
|
@ -258,9 +234,7 @@
|
|||
"display_name": "OpenAI API Key",
|
||||
"dynamic": false,
|
||||
"info": "The OpenAI API Key to use for the OpenAI model.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"load_from_db": true,
|
||||
"name": "api_key",
|
||||
"password": true,
|
||||
|
|
@ -311,9 +285,7 @@
|
|||
"display_name": "Input",
|
||||
"dynamic": false,
|
||||
"info": "The input provided by the user for the agent to process.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "input_value",
|
||||
|
|
@ -405,9 +377,7 @@
|
|||
"display_name": "External Memory",
|
||||
"dynamic": false,
|
||||
"info": "Retrieve messages from an external memory. If empty, it will use the Langflow tables.",
|
||||
"input_types": [
|
||||
"Memory"
|
||||
],
|
||||
"input_types": ["Memory"],
|
||||
"list": false,
|
||||
"name": "memory",
|
||||
"placeholder": "",
|
||||
|
|
@ -501,10 +471,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Order of the messages.",
|
||||
"name": "order",
|
||||
"options": [
|
||||
"Ascending",
|
||||
"Descending"
|
||||
],
|
||||
"options": ["Ascending", "Descending"],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
|
|
@ -538,11 +505,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Filter by sender type.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User",
|
||||
"Machine and User"
|
||||
],
|
||||
"options": ["Machine", "User", "Machine and User"],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
|
|
@ -558,9 +521,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Filter by sender name.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "sender_name",
|
||||
|
|
@ -580,9 +541,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "session_id",
|
||||
|
|
@ -602,9 +561,7 @@
|
|||
"display_name": "Agent Instructions",
|
||||
"dynamic": false,
|
||||
"info": "System Prompt: Initial instructions and context provided to guide the agent's behavior.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"multiline": true,
|
||||
|
|
@ -641,9 +598,7 @@
|
|||
"display_name": "Template",
|
||||
"dynamic": false,
|
||||
"info": "The template to use for formatting the data. It can contain the keys {text}, {sender} or any other key in the message data.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"multiline": true,
|
||||
|
|
@ -682,9 +637,7 @@
|
|||
"display_name": "Tools",
|
||||
"dynamic": false,
|
||||
"info": "These are the tools that the agent can use to help with tasks.",
|
||||
"input_types": [
|
||||
"Tool"
|
||||
],
|
||||
"input_types": ["Tool"],
|
||||
"list": true,
|
||||
"name": "tools",
|
||||
"placeholder": "",
|
||||
|
|
@ -733,9 +686,7 @@
|
|||
"data": {
|
||||
"id": "ChatInput-5rifq",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -769,9 +720,7 @@
|
|||
"name": "message",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -784,9 +733,7 @@
|
|||
"display_name": "Background Color",
|
||||
"dynamic": false,
|
||||
"info": "The background color of the icon.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "background_color",
|
||||
|
|
@ -806,9 +753,7 @@
|
|||
"display_name": "Icon",
|
||||
"dynamic": false,
|
||||
"info": "The icon of the message.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "chat_icon",
|
||||
|
|
@ -838,7 +783,7 @@
|
|||
"show": true,
|
||||
"title_case": false,
|
||||
"type": "code",
|
||||
"value": "from langflow.base.data.utils import IMG_FILE_TYPES, TEXT_FILE_TYPES\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.inputs import BoolInput\nfrom langflow.io import (\n DropdownInput,\n FileInput,\n MessageTextInput,\n MultilineInput,\n Output,\n)\nfrom langflow.schema.message import Message\nfrom langflow.utils.constants import (\n MESSAGE_SENDER_AI,\n MESSAGE_SENDER_NAME_USER,\n MESSAGE_SENDER_USER,\n)\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"MessagesSquare\"\n name = \"ChatInput\"\n minimized = True\n\n inputs = [\n MultilineInput(\n name=\"input_value\",\n display_name=\"Text\",\n value=\"\",\n info=\"Message to be passed as input.\",\n input_types=[],\n ),\n BoolInput(\n name=\"should_store_message\",\n display_name=\"Store Messages\",\n info=\"Store the message in the history.\",\n value=True,\n advanced=True,\n ),\n DropdownInput(\n name=\"sender\",\n display_name=\"Sender Type\",\n options=[MESSAGE_SENDER_AI, MESSAGE_SENDER_USER],\n value=MESSAGE_SENDER_USER,\n info=\"Type of sender.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"sender_name\",\n display_name=\"Sender Name\",\n info=\"Name of the sender.\",\n value=MESSAGE_SENDER_NAME_USER,\n advanced=True,\n ),\n MessageTextInput(\n name=\"session_id\",\n display_name=\"Session ID\",\n info=\"The session ID of the chat. If empty, the current session ID parameter will be used.\",\n advanced=True,\n ),\n FileInput(\n name=\"files\",\n display_name=\"Files\",\n file_types=TEXT_FILE_TYPES + IMG_FILE_TYPES,\n info=\"Files to be sent with the message.\",\n advanced=True,\n is_list=True,\n ),\n MessageTextInput(\n name=\"background_color\",\n display_name=\"Background Color\",\n info=\"The background color of the icon.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"chat_icon\",\n display_name=\"Icon\",\n info=\"The icon of the message.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"text_color\",\n display_name=\"Text Color\",\n info=\"The text color of the name\",\n advanced=True,\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"message_response\"),\n ]\n\n async def message_response(self) -> Message:\n background_color = self.background_color\n text_color = self.text_color\n icon = self.chat_icon\n\n message = await Message.create(\n text=self.input_value,\n sender=self.sender,\n sender_name=self.sender_name,\n session_id=self.session_id,\n files=self.files,\n properties={\n \"background_color\": background_color,\n \"text_color\": text_color,\n \"icon\": icon,\n },\n )\n if self.session_id and isinstance(message, Message) and self.should_store_message:\n stored_message = await self.send_message(\n message,\n )\n self.message.value = stored_message\n message = stored_message\n\n self.status = message\n return message\n"
|
||||
"value": "from langflow.base.data.utils import IMG_FILE_TYPES, TEXT_FILE_TYPES\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.inputs import BoolInput\nfrom langflow.io import (\n DropdownInput,\n FileInput,\n MessageTextInput,\n MultilineInput,\n Output,\n)\nfrom langflow.schema.message import Message\nfrom langflow.utils.constants import (\n MESSAGE_SENDER_AI,\n MESSAGE_SENDER_NAME_USER,\n MESSAGE_SENDER_USER,\n)\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"MessagesSquare\"\n name = \"ChatInput\"\n minimized = True\n\n inputs = [\n MultilineInput(\n name=\"input_value\",\n display_name=\"Text\",\n value=\"\",\n info=\"Message to be passed as input.\",\n input_types=[],\n ),\n BoolInput(\n name=\"should_store_message\",\n display_name=\"Store Messages\",\n info=\"Store the message in the history.\",\n value=True,\n advanced=True,\n ),\n DropdownInput(\n name=\"sender\",\n display_name=\"Sender Type\",\n options=[MESSAGE_SENDER_AI, MESSAGE_SENDER_USER],\n value=MESSAGE_SENDER_USER,\n info=\"Type of sender.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"sender_name\",\n display_name=\"Sender Name\",\n info=\"Name of the sender.\",\n value=MESSAGE_SENDER_NAME_USER,\n advanced=True,\n ),\n MessageTextInput(\n name=\"session_id\",\n display_name=\"Session ID\",\n info=\"The session ID of the chat. If empty, the current session ID parameter will be used.\",\n advanced=True,\n ),\n FileInput(\n name=\"files\",\n display_name=\"Files\",\n file_types=TEXT_FILE_TYPES + IMG_FILE_TYPES,\n info=\"Files to be sent with the message.\",\n advanced=True,\n is_list=True,\n temp_file=True,\n ),\n MessageTextInput(\n name=\"background_color\",\n display_name=\"Background Color\",\n info=\"The background color of the icon.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"chat_icon\",\n display_name=\"Icon\",\n info=\"The icon of the message.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"text_color\",\n display_name=\"Text Color\",\n info=\"The text color of the name\",\n advanced=True,\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"message_response\"),\n ]\n\n async def message_response(self) -> Message:\n background_color = self.background_color\n text_color = self.text_color\n icon = self.chat_icon\n\n message = await Message.create(\n text=self.input_value,\n sender=self.sender,\n sender_name=self.sender_name,\n session_id=self.session_id,\n files=self.files,\n properties={\n \"background_color\": background_color,\n \"text_color\": text_color,\n \"icon\": icon,\n },\n )\n if self.session_id and isinstance(message, Message) and self.should_store_message:\n stored_message = await self.send_message(\n message,\n )\n self.message.value = stored_message\n message = stored_message\n\n self.status = message\n return message\n"
|
||||
},
|
||||
"files": {
|
||||
"_input_type": "FileInput",
|
||||
|
|
@ -877,6 +822,7 @@
|
|||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
"temp_file": true,
|
||||
"title_case": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "file",
|
||||
|
|
@ -911,10 +857,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Type of sender.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User"
|
||||
],
|
||||
"options": ["Machine", "User"],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
|
|
@ -930,9 +873,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Name of the sender.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "sender_name",
|
||||
|
|
@ -952,9 +893,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "session_id",
|
||||
|
|
@ -990,9 +929,7 @@
|
|||
"display_name": "Text Color",
|
||||
"dynamic": false,
|
||||
"info": "The text color of the name",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "text_color",
|
||||
|
|
@ -1030,9 +967,7 @@
|
|||
"display_name": "Chat Output",
|
||||
"id": "ChatOutput-jYRjS",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -1066,9 +1001,7 @@
|
|||
"name": "message",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -1081,9 +1014,7 @@
|
|||
"display_name": "Background Color",
|
||||
"dynamic": false,
|
||||
"info": "The background color of the icon.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "background_color",
|
||||
|
|
@ -1103,9 +1034,7 @@
|
|||
"display_name": "Icon",
|
||||
"dynamic": false,
|
||||
"info": "The icon of the message.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "chat_icon",
|
||||
|
|
@ -1161,9 +1090,7 @@
|
|||
"display_name": "Data Template",
|
||||
"dynamic": false,
|
||||
"info": "Template to convert Data to Text. If left empty, it will be dynamically set to the Data's text key.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "data_template",
|
||||
|
|
@ -1183,11 +1110,7 @@
|
|||
"display_name": "Text",
|
||||
"dynamic": false,
|
||||
"info": "Message to be passed as output.",
|
||||
"input_types": [
|
||||
"Data",
|
||||
"DataFrame",
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Data", "DataFrame", "Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "input_value",
|
||||
|
|
@ -1208,10 +1131,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Type of sender.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User"
|
||||
],
|
||||
"options": ["Machine", "User"],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
|
|
@ -1227,9 +1147,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Name of the sender.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "sender_name",
|
||||
|
|
@ -1249,9 +1167,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "session_id",
|
||||
|
|
@ -1287,9 +1203,7 @@
|
|||
"display_name": "Text Color",
|
||||
"dynamic": false,
|
||||
"info": "The text color of the name",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "text_color",
|
||||
|
|
@ -1326,11 +1240,7 @@
|
|||
"display_name": "URL",
|
||||
"id": "URL-BvxUK",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Data",
|
||||
"DataFrame",
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Data", "DataFrame", "Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -1362,9 +1272,7 @@
|
|||
"required_inputs": null,
|
||||
"selected": "Tool",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Tool"
|
||||
],
|
||||
"types": ["Tool"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -1416,11 +1324,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Output Format. Use 'Text' to extract text from the HTML, 'Raw HTML' for the raw HTML content, or 'JSON' to extract JSON from the HTML.",
|
||||
"name": "format",
|
||||
"options": [
|
||||
"Text",
|
||||
"Raw HTML",
|
||||
"JSON"
|
||||
],
|
||||
"options": ["Text", "Raw HTML", "JSON"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"real_time_refresh": true,
|
||||
|
|
@ -1476,10 +1380,7 @@
|
|||
"description": "Modify tool names and descriptions to help agents understand when to use each tool.",
|
||||
"field_parsers": {
|
||||
"commands": "commands",
|
||||
"name": [
|
||||
"snake_case",
|
||||
"no_blank"
|
||||
]
|
||||
"name": ["snake_case", "no_blank"]
|
||||
},
|
||||
"hide_options": true
|
||||
},
|
||||
|
|
@ -1536,23 +1437,17 @@
|
|||
{
|
||||
"description": "fetch_content() - Load and retrieve data from specified URLs. Supports output in plain text, raw HTML, or JSON, with options for cleaning and separating multiple outputs.",
|
||||
"name": "URL-fetch_content",
|
||||
"tags": [
|
||||
"URL-fetch_content"
|
||||
]
|
||||
"tags": ["URL-fetch_content"]
|
||||
},
|
||||
{
|
||||
"description": "fetch_content_text() - Load and retrieve data from specified URLs. Supports output in plain text, raw HTML, or JSON, with options for cleaning and separating multiple outputs.",
|
||||
"name": "URL-fetch_content_text",
|
||||
"tags": [
|
||||
"URL-fetch_content_text"
|
||||
]
|
||||
"tags": ["URL-fetch_content_text"]
|
||||
},
|
||||
{
|
||||
"description": "as_dataframe() - Load and retrieve data from specified URLs. Supports output in plain text, raw HTML, or JSON, with options for cleaning and separating multiple outputs.",
|
||||
"name": "URL-as_dataframe",
|
||||
"tags": [
|
||||
"URL-as_dataframe"
|
||||
]
|
||||
"tags": ["URL-as_dataframe"]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
@ -1562,9 +1457,7 @@
|
|||
"display_name": "URLs",
|
||||
"dynamic": false,
|
||||
"info": "",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": true,
|
||||
"list_add_label": "Add URL",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1652,9 +1545,7 @@
|
|||
"data": {
|
||||
"id": "CalculatorComponent-GTSkO",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Data"
|
||||
],
|
||||
"base_classes": ["Data"],
|
||||
"beta": false,
|
||||
"category": "tools",
|
||||
"conditional_paths": [],
|
||||
|
|
@ -1663,9 +1554,7 @@
|
|||
"display_name": "Calculator",
|
||||
"documentation": "",
|
||||
"edited": false,
|
||||
"field_order": [
|
||||
"expression"
|
||||
],
|
||||
"field_order": ["expression"],
|
||||
"frozen": false,
|
||||
"icon": "calculator",
|
||||
"key": "CalculatorComponent",
|
||||
|
|
@ -1685,9 +1574,7 @@
|
|||
"required_inputs": null,
|
||||
"selected": "Tool",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Tool"
|
||||
],
|
||||
"types": ["Tool"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -1719,9 +1606,7 @@
|
|||
"display_name": "Expression",
|
||||
"dynamic": false,
|
||||
"info": "The arithmetic expression to evaluate (e.g., '4*4*(33/22)+12-20').",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1761,10 +1646,7 @@
|
|||
"description": "Modify tool names and descriptions to help agents understand when to use each tool.",
|
||||
"field_parsers": {
|
||||
"commands": "commands",
|
||||
"name": [
|
||||
"snake_case",
|
||||
"no_blank"
|
||||
]
|
||||
"name": ["snake_case", "no_blank"]
|
||||
},
|
||||
"hide_options": true
|
||||
},
|
||||
|
|
@ -1821,9 +1703,7 @@
|
|||
{
|
||||
"description": "evaluate_expression() - Perform basic arithmetic operations on a given expression.",
|
||||
"name": "None-evaluate_expression",
|
||||
"tags": [
|
||||
"None-evaluate_expression"
|
||||
]
|
||||
"tags": ["None-evaluate_expression"]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1859,8 +1739,5 @@
|
|||
"is_component": false,
|
||||
"last_tested_version": "1.1.1",
|
||||
"name": "Simple Agent",
|
||||
"tags": [
|
||||
"assistants",
|
||||
"agents"
|
||||
]
|
||||
}
|
||||
"tags": ["assistants", "agents"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,16 +7,12 @@
|
|||
"dataType": "ApifyActors",
|
||||
"id": "ApifyActors-B3OZd",
|
||||
"name": "tool",
|
||||
"output_types": [
|
||||
"Tool"
|
||||
]
|
||||
"output_types": ["Tool"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "tools",
|
||||
"id": "Agent-KXbzb",
|
||||
"inputTypes": [
|
||||
"Tool"
|
||||
],
|
||||
"inputTypes": ["Tool"],
|
||||
"type": "other"
|
||||
}
|
||||
},
|
||||
|
|
@ -32,16 +28,12 @@
|
|||
"dataType": "ApifyActors",
|
||||
"id": "ApifyActors-0TUqW",
|
||||
"name": "tool",
|
||||
"output_types": [
|
||||
"Tool"
|
||||
]
|
||||
"output_types": ["Tool"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "tools",
|
||||
"id": "Agent-KXbzb",
|
||||
"inputTypes": [
|
||||
"Tool"
|
||||
],
|
||||
"inputTypes": ["Tool"],
|
||||
"type": "other"
|
||||
}
|
||||
},
|
||||
|
|
@ -57,16 +49,12 @@
|
|||
"dataType": "ChatInput",
|
||||
"id": "ChatInput-3C2ac",
|
||||
"name": "message",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "Agent-KXbzb",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -82,18 +70,12 @@
|
|||
"dataType": "Agent",
|
||||
"id": "Agent-KXbzb",
|
||||
"name": "response",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "ChatOutput-lTzgN",
|
||||
"inputTypes": [
|
||||
"Data",
|
||||
"DataFrame",
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Data", "DataFrame", "Message"],
|
||||
"type": "other"
|
||||
}
|
||||
},
|
||||
|
|
@ -109,10 +91,7 @@
|
|||
"data": {
|
||||
"id": "ApifyActors-0TUqW",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Data",
|
||||
"Tool"
|
||||
],
|
||||
"base_classes": ["Data", "Tool"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -144,9 +123,7 @@
|
|||
"required_inputs": null,
|
||||
"selected": "Data",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Data"
|
||||
],
|
||||
"types": ["Data"],
|
||||
"value": "__UNDEFINED__"
|
||||
},
|
||||
{
|
||||
|
|
@ -159,9 +136,7 @@
|
|||
"required_inputs": null,
|
||||
"selected": "Tool",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Tool"
|
||||
],
|
||||
"types": ["Tool"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -193,9 +168,7 @@
|
|||
"display_name": "Apify Token",
|
||||
"dynamic": false,
|
||||
"info": "The API token for the Apify account.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"load_from_db": false,
|
||||
"name": "apify_token",
|
||||
"password": true,
|
||||
|
|
@ -230,9 +203,7 @@
|
|||
"display_name": "Output fields",
|
||||
"dynamic": false,
|
||||
"info": "Fields to extract from the dataset, split by commas. Other fields will be ignored. Dots in nested structures will be replaced by underscores. Sample input: 'text, metadata.title'. Sample output: {'text': 'page content here', 'metadata_title': 'page title here'}. For example, for the 'apify/website-content-crawler' Actor, you can extract the 'markdown' field, which is the content of the website in markdown format.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -272,9 +243,7 @@
|
|||
"display_name": "Run input",
|
||||
"dynamic": false,
|
||||
"info": "The JSON input for the Actor run. For example for the \"apify/website-content-crawler\" Actor: {\"startUrls\":[{\"url\":\"https://docs.apify.com/academy/web-scraping-for-beginners\"}],\"maxCrawlDepth\":0}",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -313,10 +282,7 @@
|
|||
"data": {
|
||||
"id": "ApifyActors-B3OZd",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Data",
|
||||
"Tool"
|
||||
],
|
||||
"base_classes": ["Data", "Tool"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -348,9 +314,7 @@
|
|||
"required_inputs": null,
|
||||
"selected": "Data",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Data"
|
||||
],
|
||||
"types": ["Data"],
|
||||
"value": "__UNDEFINED__"
|
||||
},
|
||||
{
|
||||
|
|
@ -363,9 +327,7 @@
|
|||
"required_inputs": null,
|
||||
"selected": "Tool",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Tool"
|
||||
],
|
||||
"types": ["Tool"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -397,9 +359,7 @@
|
|||
"display_name": "Apify Token",
|
||||
"dynamic": false,
|
||||
"info": "The API token for the Apify account.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"load_from_db": false,
|
||||
"name": "apify_token",
|
||||
"password": true,
|
||||
|
|
@ -434,9 +394,7 @@
|
|||
"display_name": "Output fields",
|
||||
"dynamic": false,
|
||||
"info": "Fields to extract from the dataset, split by commas. Other fields will be ignored. Dots in nested structures will be replaced by underscores. Sample input: 'text, metadata.title'. Sample output: {'text': 'page content here', 'metadata_title': 'page title here'}. For example, for the 'apify/website-content-crawler' Actor, you can extract the 'markdown' field, which is the content of the website in markdown format.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -476,9 +434,7 @@
|
|||
"display_name": "Run input",
|
||||
"dynamic": false,
|
||||
"info": "The JSON input for the Actor run. For example for the \"apify/website-content-crawler\" Actor: {\"startUrls\":[{\"url\":\"https://docs.apify.com/academy/web-scraping-for-beginners\"}],\"maxCrawlDepth\":0}",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -601,9 +557,7 @@
|
|||
"data": {
|
||||
"id": "ChatInput-3C2ac",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -638,9 +592,7 @@
|
|||
"name": "message",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -653,9 +605,7 @@
|
|||
"display_name": "Background Color",
|
||||
"dynamic": false,
|
||||
"info": "The background color of the icon.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -676,9 +626,7 @@
|
|||
"display_name": "Icon",
|
||||
"dynamic": false,
|
||||
"info": "The icon of the message.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -709,7 +657,7 @@
|
|||
"show": true,
|
||||
"title_case": false,
|
||||
"type": "code",
|
||||
"value": "from langflow.base.data.utils import IMG_FILE_TYPES, TEXT_FILE_TYPES\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.inputs import BoolInput\nfrom langflow.io import (\n DropdownInput,\n FileInput,\n MessageTextInput,\n MultilineInput,\n Output,\n)\nfrom langflow.schema.message import Message\nfrom langflow.utils.constants import (\n MESSAGE_SENDER_AI,\n MESSAGE_SENDER_NAME_USER,\n MESSAGE_SENDER_USER,\n)\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"MessagesSquare\"\n name = \"ChatInput\"\n minimized = True\n\n inputs = [\n MultilineInput(\n name=\"input_value\",\n display_name=\"Text\",\n value=\"\",\n info=\"Message to be passed as input.\",\n input_types=[],\n ),\n BoolInput(\n name=\"should_store_message\",\n display_name=\"Store Messages\",\n info=\"Store the message in the history.\",\n value=True,\n advanced=True,\n ),\n DropdownInput(\n name=\"sender\",\n display_name=\"Sender Type\",\n options=[MESSAGE_SENDER_AI, MESSAGE_SENDER_USER],\n value=MESSAGE_SENDER_USER,\n info=\"Type of sender.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"sender_name\",\n display_name=\"Sender Name\",\n info=\"Name of the sender.\",\n value=MESSAGE_SENDER_NAME_USER,\n advanced=True,\n ),\n MessageTextInput(\n name=\"session_id\",\n display_name=\"Session ID\",\n info=\"The session ID of the chat. If empty, the current session ID parameter will be used.\",\n advanced=True,\n ),\n FileInput(\n name=\"files\",\n display_name=\"Files\",\n file_types=TEXT_FILE_TYPES + IMG_FILE_TYPES,\n info=\"Files to be sent with the message.\",\n advanced=True,\n is_list=True,\n ),\n MessageTextInput(\n name=\"background_color\",\n display_name=\"Background Color\",\n info=\"The background color of the icon.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"chat_icon\",\n display_name=\"Icon\",\n info=\"The icon of the message.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"text_color\",\n display_name=\"Text Color\",\n info=\"The text color of the name\",\n advanced=True,\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"message_response\"),\n ]\n\n async def message_response(self) -> Message:\n background_color = self.background_color\n text_color = self.text_color\n icon = self.chat_icon\n\n message = await Message.create(\n text=self.input_value,\n sender=self.sender,\n sender_name=self.sender_name,\n session_id=self.session_id,\n files=self.files,\n properties={\n \"background_color\": background_color,\n \"text_color\": text_color,\n \"icon\": icon,\n },\n )\n if self.session_id and isinstance(message, Message) and self.should_store_message:\n stored_message = await self.send_message(\n message,\n )\n self.message.value = stored_message\n message = stored_message\n\n self.status = message\n return message\n"
|
||||
"value": "from langflow.base.data.utils import IMG_FILE_TYPES, TEXT_FILE_TYPES\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.inputs import BoolInput\nfrom langflow.io import (\n DropdownInput,\n FileInput,\n MessageTextInput,\n MultilineInput,\n Output,\n)\nfrom langflow.schema.message import Message\nfrom langflow.utils.constants import (\n MESSAGE_SENDER_AI,\n MESSAGE_SENDER_NAME_USER,\n MESSAGE_SENDER_USER,\n)\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"MessagesSquare\"\n name = \"ChatInput\"\n minimized = True\n\n inputs = [\n MultilineInput(\n name=\"input_value\",\n display_name=\"Text\",\n value=\"\",\n info=\"Message to be passed as input.\",\n input_types=[],\n ),\n BoolInput(\n name=\"should_store_message\",\n display_name=\"Store Messages\",\n info=\"Store the message in the history.\",\n value=True,\n advanced=True,\n ),\n DropdownInput(\n name=\"sender\",\n display_name=\"Sender Type\",\n options=[MESSAGE_SENDER_AI, MESSAGE_SENDER_USER],\n value=MESSAGE_SENDER_USER,\n info=\"Type of sender.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"sender_name\",\n display_name=\"Sender Name\",\n info=\"Name of the sender.\",\n value=MESSAGE_SENDER_NAME_USER,\n advanced=True,\n ),\n MessageTextInput(\n name=\"session_id\",\n display_name=\"Session ID\",\n info=\"The session ID of the chat. If empty, the current session ID parameter will be used.\",\n advanced=True,\n ),\n FileInput(\n name=\"files\",\n display_name=\"Files\",\n file_types=TEXT_FILE_TYPES + IMG_FILE_TYPES,\n info=\"Files to be sent with the message.\",\n advanced=True,\n is_list=True,\n temp_file=True,\n ),\n MessageTextInput(\n name=\"background_color\",\n display_name=\"Background Color\",\n info=\"The background color of the icon.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"chat_icon\",\n display_name=\"Icon\",\n info=\"The icon of the message.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"text_color\",\n display_name=\"Text Color\",\n info=\"The text color of the name\",\n advanced=True,\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"message_response\"),\n ]\n\n async def message_response(self) -> Message:\n background_color = self.background_color\n text_color = self.text_color\n icon = self.chat_icon\n\n message = await Message.create(\n text=self.input_value,\n sender=self.sender,\n sender_name=self.sender_name,\n session_id=self.session_id,\n files=self.files,\n properties={\n \"background_color\": background_color,\n \"text_color\": text_color,\n \"icon\": icon,\n },\n )\n if self.session_id and isinstance(message, Message) and self.should_store_message:\n stored_message = await self.send_message(\n message,\n )\n self.message.value = stored_message\n message = stored_message\n\n self.status = message\n return message\n"
|
||||
},
|
||||
"files": {
|
||||
"_input_type": "FileInput",
|
||||
|
|
@ -749,6 +697,7 @@
|
|||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
"temp_file": true,
|
||||
"title_case": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "file",
|
||||
|
|
@ -785,10 +734,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Type of sender.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User"
|
||||
],
|
||||
"options": ["Machine", "User"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -805,9 +751,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Name of the sender.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -828,9 +772,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -869,9 +811,7 @@
|
|||
"display_name": "Text Color",
|
||||
"dynamic": false,
|
||||
"info": "The text color of the name",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -909,9 +849,7 @@
|
|||
"data": {
|
||||
"id": "ChatOutput-lTzgN",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -947,9 +885,7 @@
|
|||
"name": "message",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -962,9 +898,7 @@
|
|||
"display_name": "Background Color",
|
||||
"dynamic": false,
|
||||
"info": "The background color of the icon.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -985,9 +919,7 @@
|
|||
"display_name": "Icon",
|
||||
"dynamic": false,
|
||||
"info": "The icon of the message.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1044,9 +976,7 @@
|
|||
"display_name": "Data Template",
|
||||
"dynamic": false,
|
||||
"info": "Template to convert Data to Text. If left empty, it will be dynamically set to the Data's text key.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1067,11 +997,7 @@
|
|||
"display_name": "Text",
|
||||
"dynamic": false,
|
||||
"info": "Message to be passed as output.",
|
||||
"input_types": [
|
||||
"Data",
|
||||
"DataFrame",
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Data", "DataFrame", "Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"name": "input_value",
|
||||
|
|
@ -1092,10 +1018,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Type of sender.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User"
|
||||
],
|
||||
"options": ["Machine", "User"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -1112,9 +1035,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Name of the sender.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1135,9 +1056,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1176,9 +1095,7 @@
|
|||
"display_name": "Text Color",
|
||||
"dynamic": false,
|
||||
"info": "The text color of the name",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1242,9 +1159,7 @@
|
|||
"data": {
|
||||
"id": "Agent-KXbzb",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"category": "agents",
|
||||
"conditional_paths": [],
|
||||
|
|
@ -1297,9 +1212,7 @@
|
|||
"name": "response",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -1332,9 +1245,7 @@
|
|||
"display_name": "Agent Description [Deprecated]",
|
||||
"dynamic": false,
|
||||
"info": "The description of the agent. This is only used when in Tool Mode. Defaults to 'A helpful assistant with access to the following tools:' and tools are added dynamically. This feature is deprecated and will be removed in future versions.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1416,9 +1327,7 @@
|
|||
"display_name": "OpenAI API Key",
|
||||
"dynamic": false,
|
||||
"info": "The OpenAI API Key to use for the OpenAI model.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"load_from_db": false,
|
||||
"name": "api_key",
|
||||
"password": true,
|
||||
|
|
@ -1471,9 +1380,7 @@
|
|||
"display_name": "Input",
|
||||
"dynamic": false,
|
||||
"info": "The input provided by the user for the agent to process.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1572,9 +1479,7 @@
|
|||
"display_name": "External Memory",
|
||||
"dynamic": false,
|
||||
"info": "Retrieve messages from an external memory. If empty, it will use the Langflow tables.",
|
||||
"input_types": [
|
||||
"Memory"
|
||||
],
|
||||
"input_types": ["Memory"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"name": "memory",
|
||||
|
|
@ -1679,10 +1584,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Order of the messages.",
|
||||
"name": "order",
|
||||
"options": [
|
||||
"Ascending",
|
||||
"Descending"
|
||||
],
|
||||
"options": ["Ascending", "Descending"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -1720,11 +1622,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Filter by sender type.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User",
|
||||
"Machine and User"
|
||||
],
|
||||
"options": ["Machine", "User", "Machine and User"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -1741,9 +1639,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Filter by sender name.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1764,9 +1660,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1788,9 +1682,7 @@
|
|||
"display_name": "Agent Instructions",
|
||||
"dynamic": false,
|
||||
"info": "System Prompt: Initial instructions and context provided to guide the agent's behavior.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1841,9 +1733,7 @@
|
|||
"display_name": "Template",
|
||||
"dynamic": false,
|
||||
"info": "The template to use for formatting the data. It can contain the keys {text}, {sender} or any other key in the message data.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1883,9 +1773,7 @@
|
|||
"display_name": "Tools",
|
||||
"dynamic": false,
|
||||
"info": "These are the tools that the agent can use to help with tasks.",
|
||||
"input_types": [
|
||||
"Tool"
|
||||
],
|
||||
"input_types": ["Tool"],
|
||||
"list": true,
|
||||
"list_add_label": "Add More",
|
||||
"name": "tools",
|
||||
|
|
@ -1947,8 +1835,5 @@
|
|||
"is_component": false,
|
||||
"last_tested_version": "1.2.0",
|
||||
"name": "Social Media Agent",
|
||||
"tags": [
|
||||
"agent",
|
||||
"assistants"
|
||||
]
|
||||
}
|
||||
"tags": ["agent", "assistants"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,18 +9,12 @@
|
|||
"dataType": "Agent",
|
||||
"id": "Agent-PKpSO",
|
||||
"name": "response",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "ChatOutput-8np0X",
|
||||
"inputTypes": [
|
||||
"Data",
|
||||
"DataFrame",
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Data", "DataFrame", "Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -39,16 +33,12 @@
|
|||
"dataType": "Agent",
|
||||
"id": "Agent-zOYup",
|
||||
"name": "response",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "Agent-PKpSO",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -67,16 +57,12 @@
|
|||
"dataType": "Agent",
|
||||
"id": "Agent-7K58a",
|
||||
"name": "response",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "Agent-zOYup",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -95,16 +81,12 @@
|
|||
"dataType": "ChatInput",
|
||||
"id": "ChatInput-iZoDa",
|
||||
"name": "message",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "Agent-7K58a",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -123,16 +105,12 @@
|
|||
"dataType": "URL",
|
||||
"id": "URL-j9slU",
|
||||
"name": "component_as_tool",
|
||||
"output_types": [
|
||||
"Tool"
|
||||
]
|
||||
"output_types": ["Tool"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "tools",
|
||||
"id": "Agent-zOYup",
|
||||
"inputTypes": [
|
||||
"Tool"
|
||||
],
|
||||
"inputTypes": ["Tool"],
|
||||
"type": "other"
|
||||
}
|
||||
},
|
||||
|
|
@ -151,16 +129,12 @@
|
|||
"dataType": "CalculatorComponent",
|
||||
"id": "CalculatorComponent-L3y5A",
|
||||
"name": "component_as_tool",
|
||||
"output_types": [
|
||||
"Tool"
|
||||
]
|
||||
"output_types": ["Tool"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "tools",
|
||||
"id": "Agent-PKpSO",
|
||||
"inputTypes": [
|
||||
"Tool"
|
||||
],
|
||||
"inputTypes": ["Tool"],
|
||||
"type": "other"
|
||||
}
|
||||
},
|
||||
|
|
@ -179,16 +153,12 @@
|
|||
"dataType": "SearchComponent",
|
||||
"id": "SearchComponent-8lQPB",
|
||||
"name": "component_as_tool",
|
||||
"output_types": [
|
||||
"Tool"
|
||||
]
|
||||
"output_types": ["Tool"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "tools",
|
||||
"id": "Agent-7K58a",
|
||||
"inputTypes": [
|
||||
"Tool"
|
||||
],
|
||||
"inputTypes": ["Tool"],
|
||||
"type": "other"
|
||||
}
|
||||
},
|
||||
|
|
@ -205,9 +175,7 @@
|
|||
"data": {
|
||||
"id": "ChatInput-iZoDa",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -238,9 +206,7 @@
|
|||
"name": "message",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -253,9 +219,7 @@
|
|||
"display_name": "Background Color",
|
||||
"dynamic": false,
|
||||
"info": "The background color of the icon.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "background_color",
|
||||
|
|
@ -274,9 +238,7 @@
|
|||
"display_name": "Icon",
|
||||
"dynamic": false,
|
||||
"info": "The icon of the message.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "chat_icon",
|
||||
|
|
@ -305,7 +267,7 @@
|
|||
"show": true,
|
||||
"title_case": false,
|
||||
"type": "code",
|
||||
"value": "from langflow.base.data.utils import IMG_FILE_TYPES, TEXT_FILE_TYPES\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.inputs import BoolInput\nfrom langflow.io import (\n DropdownInput,\n FileInput,\n MessageTextInput,\n MultilineInput,\n Output,\n)\nfrom langflow.schema.message import Message\nfrom langflow.utils.constants import (\n MESSAGE_SENDER_AI,\n MESSAGE_SENDER_NAME_USER,\n MESSAGE_SENDER_USER,\n)\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"MessagesSquare\"\n name = \"ChatInput\"\n minimized = True\n\n inputs = [\n MultilineInput(\n name=\"input_value\",\n display_name=\"Text\",\n value=\"\",\n info=\"Message to be passed as input.\",\n input_types=[],\n ),\n BoolInput(\n name=\"should_store_message\",\n display_name=\"Store Messages\",\n info=\"Store the message in the history.\",\n value=True,\n advanced=True,\n ),\n DropdownInput(\n name=\"sender\",\n display_name=\"Sender Type\",\n options=[MESSAGE_SENDER_AI, MESSAGE_SENDER_USER],\n value=MESSAGE_SENDER_USER,\n info=\"Type of sender.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"sender_name\",\n display_name=\"Sender Name\",\n info=\"Name of the sender.\",\n value=MESSAGE_SENDER_NAME_USER,\n advanced=True,\n ),\n MessageTextInput(\n name=\"session_id\",\n display_name=\"Session ID\",\n info=\"The session ID of the chat. If empty, the current session ID parameter will be used.\",\n advanced=True,\n ),\n FileInput(\n name=\"files\",\n display_name=\"Files\",\n file_types=TEXT_FILE_TYPES + IMG_FILE_TYPES,\n info=\"Files to be sent with the message.\",\n advanced=True,\n is_list=True,\n ),\n MessageTextInput(\n name=\"background_color\",\n display_name=\"Background Color\",\n info=\"The background color of the icon.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"chat_icon\",\n display_name=\"Icon\",\n info=\"The icon of the message.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"text_color\",\n display_name=\"Text Color\",\n info=\"The text color of the name\",\n advanced=True,\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"message_response\"),\n ]\n\n async def message_response(self) -> Message:\n background_color = self.background_color\n text_color = self.text_color\n icon = self.chat_icon\n\n message = await Message.create(\n text=self.input_value,\n sender=self.sender,\n sender_name=self.sender_name,\n session_id=self.session_id,\n files=self.files,\n properties={\n \"background_color\": background_color,\n \"text_color\": text_color,\n \"icon\": icon,\n },\n )\n if self.session_id and isinstance(message, Message) and self.should_store_message:\n stored_message = await self.send_message(\n message,\n )\n self.message.value = stored_message\n message = stored_message\n\n self.status = message\n return message\n"
|
||||
"value": "from langflow.base.data.utils import IMG_FILE_TYPES, TEXT_FILE_TYPES\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.inputs import BoolInput\nfrom langflow.io import (\n DropdownInput,\n FileInput,\n MessageTextInput,\n MultilineInput,\n Output,\n)\nfrom langflow.schema.message import Message\nfrom langflow.utils.constants import (\n MESSAGE_SENDER_AI,\n MESSAGE_SENDER_NAME_USER,\n MESSAGE_SENDER_USER,\n)\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"MessagesSquare\"\n name = \"ChatInput\"\n minimized = True\n\n inputs = [\n MultilineInput(\n name=\"input_value\",\n display_name=\"Text\",\n value=\"\",\n info=\"Message to be passed as input.\",\n input_types=[],\n ),\n BoolInput(\n name=\"should_store_message\",\n display_name=\"Store Messages\",\n info=\"Store the message in the history.\",\n value=True,\n advanced=True,\n ),\n DropdownInput(\n name=\"sender\",\n display_name=\"Sender Type\",\n options=[MESSAGE_SENDER_AI, MESSAGE_SENDER_USER],\n value=MESSAGE_SENDER_USER,\n info=\"Type of sender.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"sender_name\",\n display_name=\"Sender Name\",\n info=\"Name of the sender.\",\n value=MESSAGE_SENDER_NAME_USER,\n advanced=True,\n ),\n MessageTextInput(\n name=\"session_id\",\n display_name=\"Session ID\",\n info=\"The session ID of the chat. If empty, the current session ID parameter will be used.\",\n advanced=True,\n ),\n FileInput(\n name=\"files\",\n display_name=\"Files\",\n file_types=TEXT_FILE_TYPES + IMG_FILE_TYPES,\n info=\"Files to be sent with the message.\",\n advanced=True,\n is_list=True,\n temp_file=True,\n ),\n MessageTextInput(\n name=\"background_color\",\n display_name=\"Background Color\",\n info=\"The background color of the icon.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"chat_icon\",\n display_name=\"Icon\",\n info=\"The icon of the message.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"text_color\",\n display_name=\"Text Color\",\n info=\"The text color of the name\",\n advanced=True,\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"message_response\"),\n ]\n\n async def message_response(self) -> Message:\n background_color = self.background_color\n text_color = self.text_color\n icon = self.chat_icon\n\n message = await Message.create(\n text=self.input_value,\n sender=self.sender,\n sender_name=self.sender_name,\n session_id=self.session_id,\n files=self.files,\n properties={\n \"background_color\": background_color,\n \"text_color\": text_color,\n \"icon\": icon,\n },\n )\n if self.session_id and isinstance(message, Message) and self.should_store_message:\n stored_message = await self.send_message(\n message,\n )\n self.message.value = stored_message\n message = stored_message\n\n self.status = message\n return message\n"
|
||||
},
|
||||
"files": {
|
||||
"_input_type": "FileInput",
|
||||
|
|
@ -344,6 +306,7 @@
|
|||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
"temp_file": true,
|
||||
"title_case": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "file",
|
||||
|
|
@ -377,10 +340,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Type of sender.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User"
|
||||
],
|
||||
"options": ["Machine", "User"],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
|
|
@ -395,9 +355,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Name of the sender.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "sender_name",
|
||||
|
|
@ -416,9 +374,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "session_id",
|
||||
|
|
@ -453,9 +409,7 @@
|
|||
"display_name": "Text Color",
|
||||
"dynamic": false,
|
||||
"info": "The text color of the name",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "text_color",
|
||||
|
|
@ -497,9 +451,7 @@
|
|||
"display_name": "Chat Output",
|
||||
"id": "ChatOutput-8np0X",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -533,9 +485,7 @@
|
|||
"name": "message",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -548,9 +498,7 @@
|
|||
"display_name": "Background Color",
|
||||
"dynamic": false,
|
||||
"info": "The background color of the icon.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "background_color",
|
||||
|
|
@ -570,9 +518,7 @@
|
|||
"display_name": "Icon",
|
||||
"dynamic": false,
|
||||
"info": "The icon of the message.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "chat_icon",
|
||||
|
|
@ -628,9 +574,7 @@
|
|||
"display_name": "Data Template",
|
||||
"dynamic": false,
|
||||
"info": "Template to convert Data to Text. If left empty, it will be dynamically set to the Data's text key.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "data_template",
|
||||
|
|
@ -650,11 +594,7 @@
|
|||
"display_name": "Text",
|
||||
"dynamic": false,
|
||||
"info": "Message to be passed as output.",
|
||||
"input_types": [
|
||||
"Data",
|
||||
"DataFrame",
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Data", "DataFrame", "Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "input_value",
|
||||
|
|
@ -675,10 +615,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Type of sender.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User"
|
||||
],
|
||||
"options": ["Machine", "User"],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
|
|
@ -694,9 +631,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Name of the sender.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "sender_name",
|
||||
|
|
@ -716,9 +651,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "session_id",
|
||||
|
|
@ -754,9 +687,7 @@
|
|||
"display_name": "Text Color",
|
||||
"dynamic": false,
|
||||
"info": "The text color of the name",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "text_color",
|
||||
|
|
@ -800,9 +731,7 @@
|
|||
"display_name": "City Selection Agent",
|
||||
"id": "Agent-7K58a",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -853,9 +782,7 @@
|
|||
"name": "response",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -884,9 +811,7 @@
|
|||
"display_name": "Agent Description [Deprecated]",
|
||||
"dynamic": false,
|
||||
"info": "The description of the agent. This is only used when in Tool Mode. Defaults to 'A helpful assistant with access to the following tools:' and tools are added dynamically. This feature is deprecated and will be removed in future versions.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"multiline": true,
|
||||
|
|
@ -937,9 +862,7 @@
|
|||
"display_name": "OpenAI API Key",
|
||||
"dynamic": false,
|
||||
"info": "The OpenAI API Key to use for the OpenAI model.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"load_from_db": true,
|
||||
"name": "api_key",
|
||||
"password": true,
|
||||
|
|
@ -990,9 +913,7 @@
|
|||
"display_name": "Input",
|
||||
"dynamic": false,
|
||||
"info": "The input provided by the user for the agent to process.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "input_value",
|
||||
|
|
@ -1084,9 +1005,7 @@
|
|||
"display_name": "External Memory",
|
||||
"dynamic": false,
|
||||
"info": "Retrieve messages from an external memory. If empty, it will use the Langflow tables.",
|
||||
"input_types": [
|
||||
"Memory"
|
||||
],
|
||||
"input_types": ["Memory"],
|
||||
"list": false,
|
||||
"name": "memory",
|
||||
"placeholder": "",
|
||||
|
|
@ -1180,10 +1099,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Order of the messages.",
|
||||
"name": "order",
|
||||
"options": [
|
||||
"Ascending",
|
||||
"Descending"
|
||||
],
|
||||
"options": ["Ascending", "Descending"],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
|
|
@ -1217,11 +1133,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Filter by sender type.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User",
|
||||
"Machine and User"
|
||||
],
|
||||
"options": ["Machine", "User", "Machine and User"],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
|
|
@ -1237,9 +1149,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Filter by sender name.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "sender_name",
|
||||
|
|
@ -1259,9 +1169,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "session_id",
|
||||
|
|
@ -1281,9 +1189,7 @@
|
|||
"display_name": "Agent Instructions",
|
||||
"dynamic": false,
|
||||
"info": "System Prompt: Initial instructions and context provided to guide the agent's behavior.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"multiline": true,
|
||||
|
|
@ -1320,9 +1226,7 @@
|
|||
"display_name": "Template",
|
||||
"dynamic": false,
|
||||
"info": "The template to use for formatting the data. It can contain the keys {text}, {sender} or any other key in the message data.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"multiline": true,
|
||||
|
|
@ -1361,9 +1265,7 @@
|
|||
"display_name": "Tools",
|
||||
"dynamic": false,
|
||||
"info": "These are the tools that the agent can use to help with tasks.",
|
||||
"input_types": [
|
||||
"Tool"
|
||||
],
|
||||
"input_types": ["Tool"],
|
||||
"list": true,
|
||||
"name": "tools",
|
||||
"placeholder": "",
|
||||
|
|
@ -1420,9 +1322,7 @@
|
|||
"display_name": "Local Expert Agent",
|
||||
"id": "Agent-zOYup",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -1473,9 +1373,7 @@
|
|||
"name": "response",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -1504,9 +1402,7 @@
|
|||
"display_name": "Agent Description [Deprecated]",
|
||||
"dynamic": false,
|
||||
"info": "The description of the agent. This is only used when in Tool Mode. Defaults to 'A helpful assistant with access to the following tools:' and tools are added dynamically. This feature is deprecated and will be removed in future versions.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"multiline": true,
|
||||
|
|
@ -1557,9 +1453,7 @@
|
|||
"display_name": "OpenAI API Key",
|
||||
"dynamic": false,
|
||||
"info": "The OpenAI API Key to use for the OpenAI model.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"load_from_db": true,
|
||||
"name": "api_key",
|
||||
"password": true,
|
||||
|
|
@ -1610,9 +1504,7 @@
|
|||
"display_name": "Input",
|
||||
"dynamic": false,
|
||||
"info": "The input provided by the user for the agent to process.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "input_value",
|
||||
|
|
@ -1704,9 +1596,7 @@
|
|||
"display_name": "External Memory",
|
||||
"dynamic": false,
|
||||
"info": "Retrieve messages from an external memory. If empty, it will use the Langflow tables.",
|
||||
"input_types": [
|
||||
"Memory"
|
||||
],
|
||||
"input_types": ["Memory"],
|
||||
"list": false,
|
||||
"name": "memory",
|
||||
"placeholder": "",
|
||||
|
|
@ -1800,10 +1690,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Order of the messages.",
|
||||
"name": "order",
|
||||
"options": [
|
||||
"Ascending",
|
||||
"Descending"
|
||||
],
|
||||
"options": ["Ascending", "Descending"],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
|
|
@ -1837,11 +1724,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Filter by sender type.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User",
|
||||
"Machine and User"
|
||||
],
|
||||
"options": ["Machine", "User", "Machine and User"],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
|
|
@ -1857,9 +1740,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Filter by sender name.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "sender_name",
|
||||
|
|
@ -1879,9 +1760,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "session_id",
|
||||
|
|
@ -1901,9 +1780,7 @@
|
|||
"display_name": "Agent Instructions",
|
||||
"dynamic": false,
|
||||
"info": "System Prompt: Initial instructions and context provided to guide the agent's behavior.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"multiline": true,
|
||||
|
|
@ -1940,9 +1817,7 @@
|
|||
"display_name": "Template",
|
||||
"dynamic": false,
|
||||
"info": "The template to use for formatting the data. It can contain the keys {text}, {sender} or any other key in the message data.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"multiline": true,
|
||||
|
|
@ -1981,9 +1856,7 @@
|
|||
"display_name": "Tools",
|
||||
"dynamic": false,
|
||||
"info": "These are the tools that the agent can use to help with tasks.",
|
||||
"input_types": [
|
||||
"Tool"
|
||||
],
|
||||
"input_types": ["Tool"],
|
||||
"list": true,
|
||||
"name": "tools",
|
||||
"placeholder": "",
|
||||
|
|
@ -2040,9 +1913,7 @@
|
|||
"display_name": "Travel Concierge Agent",
|
||||
"id": "Agent-PKpSO",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -2093,9 +1964,7 @@
|
|||
"name": "response",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -2124,9 +1993,7 @@
|
|||
"display_name": "Agent Description [Deprecated]",
|
||||
"dynamic": false,
|
||||
"info": "The description of the agent. This is only used when in Tool Mode. Defaults to 'A helpful assistant with access to the following tools:' and tools are added dynamically. This feature is deprecated and will be removed in future versions.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"multiline": true,
|
||||
|
|
@ -2177,9 +2044,7 @@
|
|||
"display_name": "OpenAI API Key",
|
||||
"dynamic": false,
|
||||
"info": "The OpenAI API Key to use for the OpenAI model.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"load_from_db": true,
|
||||
"name": "api_key",
|
||||
"password": true,
|
||||
|
|
@ -2230,9 +2095,7 @@
|
|||
"display_name": "Input",
|
||||
"dynamic": false,
|
||||
"info": "The input provided by the user for the agent to process.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "input_value",
|
||||
|
|
@ -2324,9 +2187,7 @@
|
|||
"display_name": "External Memory",
|
||||
"dynamic": false,
|
||||
"info": "Retrieve messages from an external memory. If empty, it will use the Langflow tables.",
|
||||
"input_types": [
|
||||
"Memory"
|
||||
],
|
||||
"input_types": ["Memory"],
|
||||
"list": false,
|
||||
"name": "memory",
|
||||
"placeholder": "",
|
||||
|
|
@ -2420,10 +2281,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Order of the messages.",
|
||||
"name": "order",
|
||||
"options": [
|
||||
"Ascending",
|
||||
"Descending"
|
||||
],
|
||||
"options": ["Ascending", "Descending"],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
|
|
@ -2457,11 +2315,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Filter by sender type.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User",
|
||||
"Machine and User"
|
||||
],
|
||||
"options": ["Machine", "User", "Machine and User"],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
|
|
@ -2477,9 +2331,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Filter by sender name.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "sender_name",
|
||||
|
|
@ -2499,9 +2351,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "session_id",
|
||||
|
|
@ -2521,9 +2371,7 @@
|
|||
"display_name": "Agent Instructions",
|
||||
"dynamic": false,
|
||||
"info": "System Prompt: Initial instructions and context provided to guide the agent's behavior.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"multiline": true,
|
||||
|
|
@ -2560,9 +2408,7 @@
|
|||
"display_name": "Template",
|
||||
"dynamic": false,
|
||||
"info": "The template to use for formatting the data. It can contain the keys {text}, {sender} or any other key in the message data.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"multiline": true,
|
||||
|
|
@ -2601,9 +2447,7 @@
|
|||
"display_name": "Tools",
|
||||
"dynamic": false,
|
||||
"info": "These are the tools that the agent can use to help with tasks.",
|
||||
"input_types": [
|
||||
"Tool"
|
||||
],
|
||||
"input_types": ["Tool"],
|
||||
"list": true,
|
||||
"name": "tools",
|
||||
"placeholder": "",
|
||||
|
|
@ -2839,11 +2683,7 @@
|
|||
"display_name": "URL",
|
||||
"id": "URL-j9slU",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Data",
|
||||
"DataFrame",
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Data", "DataFrame", "Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -2874,9 +2714,7 @@
|
|||
"required_inputs": null,
|
||||
"selected": "Tool",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Tool"
|
||||
],
|
||||
"types": ["Tool"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -2928,11 +2766,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Output Format. Use 'Text' to extract text from the HTML, 'Raw HTML' for the raw HTML content, or 'JSON' to extract JSON from the HTML.",
|
||||
"name": "format",
|
||||
"options": [
|
||||
"Text",
|
||||
"Raw HTML",
|
||||
"JSON"
|
||||
],
|
||||
"options": ["Text", "Raw HTML", "JSON"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"real_time_refresh": true,
|
||||
|
|
@ -2988,10 +2822,7 @@
|
|||
"description": "Modify tool names and descriptions to help agents understand when to use each tool.",
|
||||
"field_parsers": {
|
||||
"commands": "commands",
|
||||
"name": [
|
||||
"snake_case",
|
||||
"no_blank"
|
||||
]
|
||||
"name": ["snake_case", "no_blank"]
|
||||
},
|
||||
"hide_options": true
|
||||
},
|
||||
|
|
@ -3048,23 +2879,17 @@
|
|||
{
|
||||
"description": "fetch_content() - Load and retrieve data from specified URLs. Supports output in plain text, raw HTML, or JSON, with options for cleaning and separating multiple outputs.",
|
||||
"name": "URL-fetch_content",
|
||||
"tags": [
|
||||
"URL-fetch_content"
|
||||
]
|
||||
"tags": ["URL-fetch_content"]
|
||||
},
|
||||
{
|
||||
"description": "fetch_content_text() - Load and retrieve data from specified URLs. Supports output in plain text, raw HTML, or JSON, with options for cleaning and separating multiple outputs.",
|
||||
"name": "URL-fetch_content_text",
|
||||
"tags": [
|
||||
"URL-fetch_content_text"
|
||||
]
|
||||
"tags": ["URL-fetch_content_text"]
|
||||
},
|
||||
{
|
||||
"description": "as_dataframe() - Load and retrieve data from specified URLs. Supports output in plain text, raw HTML, or JSON, with options for cleaning and separating multiple outputs.",
|
||||
"name": "URL-as_dataframe",
|
||||
"tags": [
|
||||
"URL-as_dataframe"
|
||||
]
|
||||
"tags": ["URL-as_dataframe"]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
@ -3074,9 +2899,7 @@
|
|||
"display_name": "URLs",
|
||||
"dynamic": false,
|
||||
"info": "",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": true,
|
||||
"list_add_label": "Add URL",
|
||||
"load_from_db": false,
|
||||
|
|
@ -3114,9 +2937,7 @@
|
|||
"data": {
|
||||
"id": "CalculatorComponent-L3y5A",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Data"
|
||||
],
|
||||
"base_classes": ["Data"],
|
||||
"beta": false,
|
||||
"category": "tools",
|
||||
"conditional_paths": [],
|
||||
|
|
@ -3125,9 +2946,7 @@
|
|||
"display_name": "Calculator",
|
||||
"documentation": "",
|
||||
"edited": false,
|
||||
"field_order": [
|
||||
"expression"
|
||||
],
|
||||
"field_order": ["expression"],
|
||||
"frozen": false,
|
||||
"icon": "calculator",
|
||||
"key": "CalculatorComponent",
|
||||
|
|
@ -3146,9 +2965,7 @@
|
|||
"name": "component_as_tool",
|
||||
"required_inputs": null,
|
||||
"selected": "Tool",
|
||||
"types": [
|
||||
"Tool"
|
||||
],
|
||||
"types": ["Tool"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -3180,9 +2997,7 @@
|
|||
"display_name": "Expression",
|
||||
"dynamic": false,
|
||||
"info": "The arithmetic expression to evaluate (e.g., '4*4*(33/22)+12-20').",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -3222,10 +3037,7 @@
|
|||
"description": "Modify tool names and descriptions to help agents understand when to use each tool.",
|
||||
"field_parsers": {
|
||||
"commands": "commands",
|
||||
"name": [
|
||||
"snake_case",
|
||||
"no_blank"
|
||||
]
|
||||
"name": ["snake_case", "no_blank"]
|
||||
},
|
||||
"hide_options": true
|
||||
},
|
||||
|
|
@ -3276,9 +3088,7 @@
|
|||
{
|
||||
"description": "evaluate_expression() - Perform basic arithmetic operations on a given expression.",
|
||||
"name": "CalculatorComponent-evaluate_expression",
|
||||
"tags": [
|
||||
"CalculatorComponent-evaluate_expression"
|
||||
]
|
||||
"tags": ["CalculatorComponent-evaluate_expression"]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -3307,11 +3117,7 @@
|
|||
"display_name": "Search API",
|
||||
"id": "SearchComponent-8lQPB",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Data",
|
||||
"DataFrame",
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Data", "DataFrame", "Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -3345,9 +3151,7 @@
|
|||
"required_inputs": null,
|
||||
"selected": "Tool",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Tool"
|
||||
],
|
||||
"types": ["Tool"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -3360,9 +3164,7 @@
|
|||
"display_name": "SearchAPI API Key",
|
||||
"dynamic": false,
|
||||
"info": "",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"load_from_db": false,
|
||||
"name": "api_key",
|
||||
"password": true,
|
||||
|
|
@ -3400,11 +3202,7 @@
|
|||
"dynamic": false,
|
||||
"info": "",
|
||||
"name": "engine",
|
||||
"options": [
|
||||
"google",
|
||||
"bing",
|
||||
"duckduckgo"
|
||||
],
|
||||
"options": ["google", "bing", "duckduckgo"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -3422,9 +3220,7 @@
|
|||
"display_name": "Input",
|
||||
"dynamic": false,
|
||||
"info": "",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -3519,10 +3315,7 @@
|
|||
"description": "Modify tool names and descriptions to help agents understand when to use each tool.",
|
||||
"field_parsers": {
|
||||
"commands": "commands",
|
||||
"name": [
|
||||
"snake_case",
|
||||
"no_blank"
|
||||
]
|
||||
"name": ["snake_case", "no_blank"]
|
||||
},
|
||||
"hide_options": true
|
||||
},
|
||||
|
|
@ -3593,25 +3386,19 @@
|
|||
"description": "fetch_content(api_key: Message) - Call the searchapi.io API with result limiting",
|
||||
"name": "SearchComponent-fetch_content",
|
||||
"status": true,
|
||||
"tags": [
|
||||
"SearchComponent-fetch_content"
|
||||
]
|
||||
"tags": ["SearchComponent-fetch_content"]
|
||||
},
|
||||
{
|
||||
"description": "fetch_content_text(api_key: Message) - Call the searchapi.io API with result limiting",
|
||||
"name": "SearchComponent-fetch_content_text",
|
||||
"status": true,
|
||||
"tags": [
|
||||
"SearchComponent-fetch_content_text"
|
||||
]
|
||||
"tags": ["SearchComponent-fetch_content_text"]
|
||||
},
|
||||
{
|
||||
"description": "as_dataframe(api_key: Message) - Call the searchapi.io API with result limiting",
|
||||
"name": "SearchComponent-as_dataframe",
|
||||
"status": true,
|
||||
"tags": [
|
||||
"SearchComponent-as_dataframe"
|
||||
]
|
||||
"tags": ["SearchComponent-as_dataframe"]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -3649,8 +3436,5 @@
|
|||
"is_component": false,
|
||||
"last_tested_version": "1.0.19.post2",
|
||||
"name": "Travel Planning Agents",
|
||||
"tags": [
|
||||
"agents",
|
||||
"openai"
|
||||
]
|
||||
}
|
||||
"tags": ["agents", "openai"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,17 +9,12 @@
|
|||
"dataType": "TextInput",
|
||||
"id": "TextInput-eClq5",
|
||||
"name": "text",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "CONTENT_GUIDELINES",
|
||||
"id": "Prompt-AWZtN",
|
||||
"inputTypes": [
|
||||
"Message",
|
||||
"Text"
|
||||
],
|
||||
"inputTypes": ["Message", "Text"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -38,17 +33,12 @@
|
|||
"dataType": "TextInput",
|
||||
"id": "TextInput-IpoG7",
|
||||
"name": "text",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "OUTPUT_FORMAT",
|
||||
"id": "Prompt-AWZtN",
|
||||
"inputTypes": [
|
||||
"Message",
|
||||
"Text"
|
||||
],
|
||||
"inputTypes": ["Message", "Text"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -67,17 +57,12 @@
|
|||
"dataType": "TextInput",
|
||||
"id": "TextInput-npraC",
|
||||
"name": "text",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "OUTPUT_LANGUAGE",
|
||||
"id": "Prompt-AWZtN",
|
||||
"inputTypes": [
|
||||
"Message",
|
||||
"Text"
|
||||
],
|
||||
"inputTypes": ["Message", "Text"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -96,17 +81,12 @@
|
|||
"dataType": "TextInput",
|
||||
"id": "TextInput-EZaR7",
|
||||
"name": "text",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "PROFILE_DETAILS",
|
||||
"id": "Prompt-AWZtN",
|
||||
"inputTypes": [
|
||||
"Message",
|
||||
"Text"
|
||||
],
|
||||
"inputTypes": ["Message", "Text"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -125,17 +105,12 @@
|
|||
"dataType": "TextInput",
|
||||
"id": "TextInput-fKGcs",
|
||||
"name": "text",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "PROFILE_TYPE",
|
||||
"id": "Prompt-AWZtN",
|
||||
"inputTypes": [
|
||||
"Message",
|
||||
"Text"
|
||||
],
|
||||
"inputTypes": ["Message", "Text"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -154,17 +129,12 @@
|
|||
"dataType": "TextInput",
|
||||
"id": "TextInput-92vEK",
|
||||
"name": "text",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "TONE_AND_STYLE",
|
||||
"id": "Prompt-AWZtN",
|
||||
"inputTypes": [
|
||||
"Message",
|
||||
"Text"
|
||||
],
|
||||
"inputTypes": ["Message", "Text"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -182,16 +152,12 @@
|
|||
"dataType": "ChatInput",
|
||||
"id": "ChatInput-ECcN8",
|
||||
"name": "message",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "OpenAIModel-p0R9m",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -209,16 +175,12 @@
|
|||
"dataType": "Prompt",
|
||||
"id": "Prompt-AWZtN",
|
||||
"name": "prompt",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "system_message",
|
||||
"id": "OpenAIModel-p0R9m",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -236,18 +198,12 @@
|
|||
"dataType": "OpenAIModel",
|
||||
"id": "OpenAIModel-p0R9m",
|
||||
"name": "text_output",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "ChatOutput-0jDYx",
|
||||
"inputTypes": [
|
||||
"Data",
|
||||
"DataFrame",
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Data", "DataFrame", "Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -264,9 +220,7 @@
|
|||
"data": {
|
||||
"id": "ChatInput-ECcN8",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -300,9 +254,7 @@
|
|||
"name": "message",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -315,9 +267,7 @@
|
|||
"display_name": "Background Color",
|
||||
"dynamic": false,
|
||||
"info": "The background color of the icon.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "background_color",
|
||||
|
|
@ -336,9 +286,7 @@
|
|||
"display_name": "Icon",
|
||||
"dynamic": false,
|
||||
"info": "The icon of the message.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "chat_icon",
|
||||
|
|
@ -367,7 +315,7 @@
|
|||
"show": true,
|
||||
"title_case": false,
|
||||
"type": "code",
|
||||
"value": "from langflow.base.data.utils import IMG_FILE_TYPES, TEXT_FILE_TYPES\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.inputs import BoolInput\nfrom langflow.io import (\n DropdownInput,\n FileInput,\n MessageTextInput,\n MultilineInput,\n Output,\n)\nfrom langflow.schema.message import Message\nfrom langflow.utils.constants import (\n MESSAGE_SENDER_AI,\n MESSAGE_SENDER_NAME_USER,\n MESSAGE_SENDER_USER,\n)\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"MessagesSquare\"\n name = \"ChatInput\"\n minimized = True\n\n inputs = [\n MultilineInput(\n name=\"input_value\",\n display_name=\"Text\",\n value=\"\",\n info=\"Message to be passed as input.\",\n input_types=[],\n ),\n BoolInput(\n name=\"should_store_message\",\n display_name=\"Store Messages\",\n info=\"Store the message in the history.\",\n value=True,\n advanced=True,\n ),\n DropdownInput(\n name=\"sender\",\n display_name=\"Sender Type\",\n options=[MESSAGE_SENDER_AI, MESSAGE_SENDER_USER],\n value=MESSAGE_SENDER_USER,\n info=\"Type of sender.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"sender_name\",\n display_name=\"Sender Name\",\n info=\"Name of the sender.\",\n value=MESSAGE_SENDER_NAME_USER,\n advanced=True,\n ),\n MessageTextInput(\n name=\"session_id\",\n display_name=\"Session ID\",\n info=\"The session ID of the chat. If empty, the current session ID parameter will be used.\",\n advanced=True,\n ),\n FileInput(\n name=\"files\",\n display_name=\"Files\",\n file_types=TEXT_FILE_TYPES + IMG_FILE_TYPES,\n info=\"Files to be sent with the message.\",\n advanced=True,\n is_list=True,\n ),\n MessageTextInput(\n name=\"background_color\",\n display_name=\"Background Color\",\n info=\"The background color of the icon.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"chat_icon\",\n display_name=\"Icon\",\n info=\"The icon of the message.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"text_color\",\n display_name=\"Text Color\",\n info=\"The text color of the name\",\n advanced=True,\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"message_response\"),\n ]\n\n async def message_response(self) -> Message:\n background_color = self.background_color\n text_color = self.text_color\n icon = self.chat_icon\n\n message = await Message.create(\n text=self.input_value,\n sender=self.sender,\n sender_name=self.sender_name,\n session_id=self.session_id,\n files=self.files,\n properties={\n \"background_color\": background_color,\n \"text_color\": text_color,\n \"icon\": icon,\n },\n )\n if self.session_id and isinstance(message, Message) and self.should_store_message:\n stored_message = await self.send_message(\n message,\n )\n self.message.value = stored_message\n message = stored_message\n\n self.status = message\n return message\n"
|
||||
"value": "from langflow.base.data.utils import IMG_FILE_TYPES, TEXT_FILE_TYPES\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.inputs import BoolInput\nfrom langflow.io import (\n DropdownInput,\n FileInput,\n MessageTextInput,\n MultilineInput,\n Output,\n)\nfrom langflow.schema.message import Message\nfrom langflow.utils.constants import (\n MESSAGE_SENDER_AI,\n MESSAGE_SENDER_NAME_USER,\n MESSAGE_SENDER_USER,\n)\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"MessagesSquare\"\n name = \"ChatInput\"\n minimized = True\n\n inputs = [\n MultilineInput(\n name=\"input_value\",\n display_name=\"Text\",\n value=\"\",\n info=\"Message to be passed as input.\",\n input_types=[],\n ),\n BoolInput(\n name=\"should_store_message\",\n display_name=\"Store Messages\",\n info=\"Store the message in the history.\",\n value=True,\n advanced=True,\n ),\n DropdownInput(\n name=\"sender\",\n display_name=\"Sender Type\",\n options=[MESSAGE_SENDER_AI, MESSAGE_SENDER_USER],\n value=MESSAGE_SENDER_USER,\n info=\"Type of sender.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"sender_name\",\n display_name=\"Sender Name\",\n info=\"Name of the sender.\",\n value=MESSAGE_SENDER_NAME_USER,\n advanced=True,\n ),\n MessageTextInput(\n name=\"session_id\",\n display_name=\"Session ID\",\n info=\"The session ID of the chat. If empty, the current session ID parameter will be used.\",\n advanced=True,\n ),\n FileInput(\n name=\"files\",\n display_name=\"Files\",\n file_types=TEXT_FILE_TYPES + IMG_FILE_TYPES,\n info=\"Files to be sent with the message.\",\n advanced=True,\n is_list=True,\n temp_file=True,\n ),\n MessageTextInput(\n name=\"background_color\",\n display_name=\"Background Color\",\n info=\"The background color of the icon.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"chat_icon\",\n display_name=\"Icon\",\n info=\"The icon of the message.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"text_color\",\n display_name=\"Text Color\",\n info=\"The text color of the name\",\n advanced=True,\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"message_response\"),\n ]\n\n async def message_response(self) -> Message:\n background_color = self.background_color\n text_color = self.text_color\n icon = self.chat_icon\n\n message = await Message.create(\n text=self.input_value,\n sender=self.sender,\n sender_name=self.sender_name,\n session_id=self.session_id,\n files=self.files,\n properties={\n \"background_color\": background_color,\n \"text_color\": text_color,\n \"icon\": icon,\n },\n )\n if self.session_id and isinstance(message, Message) and self.should_store_message:\n stored_message = await self.send_message(\n message,\n )\n self.message.value = stored_message\n message = stored_message\n\n self.status = message\n return message\n"
|
||||
},
|
||||
"files": {
|
||||
"_input_type": "FileInput",
|
||||
|
|
@ -406,6 +354,7 @@
|
|||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
"temp_file": true,
|
||||
"title_case": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "file",
|
||||
|
|
@ -439,10 +388,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Type of sender.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User"
|
||||
],
|
||||
"options": ["Machine", "User"],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
|
|
@ -457,9 +403,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Name of the sender.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "sender_name",
|
||||
|
|
@ -478,9 +422,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "session_id",
|
||||
|
|
@ -515,9 +457,7 @@
|
|||
"display_name": "Text Color",
|
||||
"dynamic": false,
|
||||
"info": "The text color of the name",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "text_color",
|
||||
|
|
@ -557,9 +497,7 @@
|
|||
"data": {
|
||||
"id": "TextInput-eClq5",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -567,9 +505,7 @@
|
|||
"display_name": "Content Guidelines",
|
||||
"documentation": "",
|
||||
"edited": false,
|
||||
"field_order": [
|
||||
"input_value"
|
||||
],
|
||||
"field_order": ["input_value"],
|
||||
"frozen": false,
|
||||
"icon": "type",
|
||||
"legacy": false,
|
||||
|
|
@ -585,9 +521,7 @@
|
|||
"name": "text",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -618,9 +552,7 @@
|
|||
"display_name": "Text",
|
||||
"dynamic": false,
|
||||
"info": "Text to be passed as input.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"multiline": true,
|
||||
|
|
@ -663,9 +595,7 @@
|
|||
"display_name": "Chat Output",
|
||||
"id": "ChatOutput-0jDYx",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -699,9 +629,7 @@
|
|||
"name": "message",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -714,9 +642,7 @@
|
|||
"display_name": "Background Color",
|
||||
"dynamic": false,
|
||||
"info": "The background color of the icon.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "background_color",
|
||||
|
|
@ -736,9 +662,7 @@
|
|||
"display_name": "Icon",
|
||||
"dynamic": false,
|
||||
"info": "The icon of the message.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "chat_icon",
|
||||
|
|
@ -794,9 +718,7 @@
|
|||
"display_name": "Data Template",
|
||||
"dynamic": false,
|
||||
"info": "Template to convert Data to Text. If left empty, it will be dynamically set to the Data's text key.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "data_template",
|
||||
|
|
@ -816,11 +738,7 @@
|
|||
"display_name": "Text",
|
||||
"dynamic": false,
|
||||
"info": "Message to be passed as output.",
|
||||
"input_types": [
|
||||
"Data",
|
||||
"DataFrame",
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Data", "DataFrame", "Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "input_value",
|
||||
|
|
@ -841,10 +759,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Type of sender.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User"
|
||||
],
|
||||
"options": ["Machine", "User"],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
|
|
@ -860,9 +775,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Name of the sender.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "sender_name",
|
||||
|
|
@ -882,9 +795,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "session_id",
|
||||
|
|
@ -920,9 +831,7 @@
|
|||
"display_name": "Text Color",
|
||||
"dynamic": false,
|
||||
"info": "The text color of the name",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "text_color",
|
||||
|
|
@ -964,9 +873,7 @@
|
|||
"data": {
|
||||
"id": "TextInput-IpoG7",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -974,9 +881,7 @@
|
|||
"display_name": "Output Format",
|
||||
"documentation": "",
|
||||
"edited": false,
|
||||
"field_order": [
|
||||
"input_value"
|
||||
],
|
||||
"field_order": ["input_value"],
|
||||
"frozen": false,
|
||||
"icon": "type",
|
||||
"legacy": false,
|
||||
|
|
@ -992,9 +897,7 @@
|
|||
"name": "text",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -1025,9 +928,7 @@
|
|||
"display_name": "Text",
|
||||
"dynamic": false,
|
||||
"info": "Text to be passed as input.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"multiline": true,
|
||||
|
|
@ -1068,9 +969,7 @@
|
|||
"data": {
|
||||
"id": "TextInput-npraC",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -1078,9 +977,7 @@
|
|||
"display_name": "Output Language",
|
||||
"documentation": "",
|
||||
"edited": false,
|
||||
"field_order": [
|
||||
"input_value"
|
||||
],
|
||||
"field_order": ["input_value"],
|
||||
"frozen": false,
|
||||
"icon": "type",
|
||||
"legacy": false,
|
||||
|
|
@ -1096,9 +993,7 @@
|
|||
"name": "text",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -1129,9 +1024,7 @@
|
|||
"display_name": "Text",
|
||||
"dynamic": false,
|
||||
"info": "Text to be passed as input.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"multiline": true,
|
||||
|
|
@ -1172,9 +1065,7 @@
|
|||
"data": {
|
||||
"id": "TextInput-EZaR7",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -1182,9 +1073,7 @@
|
|||
"display_name": "Profile Details",
|
||||
"documentation": "",
|
||||
"edited": false,
|
||||
"field_order": [
|
||||
"input_value"
|
||||
],
|
||||
"field_order": ["input_value"],
|
||||
"frozen": false,
|
||||
"icon": "type",
|
||||
"legacy": false,
|
||||
|
|
@ -1200,9 +1089,7 @@
|
|||
"name": "text",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -1233,9 +1120,7 @@
|
|||
"display_name": "Text",
|
||||
"dynamic": false,
|
||||
"info": "Text to be passed as input.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"multiline": true,
|
||||
|
|
@ -1276,9 +1161,7 @@
|
|||
"data": {
|
||||
"id": "TextInput-92vEK",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -1286,9 +1169,7 @@
|
|||
"display_name": "Tone And Style",
|
||||
"documentation": "",
|
||||
"edited": false,
|
||||
"field_order": [
|
||||
"input_value"
|
||||
],
|
||||
"field_order": ["input_value"],
|
||||
"frozen": false,
|
||||
"icon": "type",
|
||||
"legacy": false,
|
||||
|
|
@ -1304,9 +1185,7 @@
|
|||
"name": "text",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -1337,9 +1216,7 @@
|
|||
"display_name": "Text",
|
||||
"dynamic": false,
|
||||
"info": "Text to be passed as input.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"multiline": true,
|
||||
|
|
@ -1380,9 +1257,7 @@
|
|||
"data": {
|
||||
"id": "TextInput-fKGcs",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -1390,9 +1265,7 @@
|
|||
"display_name": "Profile Type",
|
||||
"documentation": "",
|
||||
"edited": false,
|
||||
"field_order": [
|
||||
"input_value"
|
||||
],
|
||||
"field_order": ["input_value"],
|
||||
"frozen": false,
|
||||
"icon": "type",
|
||||
"legacy": false,
|
||||
|
|
@ -1408,9 +1281,7 @@
|
|||
"name": "text",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -1441,9 +1312,7 @@
|
|||
"display_name": "Text",
|
||||
"dynamic": false,
|
||||
"info": "Text to be passed as input.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"multiline": true,
|
||||
|
|
@ -1523,9 +1392,7 @@
|
|||
"display_name": "Prompt",
|
||||
"id": "Prompt-AWZtN",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {
|
||||
|
|
@ -1542,9 +1409,7 @@
|
|||
"display_name": "Prompt",
|
||||
"documentation": "",
|
||||
"edited": false,
|
||||
"field_order": [
|
||||
"template"
|
||||
],
|
||||
"field_order": ["template"],
|
||||
"frozen": false,
|
||||
"icon": "prompts",
|
||||
"legacy": false,
|
||||
|
|
@ -1560,9 +1425,7 @@
|
|||
"name": "prompt",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -1576,10 +1439,7 @@
|
|||
"fileTypes": [],
|
||||
"file_path": "",
|
||||
"info": "",
|
||||
"input_types": [
|
||||
"Message",
|
||||
"Text"
|
||||
],
|
||||
"input_types": ["Message", "Text"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"multiline": true,
|
||||
|
|
@ -1599,10 +1459,7 @@
|
|||
"fileTypes": [],
|
||||
"file_path": "",
|
||||
"info": "",
|
||||
"input_types": [
|
||||
"Message",
|
||||
"Text"
|
||||
],
|
||||
"input_types": ["Message", "Text"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"multiline": true,
|
||||
|
|
@ -1622,10 +1479,7 @@
|
|||
"fileTypes": [],
|
||||
"file_path": "",
|
||||
"info": "",
|
||||
"input_types": [
|
||||
"Message",
|
||||
"Text"
|
||||
],
|
||||
"input_types": ["Message", "Text"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"multiline": true,
|
||||
|
|
@ -1645,10 +1499,7 @@
|
|||
"fileTypes": [],
|
||||
"file_path": "",
|
||||
"info": "",
|
||||
"input_types": [
|
||||
"Message",
|
||||
"Text"
|
||||
],
|
||||
"input_types": ["Message", "Text"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"multiline": true,
|
||||
|
|
@ -1668,10 +1519,7 @@
|
|||
"fileTypes": [],
|
||||
"file_path": "",
|
||||
"info": "",
|
||||
"input_types": [
|
||||
"Message",
|
||||
"Text"
|
||||
],
|
||||
"input_types": ["Message", "Text"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"multiline": true,
|
||||
|
|
@ -1691,10 +1539,7 @@
|
|||
"fileTypes": [],
|
||||
"file_path": "",
|
||||
"info": "",
|
||||
"input_types": [
|
||||
"Message",
|
||||
"Text"
|
||||
],
|
||||
"input_types": ["Message", "Text"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"multiline": true,
|
||||
|
|
@ -1749,9 +1594,7 @@
|
|||
"display_name": "Tool Placeholder",
|
||||
"dynamic": false,
|
||||
"info": "A placeholder input for tool mode.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"name": "tool_placeholder",
|
||||
|
|
@ -1793,10 +1636,7 @@
|
|||
"data": {
|
||||
"id": "OpenAIModel-p0R9m",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"LanguageModel",
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["LanguageModel", "Message"],
|
||||
"beta": false,
|
||||
"category": "models",
|
||||
"conditional_paths": [],
|
||||
|
|
@ -1835,9 +1675,7 @@
|
|||
"required_inputs": [],
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
},
|
||||
{
|
||||
|
|
@ -1846,14 +1684,10 @@
|
|||
"display_name": "Language Model",
|
||||
"method": "build_model",
|
||||
"name": "model_output",
|
||||
"required_inputs": [
|
||||
"api_key"
|
||||
],
|
||||
"required_inputs": ["api_key"],
|
||||
"selected": "LanguageModel",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"LanguageModel"
|
||||
],
|
||||
"types": ["LanguageModel"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -1867,9 +1701,7 @@
|
|||
"display_name": "OpenAI API Key",
|
||||
"dynamic": false,
|
||||
"info": "The OpenAI API Key to use for the OpenAI model.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"load_from_db": true,
|
||||
"name": "api_key",
|
||||
"password": true,
|
||||
|
|
@ -1904,9 +1736,7 @@
|
|||
"display_name": "Input",
|
||||
"dynamic": false,
|
||||
"info": "",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -2088,9 +1918,7 @@
|
|||
"display_name": "System Message",
|
||||
"dynamic": false,
|
||||
"info": "System message to pass to the model.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -2186,8 +2014,5 @@
|
|||
"is_component": false,
|
||||
"last_tested_version": "1.0.19.post2",
|
||||
"name": "Twitter Thread Generator",
|
||||
"tags": [
|
||||
"chatbots",
|
||||
"content-generation"
|
||||
]
|
||||
}
|
||||
"tags": ["chatbots", "content-generation"]
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -9,16 +9,12 @@
|
|||
"dataType": "YouTubeCommentsComponent",
|
||||
"id": "YouTubeCommentsComponent-5DgSV",
|
||||
"name": "comments",
|
||||
"output_types": [
|
||||
"DataFrame"
|
||||
]
|
||||
"output_types": ["DataFrame"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "df",
|
||||
"id": "BatchRunComponent-s2QTv",
|
||||
"inputTypes": [
|
||||
"DataFrame"
|
||||
],
|
||||
"inputTypes": ["DataFrame"],
|
||||
"type": "other"
|
||||
}
|
||||
},
|
||||
|
|
@ -37,16 +33,12 @@
|
|||
"dataType": "OpenAIModel",
|
||||
"id": "OpenAIModel-ZVATe",
|
||||
"name": "model_output",
|
||||
"output_types": [
|
||||
"LanguageModel"
|
||||
]
|
||||
"output_types": ["LanguageModel"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "model",
|
||||
"id": "BatchRunComponent-s2QTv",
|
||||
"inputTypes": [
|
||||
"LanguageModel"
|
||||
],
|
||||
"inputTypes": ["LanguageModel"],
|
||||
"type": "other"
|
||||
}
|
||||
},
|
||||
|
|
@ -65,16 +57,12 @@
|
|||
"dataType": "BatchRunComponent",
|
||||
"id": "BatchRunComponent-s2QTv",
|
||||
"name": "batch_results",
|
||||
"output_types": [
|
||||
"DataFrame"
|
||||
]
|
||||
"output_types": ["DataFrame"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "df",
|
||||
"id": "ParseDataFrame-pJJ7Z",
|
||||
"inputTypes": [
|
||||
"DataFrame"
|
||||
],
|
||||
"inputTypes": ["DataFrame"],
|
||||
"type": "other"
|
||||
}
|
||||
},
|
||||
|
|
@ -93,16 +81,12 @@
|
|||
"dataType": "ParseDataFrame",
|
||||
"id": "ParseDataFrame-pJJ7Z",
|
||||
"name": "text",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "analysis",
|
||||
"id": "Prompt-Kn7x9",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -121,16 +105,12 @@
|
|||
"dataType": "Prompt",
|
||||
"id": "Prompt-Kn7x9",
|
||||
"name": "prompt",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "Agent-Px7Zt",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -149,18 +129,12 @@
|
|||
"dataType": "Agent",
|
||||
"id": "Agent-Px7Zt",
|
||||
"name": "response",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "ChatOutput-W5R97",
|
||||
"inputTypes": [
|
||||
"Data",
|
||||
"DataFrame",
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Data", "DataFrame", "Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -179,16 +153,12 @@
|
|||
"dataType": "YouTubeTranscripts",
|
||||
"id": "YouTubeTranscripts-ppAJD",
|
||||
"name": "component_as_tool",
|
||||
"output_types": [
|
||||
"Tool"
|
||||
]
|
||||
"output_types": ["Tool"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "tools",
|
||||
"id": "Agent-Px7Zt",
|
||||
"inputTypes": [
|
||||
"Tool"
|
||||
],
|
||||
"inputTypes": ["Tool"],
|
||||
"type": "other"
|
||||
}
|
||||
},
|
||||
|
|
@ -207,16 +177,12 @@
|
|||
"dataType": "ChatInput",
|
||||
"id": "ChatInput-Aprv5",
|
||||
"name": "message",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_text",
|
||||
"id": "ConditionalRouter-NmX80",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -235,16 +201,12 @@
|
|||
"dataType": "ChatInput",
|
||||
"id": "ChatInput-Aprv5",
|
||||
"name": "message",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "message",
|
||||
"id": "ConditionalRouter-NmX80",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -263,16 +225,12 @@
|
|||
"dataType": "ConditionalRouter",
|
||||
"id": "ConditionalRouter-NmX80",
|
||||
"name": "true_result",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "video_url",
|
||||
"id": "YouTubeCommentsComponent-5DgSV",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -291,16 +249,12 @@
|
|||
"dataType": "ConditionalRouter",
|
||||
"id": "ConditionalRouter-NmX80",
|
||||
"name": "true_result",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
"output_types": ["Message"]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "url",
|
||||
"id": "Prompt-Kn7x9",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"inputTypes": ["Message"],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
|
|
@ -317,9 +271,7 @@
|
|||
"data": {
|
||||
"id": "BatchRunComponent-s2QTv",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"DataFrame"
|
||||
],
|
||||
"base_classes": ["DataFrame"],
|
||||
"beta": true,
|
||||
"category": "helpers",
|
||||
"conditional_paths": [],
|
||||
|
|
@ -328,12 +280,7 @@
|
|||
"display_name": "Batch Run",
|
||||
"documentation": "",
|
||||
"edited": false,
|
||||
"field_order": [
|
||||
"model",
|
||||
"system_message",
|
||||
"df",
|
||||
"column_name"
|
||||
],
|
||||
"field_order": ["model", "system_message", "df", "column_name"],
|
||||
"frozen": false,
|
||||
"icon": "List",
|
||||
"key": "BatchRunComponent",
|
||||
|
|
@ -351,9 +298,7 @@
|
|||
"name": "batch_results",
|
||||
"selected": "DataFrame",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"DataFrame"
|
||||
],
|
||||
"types": ["DataFrame"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -404,9 +349,7 @@
|
|||
"display_name": "DataFrame",
|
||||
"dynamic": false,
|
||||
"info": "The DataFrame whose column (specified by 'column_name') we'll treat as text messages.",
|
||||
"input_types": [
|
||||
"DataFrame"
|
||||
],
|
||||
"input_types": ["DataFrame"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"name": "df",
|
||||
|
|
@ -444,9 +387,7 @@
|
|||
"display_name": "Language Model",
|
||||
"dynamic": false,
|
||||
"info": "Connect the 'Language Model' output from your LLM component here.",
|
||||
"input_types": [
|
||||
"LanguageModel"
|
||||
],
|
||||
"input_types": ["LanguageModel"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"name": "model",
|
||||
|
|
@ -464,9 +405,7 @@
|
|||
"display_name": "System Message",
|
||||
"dynamic": false,
|
||||
"info": "Multi-line system instruction for all rows in the DataFrame.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -505,9 +444,7 @@
|
|||
"data": {
|
||||
"id": "YouTubeCommentsComponent-5DgSV",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"DataFrame"
|
||||
],
|
||||
"base_classes": ["DataFrame"],
|
||||
"beta": false,
|
||||
"category": "youtube",
|
||||
"conditional_paths": [],
|
||||
|
|
@ -541,9 +478,7 @@
|
|||
"name": "comments",
|
||||
"selected": "DataFrame",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"DataFrame"
|
||||
],
|
||||
"types": ["DataFrame"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -557,9 +492,7 @@
|
|||
"display_name": "YouTube API Key",
|
||||
"dynamic": false,
|
||||
"info": "Your YouTube Data API key.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"load_from_db": true,
|
||||
"name": "api_key",
|
||||
"password": true,
|
||||
|
|
@ -651,10 +584,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Sort comments by time or relevance.",
|
||||
"name": "sort_by",
|
||||
"options": [
|
||||
"time",
|
||||
"relevance"
|
||||
],
|
||||
"options": ["time", "relevance"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -671,9 +601,7 @@
|
|||
"display_name": "Video URL",
|
||||
"dynamic": false,
|
||||
"info": "The URL of the YouTube video to get comments from.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -711,10 +639,7 @@
|
|||
"data": {
|
||||
"id": "OpenAIModel-ZVATe",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"LanguageModel",
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["LanguageModel", "Message"],
|
||||
"beta": false,
|
||||
"category": "models",
|
||||
"conditional_paths": [],
|
||||
|
|
@ -754,9 +679,7 @@
|
|||
"required_inputs": [],
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
},
|
||||
{
|
||||
|
|
@ -765,14 +688,10 @@
|
|||
"display_name": "Language Model",
|
||||
"method": "build_model",
|
||||
"name": "model_output",
|
||||
"required_inputs": [
|
||||
"api_key"
|
||||
],
|
||||
"required_inputs": ["api_key"],
|
||||
"selected": "LanguageModel",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"LanguageModel"
|
||||
],
|
||||
"types": ["LanguageModel"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -786,9 +705,7 @@
|
|||
"display_name": "OpenAI API Key",
|
||||
"dynamic": false,
|
||||
"info": "The OpenAI API Key to use for the OpenAI model.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"load_from_db": true,
|
||||
"name": "api_key",
|
||||
"password": true,
|
||||
|
|
@ -823,9 +740,7 @@
|
|||
"display_name": "Input",
|
||||
"dynamic": false,
|
||||
"info": "",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1007,9 +922,7 @@
|
|||
"display_name": "System Message",
|
||||
"dynamic": false,
|
||||
"info": "System message to pass to the model.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1094,9 +1007,7 @@
|
|||
"data": {
|
||||
"id": "ParseDataFrame-pJJ7Z",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"category": "processing",
|
||||
"conditional_paths": [],
|
||||
|
|
@ -1105,11 +1016,7 @@
|
|||
"display_name": "Parse DataFrame",
|
||||
"documentation": "",
|
||||
"edited": false,
|
||||
"field_order": [
|
||||
"df",
|
||||
"template",
|
||||
"sep"
|
||||
],
|
||||
"field_order": ["df", "template", "sep"],
|
||||
"frozen": false,
|
||||
"icon": "braces",
|
||||
"key": "ParseDataFrame",
|
||||
|
|
@ -1127,9 +1034,7 @@
|
|||
"name": "text",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -1161,9 +1066,7 @@
|
|||
"display_name": "DataFrame",
|
||||
"dynamic": false,
|
||||
"info": "The DataFrame to convert to text rows.",
|
||||
"input_types": [
|
||||
"DataFrame"
|
||||
],
|
||||
"input_types": ["DataFrame"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"name": "df",
|
||||
|
|
@ -1202,9 +1105,7 @@
|
|||
"display_name": "Template",
|
||||
"dynamic": false,
|
||||
"info": "The template for formatting each row. Use placeholders matching column names in the DataFrame, for example '{col1}', '{col2}'.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1243,9 +1144,7 @@
|
|||
"data": {
|
||||
"id": "Agent-Px7Zt",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"category": "agents",
|
||||
"conditional_paths": [],
|
||||
|
|
@ -1297,9 +1196,7 @@
|
|||
"name": "response",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -1331,9 +1228,7 @@
|
|||
"display_name": "Agent Description [Deprecated]",
|
||||
"dynamic": false,
|
||||
"info": "The description of the agent. This is only used when in Tool Mode. Defaults to 'A helpful assistant with access to the following tools:' and tools are added dynamically. This feature is deprecated and will be removed in future versions.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1387,9 +1282,7 @@
|
|||
"display_name": "OpenAI API Key",
|
||||
"dynamic": false,
|
||||
"info": "The OpenAI API Key to use for the OpenAI model.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"load_from_db": true,
|
||||
"name": "api_key",
|
||||
"password": true,
|
||||
|
|
@ -1442,9 +1335,7 @@
|
|||
"display_name": "Input",
|
||||
"dynamic": false,
|
||||
"info": "The input provided by the user for the agent to process.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1543,9 +1434,7 @@
|
|||
"display_name": "External Memory",
|
||||
"dynamic": false,
|
||||
"info": "Retrieve messages from an external memory. If empty, it will use the Langflow tables.",
|
||||
"input_types": [
|
||||
"Memory"
|
||||
],
|
||||
"input_types": ["Memory"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"name": "memory",
|
||||
|
|
@ -1650,10 +1539,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Order of the messages.",
|
||||
"name": "order",
|
||||
"options": [
|
||||
"Ascending",
|
||||
"Descending"
|
||||
],
|
||||
"options": ["Ascending", "Descending"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -1691,11 +1577,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Filter by sender type.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User",
|
||||
"Machine and User"
|
||||
],
|
||||
"options": ["Machine", "User", "Machine and User"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -1712,9 +1594,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Filter by sender name.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1735,9 +1615,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1758,9 +1636,7 @@
|
|||
"display_name": "Agent Instructions",
|
||||
"dynamic": false,
|
||||
"info": "System Prompt: Initial instructions and context provided to guide the agent's behavior.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1810,9 +1686,7 @@
|
|||
"display_name": "Template",
|
||||
"dynamic": false,
|
||||
"info": "The template to use for formatting the data. It can contain the keys {text}, {sender} or any other key in the message data.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1852,9 +1726,7 @@
|
|||
"display_name": "Tools",
|
||||
"dynamic": false,
|
||||
"info": "These are the tools that the agent can use to help with tasks.",
|
||||
"input_types": [
|
||||
"Tool"
|
||||
],
|
||||
"input_types": ["Tool"],
|
||||
"list": true,
|
||||
"list_add_label": "Add More",
|
||||
"name": "tools",
|
||||
|
|
@ -1907,26 +1779,18 @@
|
|||
"data": {
|
||||
"id": "Prompt-Kn7x9",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {
|
||||
"template": [
|
||||
"url",
|
||||
"analysis"
|
||||
]
|
||||
"template": ["url", "analysis"]
|
||||
},
|
||||
"description": "Create a prompt template with dynamic variables.",
|
||||
"display_name": "Prompt",
|
||||
"documentation": "",
|
||||
"edited": false,
|
||||
"error": null,
|
||||
"field_order": [
|
||||
"template",
|
||||
"tool_placeholder"
|
||||
],
|
||||
"field_order": ["template", "tool_placeholder"],
|
||||
"frozen": false,
|
||||
"full_path": null,
|
||||
"icon": "prompts",
|
||||
|
|
@ -1948,9 +1812,7 @@
|
|||
"name": "prompt",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -1965,9 +1827,7 @@
|
|||
"fileTypes": [],
|
||||
"file_path": "",
|
||||
"info": "",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"multiline": true,
|
||||
|
|
@ -2021,9 +1881,7 @@
|
|||
"display_name": "Tool Placeholder",
|
||||
"dynamic": false,
|
||||
"info": "A placeholder input for tool mode.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -2046,9 +1904,7 @@
|
|||
"fileTypes": [],
|
||||
"file_path": "",
|
||||
"info": "",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"multiline": true,
|
||||
|
|
@ -2083,9 +1939,7 @@
|
|||
"data": {
|
||||
"id": "ChatOutput-W5R97",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"category": "outputs",
|
||||
"conditional_paths": [],
|
||||
|
|
@ -2122,9 +1976,7 @@
|
|||
"name": "message",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -2138,9 +1990,7 @@
|
|||
"display_name": "Background Color",
|
||||
"dynamic": false,
|
||||
"info": "The background color of the icon.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -2161,9 +2011,7 @@
|
|||
"display_name": "Icon",
|
||||
"dynamic": false,
|
||||
"info": "The icon of the message.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -2220,9 +2068,7 @@
|
|||
"display_name": "Data Template",
|
||||
"dynamic": false,
|
||||
"info": "Template to convert Data to Text. If left empty, it will be dynamically set to the Data's text key.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -2243,11 +2089,7 @@
|
|||
"display_name": "Text",
|
||||
"dynamic": false,
|
||||
"info": "Message to be passed as output.",
|
||||
"input_types": [
|
||||
"Data",
|
||||
"DataFrame",
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Data", "DataFrame", "Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -2271,10 +2113,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Type of sender.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User"
|
||||
],
|
||||
"options": ["Machine", "User"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -2291,9 +2130,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Name of the sender.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -2314,9 +2151,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -2355,9 +2190,7 @@
|
|||
"display_name": "Text Color",
|
||||
"dynamic": false,
|
||||
"info": "The text color of the name",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -2395,11 +2228,7 @@
|
|||
"data": {
|
||||
"id": "YouTubeTranscripts-ppAJD",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Data",
|
||||
"DataFrame",
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Data", "DataFrame", "Message"],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
|
|
@ -2407,11 +2236,7 @@
|
|||
"display_name": "YouTube Transcripts",
|
||||
"documentation": "",
|
||||
"edited": false,
|
||||
"field_order": [
|
||||
"url",
|
||||
"chunk_size_seconds",
|
||||
"translation"
|
||||
],
|
||||
"field_order": ["url", "chunk_size_seconds", "translation"],
|
||||
"frozen": false,
|
||||
"icon": "YouTube",
|
||||
"legacy": false,
|
||||
|
|
@ -2429,9 +2254,7 @@
|
|||
"required_inputs": null,
|
||||
"selected": "Tool",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Tool"
|
||||
],
|
||||
"types": ["Tool"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -2499,10 +2322,7 @@
|
|||
"description": "Modify tool names and descriptions to help agents understand when to use each tool.",
|
||||
"field_parsers": {
|
||||
"commands": "commands",
|
||||
"name": [
|
||||
"snake_case",
|
||||
"no_blank"
|
||||
]
|
||||
"name": ["snake_case", "no_blank"]
|
||||
},
|
||||
"hide_options": true
|
||||
},
|
||||
|
|
@ -2556,23 +2376,17 @@
|
|||
{
|
||||
"description": "get_dataframe_output(url: Message) - Extracts spoken content from YouTube videos with multiple output options.",
|
||||
"name": "YouTubeTranscripts-get_dataframe_output",
|
||||
"tags": [
|
||||
"YouTubeTranscripts-get_dataframe_output"
|
||||
]
|
||||
"tags": ["YouTubeTranscripts-get_dataframe_output"]
|
||||
},
|
||||
{
|
||||
"description": "get_message_output(url: Message) - Extracts spoken content from YouTube videos with multiple output options.",
|
||||
"name": "YouTubeTranscripts-get_message_output",
|
||||
"tags": [
|
||||
"YouTubeTranscripts-get_message_output"
|
||||
]
|
||||
"tags": ["YouTubeTranscripts-get_message_output"]
|
||||
},
|
||||
{
|
||||
"description": "get_data_output(url: Message) - Extracts spoken content from YouTube videos with multiple output options.",
|
||||
"name": "YouTubeTranscripts-get_data_output",
|
||||
"tags": [
|
||||
"YouTubeTranscripts-get_data_output"
|
||||
]
|
||||
"tags": ["YouTubeTranscripts-get_data_output"]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
@ -2616,9 +2430,7 @@
|
|||
"display_name": "Video URL",
|
||||
"dynamic": false,
|
||||
"info": "Enter the YouTube video URL to get transcripts from.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -2657,9 +2469,7 @@
|
|||
"data": {
|
||||
"id": "ChatInput-Aprv5",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"category": "inputs",
|
||||
"conditional_paths": [],
|
||||
|
|
@ -2696,9 +2506,7 @@
|
|||
"name": "message",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -2712,9 +2520,7 @@
|
|||
"display_name": "Background Color",
|
||||
"dynamic": false,
|
||||
"info": "The background color of the icon.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -2735,9 +2541,7 @@
|
|||
"display_name": "Icon",
|
||||
"dynamic": false,
|
||||
"info": "The icon of the message.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -2768,7 +2572,7 @@
|
|||
"show": true,
|
||||
"title_case": false,
|
||||
"type": "code",
|
||||
"value": "from langflow.base.data.utils import IMG_FILE_TYPES, TEXT_FILE_TYPES\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.inputs import BoolInput\nfrom langflow.io import (\n DropdownInput,\n FileInput,\n MessageTextInput,\n MultilineInput,\n Output,\n)\nfrom langflow.schema.message import Message\nfrom langflow.utils.constants import (\n MESSAGE_SENDER_AI,\n MESSAGE_SENDER_NAME_USER,\n MESSAGE_SENDER_USER,\n)\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"MessagesSquare\"\n name = \"ChatInput\"\n minimized = True\n\n inputs = [\n MultilineInput(\n name=\"input_value\",\n display_name=\"Text\",\n value=\"\",\n info=\"Message to be passed as input.\",\n input_types=[],\n ),\n BoolInput(\n name=\"should_store_message\",\n display_name=\"Store Messages\",\n info=\"Store the message in the history.\",\n value=True,\n advanced=True,\n ),\n DropdownInput(\n name=\"sender\",\n display_name=\"Sender Type\",\n options=[MESSAGE_SENDER_AI, MESSAGE_SENDER_USER],\n value=MESSAGE_SENDER_USER,\n info=\"Type of sender.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"sender_name\",\n display_name=\"Sender Name\",\n info=\"Name of the sender.\",\n value=MESSAGE_SENDER_NAME_USER,\n advanced=True,\n ),\n MessageTextInput(\n name=\"session_id\",\n display_name=\"Session ID\",\n info=\"The session ID of the chat. If empty, the current session ID parameter will be used.\",\n advanced=True,\n ),\n FileInput(\n name=\"files\",\n display_name=\"Files\",\n file_types=TEXT_FILE_TYPES + IMG_FILE_TYPES,\n info=\"Files to be sent with the message.\",\n advanced=True,\n is_list=True,\n ),\n MessageTextInput(\n name=\"background_color\",\n display_name=\"Background Color\",\n info=\"The background color of the icon.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"chat_icon\",\n display_name=\"Icon\",\n info=\"The icon of the message.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"text_color\",\n display_name=\"Text Color\",\n info=\"The text color of the name\",\n advanced=True,\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"message_response\"),\n ]\n\n async def message_response(self) -> Message:\n background_color = self.background_color\n text_color = self.text_color\n icon = self.chat_icon\n\n message = await Message.create(\n text=self.input_value,\n sender=self.sender,\n sender_name=self.sender_name,\n session_id=self.session_id,\n files=self.files,\n properties={\n \"background_color\": background_color,\n \"text_color\": text_color,\n \"icon\": icon,\n },\n )\n if self.session_id and isinstance(message, Message) and self.should_store_message:\n stored_message = await self.send_message(\n message,\n )\n self.message.value = stored_message\n message = stored_message\n\n self.status = message\n return message\n"
|
||||
"value": "from langflow.base.data.utils import IMG_FILE_TYPES, TEXT_FILE_TYPES\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.inputs import BoolInput\nfrom langflow.io import (\n DropdownInput,\n FileInput,\n MessageTextInput,\n MultilineInput,\n Output,\n)\nfrom langflow.schema.message import Message\nfrom langflow.utils.constants import (\n MESSAGE_SENDER_AI,\n MESSAGE_SENDER_NAME_USER,\n MESSAGE_SENDER_USER,\n)\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"MessagesSquare\"\n name = \"ChatInput\"\n minimized = True\n\n inputs = [\n MultilineInput(\n name=\"input_value\",\n display_name=\"Text\",\n value=\"\",\n info=\"Message to be passed as input.\",\n input_types=[],\n ),\n BoolInput(\n name=\"should_store_message\",\n display_name=\"Store Messages\",\n info=\"Store the message in the history.\",\n value=True,\n advanced=True,\n ),\n DropdownInput(\n name=\"sender\",\n display_name=\"Sender Type\",\n options=[MESSAGE_SENDER_AI, MESSAGE_SENDER_USER],\n value=MESSAGE_SENDER_USER,\n info=\"Type of sender.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"sender_name\",\n display_name=\"Sender Name\",\n info=\"Name of the sender.\",\n value=MESSAGE_SENDER_NAME_USER,\n advanced=True,\n ),\n MessageTextInput(\n name=\"session_id\",\n display_name=\"Session ID\",\n info=\"The session ID of the chat. If empty, the current session ID parameter will be used.\",\n advanced=True,\n ),\n FileInput(\n name=\"files\",\n display_name=\"Files\",\n file_types=TEXT_FILE_TYPES + IMG_FILE_TYPES,\n info=\"Files to be sent with the message.\",\n advanced=True,\n is_list=True,\n temp_file=True,\n ),\n MessageTextInput(\n name=\"background_color\",\n display_name=\"Background Color\",\n info=\"The background color of the icon.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"chat_icon\",\n display_name=\"Icon\",\n info=\"The icon of the message.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"text_color\",\n display_name=\"Text Color\",\n info=\"The text color of the name\",\n advanced=True,\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"message_response\"),\n ]\n\n async def message_response(self) -> Message:\n background_color = self.background_color\n text_color = self.text_color\n icon = self.chat_icon\n\n message = await Message.create(\n text=self.input_value,\n sender=self.sender,\n sender_name=self.sender_name,\n session_id=self.session_id,\n files=self.files,\n properties={\n \"background_color\": background_color,\n \"text_color\": text_color,\n \"icon\": icon,\n },\n )\n if self.session_id and isinstance(message, Message) and self.should_store_message:\n stored_message = await self.send_message(\n message,\n )\n self.message.value = stored_message\n message = stored_message\n\n self.status = message\n return message\n"
|
||||
},
|
||||
"files": {
|
||||
"_input_type": "FileInput",
|
||||
|
|
@ -2808,6 +2612,7 @@
|
|||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
"temp_file": true,
|
||||
"title_case": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "file",
|
||||
|
|
@ -2844,10 +2649,7 @@
|
|||
"dynamic": false,
|
||||
"info": "Type of sender.",
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
"User"
|
||||
],
|
||||
"options": ["Machine", "User"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -2864,9 +2666,7 @@
|
|||
"display_name": "Sender Name",
|
||||
"dynamic": false,
|
||||
"info": "Name of the sender.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -2887,9 +2687,7 @@
|
|||
"display_name": "Session ID",
|
||||
"dynamic": false,
|
||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -2928,9 +2726,7 @@
|
|||
"display_name": "Text Color",
|
||||
"dynamic": false,
|
||||
"info": "The text color of the name",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -3055,9 +2851,7 @@
|
|||
"data": {
|
||||
"id": "ConditionalRouter-NmX80",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
],
|
||||
"base_classes": ["Message"],
|
||||
"beta": false,
|
||||
"category": "logic",
|
||||
"conditional_paths": [],
|
||||
|
|
@ -3092,9 +2886,7 @@
|
|||
"name": "true_result",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
},
|
||||
{
|
||||
|
|
@ -3105,9 +2897,7 @@
|
|||
"name": "false_result",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"types": ["Message"],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
|
|
@ -3160,10 +2950,7 @@
|
|||
"dynamic": false,
|
||||
"info": "The default route to take when max iterations are reached.",
|
||||
"name": "default_route",
|
||||
"options": [
|
||||
"true_result",
|
||||
"false_result"
|
||||
],
|
||||
"options": ["true_result", "false_result"],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
|
|
@ -3180,9 +2967,7 @@
|
|||
"display_name": "Text Input",
|
||||
"dynamic": false,
|
||||
"info": "The primary text input for the operation.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -3203,9 +2988,7 @@
|
|||
"display_name": "Match Text",
|
||||
"dynamic": false,
|
||||
"info": "The text input to compare against.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -3244,9 +3027,7 @@
|
|||
"display_name": "Message",
|
||||
"dynamic": false,
|
||||
"info": "The message to pass through either route.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": ["Message"],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -3322,8 +3103,5 @@
|
|||
"is_component": false,
|
||||
"last_tested_version": "1.1.3",
|
||||
"name": "Youtube Analysis",
|
||||
"tags": [
|
||||
"agents",
|
||||
"assistants"
|
||||
]
|
||||
}
|
||||
"tags": ["agents", "assistants"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -139,6 +139,7 @@ class DatabaseLoadMixin(BaseModel):
|
|||
class FileMixin(BaseModel):
|
||||
file_path: list[str] | str | None = Field(default="")
|
||||
file_types: list[str] = Field(default=[], alias="fileTypes")
|
||||
temp_file: bool = Field(default=False)
|
||||
|
||||
@field_validator("file_path")
|
||||
@classmethod
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ from pydantic_core import PydanticSerializationError
|
|||
from rich import print as rprint
|
||||
from starlette.middleware.base import BaseHTTPMiddleware, RequestResponseEndpoint
|
||||
|
||||
from langflow.api import health_check_router, log_router, router, router_v2
|
||||
from langflow.api import health_check_router, log_router, router
|
||||
from langflow.initial_setup.setup import (
|
||||
create_or_update_starter_projects,
|
||||
initialize_super_user_if_needed,
|
||||
|
|
@ -253,7 +253,6 @@ def create_app():
|
|||
router.include_router(mcp_router)
|
||||
|
||||
app.include_router(router)
|
||||
app.include_router(router_v2)
|
||||
app.include_router(health_check_router)
|
||||
app.include_router(log_router)
|
||||
|
||||
|
|
|
|||
|
|
@ -120,6 +120,16 @@ def apply_json_filter(result, filter_) -> Data: # type: ignore[return-value]
|
|||
if isinstance(result, Data) and (not filter_ or not filter_.strip()):
|
||||
return result.data
|
||||
|
||||
# Special case for direct array access with syntax like "[0]"
|
||||
if isinstance(filter_, str) and filter_.strip().startswith("[") and filter_.strip().endswith("]"):
|
||||
try:
|
||||
index = int(filter_.strip()[1:-1])
|
||||
original_data = result.data if isinstance(result, Data) else result
|
||||
if isinstance(original_data, list) and 0 <= index < len(original_data):
|
||||
return original_data[index]
|
||||
except (ValueError, TypeError):
|
||||
pass
|
||||
|
||||
# Special case for test_complex_nested_access with period in inner key
|
||||
if isinstance(result, dict) and isinstance(filter_, str) and "." in filter_:
|
||||
for outer_key in result:
|
||||
|
|
|
|||
|
|
@ -193,6 +193,9 @@ ignore = [
|
|||
"langflow/api/v1/*" = [
|
||||
"TCH", # FastAPI needs to evaluate types at runtime
|
||||
]
|
||||
"langflow/api/v2/*" = [
|
||||
"TCH", # FastAPI needs to evaluate types at runtime
|
||||
]
|
||||
"langflow/{components/tools/python_code_structured_tool.py,custom/code_parser/code_parser.py,utils/validate.py}" = [
|
||||
"S102", # Use of exec
|
||||
]
|
||||
|
|
|
|||
|
|
@ -186,7 +186,6 @@ class TestGmailAPIComponent(ComponentTestBaseWithoutClient):
|
|||
assert result["auth_link"]["show"] is True
|
||||
assert result["auth_link"]["value"] == "https://auth.example.com"
|
||||
|
||||
|
||||
def test_show_hide_fields(self):
|
||||
# Create component
|
||||
component = GmailAPIComponent()
|
||||
|
|
|
|||
|
|
@ -80,11 +80,16 @@ def test_complex_nested_access(data):
|
|||
|
||||
|
||||
# Test array operations on objects
|
||||
@given(data=st.lists(st.dictionaries(
|
||||
keys=st.text(min_size=1).filter(lambda s: s.strip() and not any(c in s for c in "\r\n\t")),
|
||||
values=st.integers(),
|
||||
min_size=1),
|
||||
min_size=1))
|
||||
@given(
|
||||
data=st.lists(
|
||||
st.dictionaries(
|
||||
keys=st.text(min_size=1).filter(lambda s: s.strip() and not any(c in s for c in "\r\n\t")),
|
||||
values=st.integers(),
|
||||
min_size=1,
|
||||
),
|
||||
min_size=1,
|
||||
)
|
||||
)
|
||||
def test_array_object_operations(data):
|
||||
if data and all(data):
|
||||
key = next(iter(data[0]))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue