Fix: simple agent template notes (#4709)

* delete-youtube-template

* update-simple-agent

* update-description

* docs-package-and-yarn-lock

* update-edges

* descriptions-and-markdown

* readme

* tags

* update

hotfix for the tool_kit mode component update

* Update Simple Agent.json

added project tags

* Update Simple Agent.spec.ts

Playwright test update

* Update Simple Agent.spec.ts

* Update starter-projects.spec.ts

remove  youtube flow  from templates in test

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
This commit is contained in:
Mendon Kissling 2024-11-20 15:24:37 -05:00 • committed by GitHub
commit 3e57340cc4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 402 additions and 1843 deletions

View file

@ -46,19 +46,28 @@ STARTER_FOLDER_DESCRIPTION = "Starter projects to help you get started in Langfl
def update_projects_components_with_latest_component_versions(project_data, all_types_dict):
# project data has a nodes key, which is a list of nodes
# we want to run through each node and see if it exists in the all_types_dict
# if so, we go into the template key and also get the template from all_types_dict
# and update it all
# Flatten the all_types_dict for easy access
all_types_dict_flat = {}
for category in all_types_dict.values():
for key, component in category.items():
all_types_dict_flat[key] = component # noqa: PERF403
node_changes_log = defaultdict(list)
project_data_copy = deepcopy(project_data)
for node in project_data_copy.get("nodes", []):
node_data = node.get("data").get("node")
node_type = node.get("data").get("type")
# Skip updating if tool_mode is True
if node_data.get("tool_mode", False):
continue
# Skip nodes with outputs of the specified format
# NOTE: to account for the fact that the Simple Agent has dynamic outputs
if any(output.get("types") == ["Tool"] for output in node_data.get("outputs", [])):
continue
if node_type in all_types_dict_flat:
latest_node = all_types_dict_flat.get(node_type)
latest_template = latest_node.get("template")

View file

@ -1082,7 +1082,7 @@
"zoom": 0.7749929474098888
}
},
"description": "Get started with a simple prompt engineering flow. Customize AI responses by adjusting the system prompt template to create varied personalities.",
"description": "Perform basic prompting with an OpenAI model.",
"endpoint_name": null,
"icon": "Braces",
"id": "1511c230-d446-43a7-bfc3-539e69ce05b8",

File diff suppressed because one or more lines are too long

View file

@ -93,6 +93,6 @@ test("Simple Agent", async ({ page }) => {
const concatAllText = textContents.join(" ").toLowerCase();
expect(concatAllText).toContain("apple");
expect(concatAllText.length).toBeGreaterThan(100);
expect(concatAllText).toContain("hello! how can i assist you today?");
expect(concatAllText.length).toBeGreaterThan(20);
});

View file

@ -112,7 +112,6 @@ const templateIds = [
"template_travel-planning-agents",
"template_research-agent",
"template_simple-agent",
"template_youtube-transcript-q&a",
"template_sequential-tasks-agents",
"template_market-research",
];