Промежуточный вариант: ужесточить planner recovery и fail-fast workflow.
Перевел планирование аргументов на строгий json_schema response_format, добавил сценарий с битыми полями для проверки восстановления и остановку workflow на первой ошибке шага. Сейчас используется Polza.ai.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"scenarios": {
|
||||
"news_source_discovery_v1": "news_source_discovery/v1.json"
|
||||
"news_source_discovery_v1": "news_source_discovery/v1.json",
|
||||
"news_source_discovery_v1_planner_repair": "news_source_discovery/v1_planner_repair.json"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
{
|
||||
"schema_version": "1",
|
||||
"scenario_id": "news_source_discovery_v1_planner_repair",
|
||||
"name": "News Source Discovery V1 Planner Repair",
|
||||
"description": "Test scenario with intentionally wrong input paths repaired by planner.",
|
||||
"input_schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"url"
|
||||
],
|
||||
"properties": {
|
||||
"url": {
|
||||
"type": "string",
|
||||
"description": "URL of source news article"
|
||||
}
|
||||
}
|
||||
},
|
||||
"steps": [
|
||||
{
|
||||
"name": "search_news_sources",
|
||||
"type": "tool",
|
||||
"tool": "search_news_sources",
|
||||
"input": {
|
||||
"url": {
|
||||
"from": "input.url"
|
||||
}
|
||||
},
|
||||
"required_input_fields": [
|
||||
"url"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "parse_articles_batch",
|
||||
"type": "tool",
|
||||
"tool": "parse_article",
|
||||
"foreach": {
|
||||
"from": "steps.search_news_sources.payload.items",
|
||||
"as": "item"
|
||||
},
|
||||
"input": {
|
||||
"url": {
|
||||
"from": "item.link"
|
||||
}
|
||||
},
|
||||
"required_input_fields": [
|
||||
"url"
|
||||
],
|
||||
"collect": {
|
||||
"url": {
|
||||
"from": "tool.payload.url"
|
||||
},
|
||||
"title": {
|
||||
"from": "tool.payload.title"
|
||||
},
|
||||
"text": {
|
||||
"from": "tool.payload.text"
|
||||
}
|
||||
},
|
||||
"collect_key": "items"
|
||||
},
|
||||
{
|
||||
"name": "extract_publication_date_batch",
|
||||
"type": "tool",
|
||||
"tool": "extract_publication_date",
|
||||
"foreach": {
|
||||
"from": "steps.parse_articles_batch.payload.items",
|
||||
"as": "item"
|
||||
},
|
||||
"input": {
|
||||
"article_text": {
|
||||
"from": "item.body"
|
||||
}
|
||||
},
|
||||
"required_input_fields": [
|
||||
"article_text"
|
||||
],
|
||||
"collect": {
|
||||
"url": {
|
||||
"from": "item.url"
|
||||
},
|
||||
"title": {
|
||||
"from": "item.title"
|
||||
},
|
||||
"published_at": {
|
||||
"from": "tool.payload.published_at"
|
||||
}
|
||||
},
|
||||
"collect_key": "items"
|
||||
},
|
||||
{
|
||||
"name": "rank_sources_by_date",
|
||||
"type": "tool",
|
||||
"tool": "rank_sources_by_date",
|
||||
"input": {
|
||||
"items": {
|
||||
"from": "steps.extract_publication_date_batch.payload.items"
|
||||
}
|
||||
},
|
||||
"required_input_fields": [
|
||||
"items"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "generate_summary",
|
||||
"type": "tool",
|
||||
"tool": "generate_summary",
|
||||
"input": {
|
||||
"items": {
|
||||
"from": "steps.rank_sources_by_date.payload.items_ranked_typo"
|
||||
}
|
||||
},
|
||||
"required_input_fields": [
|
||||
"items"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user