mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-14 15:25:17 +02:00
mv examples
This commit is contained in:
parent
42f3aaf18b
commit
eb1e1b9ef2
4 changed files with 3 additions and 3 deletions
27
examples/ci/email_summary.py
Normal file
27
examples/ci/email_summary.py
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
# -*- encoding: utf-8 -*-
|
||||
"""
|
||||
@Date : 2024/02/07
|
||||
@Author : Tuo Zhou
|
||||
@File : email_summary.py
|
||||
"""
|
||||
|
||||
from metagpt.roles.ci.code_interpreter import CodeInterpreter
|
||||
|
||||
|
||||
async def main():
|
||||
# For email response prompt
|
||||
email_account = "your_email_account"
|
||||
# prompt = f"""I will give you your Outlook email account({email_account}) and password(email_password item in the environment variable). You need to find the latest email in my inbox with the sender's suffix @qq.com and reply to him "Thank you! I have received your email~"""""
|
||||
prompt = f"""I will give you your Outlook email account({email_account}) and password(email_password item in the environment variable).
|
||||
Firstly, Please help me fetch the latest 5 senders and full letter contents.
|
||||
Then, summarize each of the 5 emails into one sentence(you can do this by yourself, no need import other models to do this) and output them in a markdown format."""
|
||||
|
||||
ci = CodeInterpreter(use_tools=True)
|
||||
|
||||
await ci.run(prompt)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import asyncio
|
||||
|
||||
asyncio.run(main())
|
||||
0
examples/ci/machine_learning.py
Normal file
0
examples/ci/machine_learning.py
Normal file
16
examples/ci/ml_engineer_with_tools.py
Normal file
16
examples/ci/ml_engineer_with_tools.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import asyncio
|
||||
|
||||
from metagpt.roles.ci.ml_engineer import MLEngineer
|
||||
|
||||
|
||||
async def main(requirement: str, auto_run: bool = True, use_tools: bool = True):
|
||||
role = MLEngineer(goal=requirement, auto_run=auto_run, use_tools=use_tools)
|
||||
await role.run(requirement)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
data_path = "your_path_to_icr/icr-identify-age-related-conditions"
|
||||
train_path = f"{data_path}/your_train_data.csv"
|
||||
eval_path = f"{data_path}/your_eval_data.csv"
|
||||
requirement = f"This is a medical dataset with over fifty anonymized health characteristics linked to three age-related conditions. Your goal is to predict whether a subject has or has not been diagnosed with one of these conditions.The target column is Class. Perform data analysis, data preprocessing, feature engineering, and modeling to predict the target. Report f1 score on the eval data. Train data path: {train_path}, eval data path:{eval_path}."
|
||||
asyncio.run(main(requirement))
|
||||
Loading…
Add table
Add a link
Reference in a new issue