Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions NEW_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ template_str = "你扮演{role}, 请回答我的问题。\n\n问题:{question}
# 定义输入,调用playground组件
input = appbuilder.Message({"role": "java工程师", "question": "请简要回答java语言的内存回收机制是什么,要求100字以内"})

playground = appbuilder.Playground(prompt_template=template_str, model="Qianfan-Agent-Speed-8K")
playground = appbuilder.Playground(prompt_template=template_str, model="DeepSeek-V3.1")

# 以打字机的方式,流式展示大模型回答内容
output = playground(input, stream=True, temperature=1e-10)
Expand All @@ -118,7 +118,7 @@ import os
os.environ["APPBUILDER_TOKEN"] = "your-token-here"

# 创建组件实例
rag_with_baidu_search_pro = appbuilder.RagWithBaiduSearchPro(model="ERNIE-3.5-8K")
rag_with_baidu_search_pro = appbuilder.RagWithBaiduSearchPro(model="DeepSeek-V3.1")

# 执行组件
input = appbuilder.Message("9.11和9.8哪个大")
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ template_str = "你扮演{role}, 请回答我的问题。\n\n问题:{question}
# 定义输入,调用playground组件
input = appbuilder.Message({"role": "java工程师", "question": "请简要回答java语言的内存回收机制是什么,要求100字以内"})

playground = appbuilder.Playground(prompt_template=template_str, model="Qianfan-Agent-Speed-8K")
playground = appbuilder.Playground(prompt_template=template_str, model="DeepSeek-V3.1")

# 以打字机的方式,流式展示大模型回答内容
output = playground(input, stream=True, temperature=1e-10)
Expand Down Expand Up @@ -156,7 +156,7 @@ import os
# 设置环境中的TOKEN,使用请替换为您的个人TOKEN
os.environ["APPBUILDER_TOKEN"] = "your api key"

rag_with_baidu_search_pro = appbuilder.RagWithBaiduSearchPro(model="ERNIE-3.5-8K")
rag_with_baidu_search_pro = appbuilder.RagWithBaiduSearchPro(model="DeepSeek-V3.1")

input = appbuilder.Message("9.11和9.8哪个大")
result = rag_with_baidu_search_pro.run(
Expand Down
2 changes: 1 addition & 1 deletion cookbooks/components/agent_runtime.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@
"class PlaygroundWithHistory(Component):\n",
" def __init__(self):\n",
" super().__init__()\n",
" self.query_rewrite = QueryRewrite(model=\"Qianfan-Agent-Speed-8K\")\n",
" self.query_rewrite = QueryRewrite(model=\"DeepSeek-V3.1\")\n",
" self.playground = Playground(\n",
" prompt_template=\"{query}\",\n",
" model=\"ERNIE-Bot\"\n",
Expand Down
4 changes: 2 additions & 2 deletions cookbooks/components/rag_with_baidusearch.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@
"friendly = False # 友好度提升\n",
"cite = True # 溯源\n",
"\n",
"# 使用 Qianfan-Agent-Speed-8K 模型\n",
"component = appbuilder.RAGWithBaiduSearch(model=\"Qianfan-Agent-Speed-8K\")\n",
"# 使用 DeepSeek-V3.1 模型\n",
"component = appbuilder.RAGWithBaiduSearch(model=\"DeepSeek-V3.1\")\n",
"query = appbuilder.Message(\"海淀区的面积是多少\")\n",
"\n",
"answer = component.run(\n",
Expand Down
8 changes: 4 additions & 4 deletions cookbooks/components/text_generation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
"商品信息:\n",
"'''\n",
"# 创建商品信息生成组件\n",
"product_information_generation = Playground(prompt_template=prompt_template, model='Qianfan-Agent-Speed-8K')\n",
"product_information_generation = Playground(prompt_template=prompt_template, model='DeepSeek-V3.1')\n",
"\n",
"# 获取商品信息\n",
"# 填充prompt_template参数的参数映射表,需要与prompt_template对应\n",
Expand Down Expand Up @@ -152,7 +152,7 @@
"from appbuilder import QAPairMining\n",
"\n",
"# 初始化问答对生成组件\n",
"qa_pair_mining = QAPairMining(model='Qianfan-Agent-Speed-8K')\n",
"qa_pair_mining = QAPairMining(model='DeepSeek-V3.1')\n",
"\n",
"# 获取问答对\n",
"response = qa_pair_mining(Message(product_information), stream=False, temperature=1e-10)\n",
Expand Down Expand Up @@ -210,7 +210,7 @@
"'''\n",
"\n",
"# 初始化风格写作组件\n",
"style_writing = StyleWriting(model='Qianfan-Agent-Speed-8K')\n",
"style_writing = StyleWriting(model='DeepSeek-V3.1')\n",
"\n",
"# 获取小红书文案\n",
"response = style_writing(Message(query), style_query='小红书', length=300)\n",
Expand Down Expand Up @@ -260,7 +260,7 @@
"from appbuilder import TagExtraction\n",
"\n",
"# 初始化标签抽取组件\n",
"tag_extraction = TagExtraction(model='Qianfan-Agent-Speed-8K')\n",
"tag_extraction = TagExtraction(model='DeepSeek-V3.1')\n",
"\n",
"# 获取标签\n",
"response = tag_extraction(Message(copywriting), stream=False, temperature=1e-10)\n",
Expand Down
4 changes: 2 additions & 2 deletions cookbooks/end2end_application/rag/rag.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@
"具备团队协作精神,能够与团队成员有效沟通,共同推进项目进展。'''\n",
"\n",
"# 标签抽取的组件\n",
"tagger = appbuilder.TagExtraction(model=\"Qianfan-Agent-Speed-8K\")\n",
"tagger = appbuilder.TagExtraction(model=\"DeepSeek-V3.1\")\n",
"\n",
"# 从JD抽取标签并打印\n",
"tags = tagger(appbuilder.Message(job_desc))\n",
Expand Down Expand Up @@ -234,7 +234,7 @@
"\n",
"play = appbuilder.Playground(\n",
" prompt_template=\"基于候选人姓名、职责描述和简历内容,概括一下{name}的推荐理由。\\n候选人姓名: {name}\\n职责描述: {JD}\\n简历内容: {resume}\\n推荐理由: \",\n",
" model=\"Qianfan-Agent-Speed-8K\"\n",
" model=\"DeepSeek-V3.1\"\n",
")\n",
"\n",
"resume_summary = play(appbuilder.Message({\"JD\": job_desc, \"name\": sorted_resumes[0][0], \"resume\": \"\\n\".join(list(resume_content[sorted_resumes[0][0]]))}))\n",
Expand Down
Loading
Loading