mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-08 15:05:17 +02:00
add prompt for scraping task
This commit is contained in:
parent
79744803fd
commit
0b7d7bdf55
2 changed files with 8 additions and 1 deletions
|
|
@ -53,3 +53,9 @@ The current task is about converting image into webpage code. please note the fo
|
|||
- Single-Step Code Generation: Execute the entire code generation process in a single step, encompassing HTML, CSS, and JavaScript. Avoid fragmenting the code generation into multiple separate steps to maintain consistency and simplify the development workflow.
|
||||
- Save webpages: Be sure to use the save method provided.
|
||||
"""
|
||||
|
||||
# Prompt for taking on "web_scraping" tasks
|
||||
WEB_SCRAPING_PROMPT = """
|
||||
- Remember to view and print the necessary HTML content in a separate task to understand the structure first before scraping data.
|
||||
- Since the data required by user may not correspond directly to the actual HTML element names, you should thoroughly analyze the HTML structure and meanings of all elements in the executing result first. Ensure the `class_` in your code should derived from the actual HTML structure directly, not based on your knowledge. To ensure it, analyse the most suitable location of the 'class_' in the actual HTML content before code.
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ from metagpt.prompts.task_type import (
|
|||
FEATURE_ENGINEERING_PROMPT,
|
||||
IMAGE2WEBPAGE_PROMPT,
|
||||
MODEL_EVALUATE_PROMPT,
|
||||
MODEL_TRAIN_PROMPT,
|
||||
MODEL_TRAIN_PROMPT, WEB_SCRAPING_PROMPT,
|
||||
)
|
||||
|
||||
|
||||
|
|
@ -62,6 +62,7 @@ class TaskType(Enum):
|
|||
WEBSCRAPING = TaskTypeDef(
|
||||
name="web scraping",
|
||||
desc="For scraping data from web pages.",
|
||||
guidance=WEB_SCRAPING_PROMPT,
|
||||
)
|
||||
EMAIL_LOGIN = TaskTypeDef(
|
||||
name="email login",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue