mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-24 14:15:17 +02:00
recover legacy task type
This commit is contained in:
parent
9d453c5c10
commit
77eacec1b8
3 changed files with 16 additions and 2 deletions
|
|
@ -54,6 +54,20 @@ class TaskType(Enum):
|
|||
)
|
||||
OTHER = TaskTypeDef(name="other", desc="Any tasks not in the defined categories")
|
||||
|
||||
# Legacy TaskType to support tool recommendation using type match. You don't need to define task types if you have no human priors to inject.
|
||||
TEXT2IMAGE = TaskTypeDef(
|
||||
name="text2image",
|
||||
desc="Related to text2image, image2image using stable diffusion model.",
|
||||
)
|
||||
WEBSCRAPING = TaskTypeDef(
|
||||
name="web scraping",
|
||||
desc="For scraping data from web pages.",
|
||||
)
|
||||
EMAIL_LOGIN = TaskTypeDef(
|
||||
name="email login",
|
||||
desc="For logging to an email.",
|
||||
)
|
||||
|
||||
@property
|
||||
def type_name(self):
|
||||
return self.value.name
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ IMAP_SERVERS = {
|
|||
}
|
||||
|
||||
|
||||
@register_tool()
|
||||
@register_tool(tags=["email login"])
|
||||
def email_login_imap(email_address, email_password):
|
||||
"""
|
||||
Use imap_tools package to log in to your email (the email that supports IMAP protocol) to verify and return the account object.
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ As the design pays tribute to large companies, sometimes it is normal for some c
|
|||
Now, please generate the corresponding webpage code including HTML, CSS and JavaScript:"""
|
||||
|
||||
|
||||
@register_tool(include_functions=["__init__", "generate_webpages", "save_webpages"])
|
||||
@register_tool(tags=["image2webpage"], include_functions=["__init__", "generate_webpages", "save_webpages"])
|
||||
class GPTvGenerator:
|
||||
"""Class for generating webpage code from a given webpage screenshot.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue