基于文心一言的AI 职业发展教练

一、AI 职业发展教练

1.简介

  • AI职业发展教练是一款有趣的调用Ernie Bot SDK中的文心一言能力的教练,它充当职业发展教练角色,为开发人员提供快速、相关和具体的建议,以在特定的职业目标下实现职业成功。

2.思路

  • 输入你的职业情况
  • 通过文心一言给出职业建议
  • 将职业建议发送至你的邮箱

3.效果图

二、页面设计

1.AI 职业发展教练简介

来认识一下,我是您的私人人工智能职业教练。

您是一名工程师,想知道您的下一份工作吗? 告诉 HAL 您正在寻找什么,并将个性化的职业建议直接发送到您的收件箱。

HAL 对所有人免费,请通过分享 HAL 生成的回复来帮助我们并传播信息!

2.信息填写

三、后端

调用文心一言,给出建议,并发送邮件。

1.环境准备

众多sdk来说erniebot是最方便的sdk了,当然qianfan,以及aistudio等包也是不错的。

python 复制代码
%%capture
!pip install --upgrade erniebot

2 prompt生成

掏出prompt神器,生成prompt。

并以此为基础进行修改

3.prompt测试

python 复制代码
import erniebot

# List supported models
models = erniebot.Model.list()

erniebot.api_type = "aistudio"
erniebot.access_token = "xxxxxxxxxxxxxxxxxxxxxxxxxxx"

# Create a chat completion
response = erniebot.ChatCompletion.create(model="ernie-bot", messages=[{"role": "user", "content": "你是一名非常著名的职业发展教练,请根据以下信息给出职业发展建议,并使用中英文两种语言,并发送至对方邮箱:我的名字是Livingbody,我是一个AI训练师,我有8年工作经验了,我的主要技能是python、paddlepaddle、pytorch,我想找工作,我想明年成为苹果的首席技术专家,我的电子邮箱是:livingbody@qq.com"}])

print(response.result)
vbnet 复制代码
【中文版】

亲爱的Livingbody,

根据您的经验和目标,您已经展现出了非常出色的技能和能力。以下是我为您提供的职业发展建议:

1. 明确目标:您希望成为苹果的首席技术专家,这意味着您需要进一步了解苹果公司的文化和业务,明确您与这个职位的匹配度,了解该职位的具体职责和要求。

2. 增强技能:虽然您已经掌握了Python、PaddlePaddle、PyTorch等技能,但作为一个AI训练师,您还需要不断学习新技术和知识,掌握最新的AI技术和应用。同时,您还可以通过参加相关培训、读书、参加学术会议等方式来增强自己的技能。

3. 建立人际关系:在职业发展方面,人际关系非常重要。您可以加入相关的社交网络和行业组织,与业界专家和同行建立联系,了解行业动态和最新进展。

4. 展示自己的成果:如果您想成为苹果的首席技术专家,您需要展示自己的成果和能力。您可以参加相关比赛、发表学术论文、分享经验等方式来展示自己的成果,提高自己的知名度和影响力。

5. 与招聘者建立联系:您可以主动与苹果公司的招聘人员建立联系,了解招聘需求和流程,并针对性地准备自己的简历和面试。

希望以上建议能够帮助您实现自己的职业目标。祝您成功!

【英文版】

Dear Livingbody,

Based on your experience and goals, you have demonstrated excellent skills and abilities. Here are my career development suggestions for you:

1. Clear Goals: You want to become Apple's Chief Technology Expert, which means you need to further understand Apple's culture and business, clarify your match with this position, and understand the specific responsibilities and requirements of the position.

2. Enhance Skills: Although you have mastered skills such as Python, PaddlePaddle, and PyTorch, as an AI trainer, you need to constantly learn new technologies and knowledge, master the latest AI technology and applications. At the same time, you can also enhance your skills by participating in relevant training, reading books, attending conferences, etc.

3. Build Relationships: In terms of career development, interpersonal relationships are very important. You can join relevant social networks and industry organizations, establish contacts with industry experts and peers, and keep abreast of industry developments and latest progress.

4. Showcase Your Achievements: If you want to become Apple's Chief Technology Expert, you need to showcase your achievements and abilities. You can participate in relevant competitions, publish academic papers, share experiences, etc. to showcase your achievements and enhance your visibility and influence.

5. Connect with Recruiters: You can actively connect with Apple's recruiters to understand the recruitment needs and process, and prepare your resume and interview with targeted preparation.

I hope the above suggestions can help you achieve your career goals. Wishing you success!

4.功能实现

  • 功能介绍
  • 信息录入
  • 信息展示
python 复制代码
import gradio as gr
import erniebot

# 1.使用文心一言预测
def predict(name, career, career_time, skills, language, tobe, email):
    erniebot.api_type = "aistudio"
    erniebot.access_token = "xxxxxxxxxxxxxxxxxx"
    message = f"你是一名非常著名的职业发展教练,请根据以下信息给出职业发展建议,并使用中英文两种语言,并发送至对方邮箱:我的名字是 {name},我是一个 {career},我有 {career_time} 年工作经验了,我的主要技能是 {skills},英语{language}我想找工作,{tobe},我的电子邮箱是 {email}"
    response = erniebot.ChatCompletion.create(model="ernie-bot", messages=[{"role": "user",
                                                                            "content": message}])
    print(response.result)
    return response.result


# 2.example数据录入
examples = [["王小虎", "AI算法工程师","10","python,paddle,pytorch","英语特别出色","明年成为苹果的首席技术官","livingbody@qq.com"],["张三", "软件工程师","3","java,web开发","英语特别出色","明年成为移动公司技术总监","livingbody@qq.com"]]

# 3.界面创建
def create_ui_and_launch():
    with gr.Blocks(title="AI 职业发展教练", theme=gr.themes.Soft()) as block:
        with gr.Row():
            gr.HTML(
                """<center><h1 align="center">AI职业发展教练</h1></center>""")
        with gr.Row():
            gr.HTML(
                """<center><h2 align="center">AI职业发展教练是一款有趣的调用Ernie Bot SDK中的文心一言能力的教练,它充当职业发展教练角色,为开发人员提供快速、相关和具体的建议,以在特定的职业目标下实现职业成功。</h2></center>""")
        with gr.Row():
            name = gr.Textbox(label="姓名:")
            career = gr.Textbox(label="职业:")
        with gr.Row():
            career_time = gr.Textbox(label="工作年限:")
            skills = gr.Textbox(label="技能:")
        with gr.Row():
            language = gr.Textbox(label="语言:")
            tobe = gr.Textbox(label="期望:")
        with gr.Row():
            email = gr.Textbox(label="邮件地址:")
        with gr.Row():
            output_text = gr.Textbox(label="个性化建议:", lines=4)
        with gr.Row():
            planning_button = gr.Button('指导建议')
            clean_button = gr.Button('一键清除')
        planning_button.click(fn=predict, inputs=[name, career, career_time, skills, language, tobe, email],
                              outputs=output_text)
        clean_button.click(fn=lambda value: gr.update(value=""),
                           inputs=[name, career, career_time, skills, language, tobe, email],
                           outputs=output_text)
        gr_examples = gr.Examples(examples=examples, inputs=[name, career, career_time, skills, language, tobe, email],
                                  label="输入示例 (点击选择例子)",
                                  examples_per_page=20)
    block.launch()


if __name__ == '__main__':
    create_ui_and_launch()

5.邮件发送

代码如下,可以自行添加

ini 复制代码
import smtplib  # smtp服务器
from email.mime.text import MIMEText  # 邮件文本
def send_mail():
    # 邮件构建
    subject = "职业发展教练"  # 邮件标题
    sender = "xxxxxxxxx@163.com"  # 发送方
    content = "新年快乐!"
    recver = "xxxxxxxxx@qq.com"  # 接收方
    password = "xxxxxxxxxx"
    # 邮箱密码
    message = MIMEText(content, "plain", "utf-8")
    # content 发送内容     "plain"文本格式   utf-8 编码格式

    message['Subject'] = subject  # 邮件标题
    message['To'] = recver  # 收件人
    message['From'] = sender  # 发件人

    smtp = smtplib.SMTP_SSL("smtp.163.com", 994)  # 实例化smtp服务器
    smtp.login(sender, password)  # 发件人登录
    smtp.sendmail(sender, [recver], message.as_string())  # as_string 对 message 的消息进行了封装
    smtp.close()

由于163邮箱检测机制,感觉还是别用非标准客户端发信了,不然容易被封号!

python 复制代码
相关推荐
木雷坞2 小时前
让 AI 编程助手跑得起项目:Dev Container 实践记录
人工智能
腾讯云开发者3 小时前
港科大郭毅可谈Agentic AI时代的核心命题:人机共生,人不可能退场
人工智能
常丛丛3 小时前
5.6 LangGraph-Edges理解-Agent图的道路系统
人工智能
雪隐3 小时前
个人电脑玩AI-08让5060 Ti给你打工——我拿 Unlimited-OCR扫了 600 页书,然后悟了
人工智能·后端
Coffeeee3 小时前
Prompt要花心思写,与 AI 对话的七个技巧
人工智能·aigc·ai编程
蝎子莱莱爱打怪3 小时前
Claude Code 官宣新升级:子智能体默认后台跑,你边聊它边干活
人工智能
武子康4 小时前
调查研究-206 DeepSeek DSpark 深度解析:大模型推理加速,正在从“模型能力”转向“系统工程”
人工智能·agent·deepseek
甲维斯4 小时前
最佳work模型sonnet5来了,直接就能用!
人工智能
IT_陈寒4 小时前
React hooks 闭包陷阱把我的状态吃掉了,原来问题出在这里
前端·人工智能·后端