Skip to content

Commit

Permalink
Translate README.md (#895)
Browse files Browse the repository at this point in the history
This PR updates the translated versions of README.md

Co-authored-by: whiterabbit1983 <[email protected]>
  • Loading branch information
github-actions[bot] and whiterabbit1983 authored Nov 27, 2024
1 parent 4c4b5d9 commit 6583fc0
Show file tree
Hide file tree
Showing 3 changed files with 203 additions and 203 deletions.
136 changes: 68 additions & 68 deletions README-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,12 @@
---

> [!注意]
> 👨‍💻 来参加 devfest.ai 活动了吗?加入我们的 [Discord](https://discord.com/invite/JTSBGRZrzj) 并查看以下详细信息。
>
> [此处](https://dashboard-dev.julep.ai)获取您的 API 密钥。
<details>
<summary><b>🌟 贡献者和 DevFest.AI 参与者</b>(点击展开)</summary>
<summary><b>贡献🌟</b>(点击展开)</summary>

## 🌟 招募贡献者!
## 征集贡献者🌟

我们很高兴欢迎新贡献者加入 Julep 项目!我们创建了几个“好的第一个问题”来帮助您入门。以下是您可以做出贡献的方式:

Expand All @@ -45,41 +43,34 @@

您的贡献,无论大小,对我们来说都是宝贵的。让我们一起创造一些了不起的东西!🚀

### 🎉 DevFest.AI 2024 年 10 月

令人兴奋的消息!我们将参加 2024 年 10 月的 DevFest.AI!🗓️

- 在本次活动期间为 Julep 做出贡献,就有机会赢得超棒的 Julep 商品和赃物!🎁
- 与来自世界各地的开发人员一起为 AI 资源库做出贡献并参与精彩的活动。
- 非常感谢 DevFest.AI 组织这次精彩的活动!

> [!提示]
> 准备好加入这场有趣的活动了吗?**[发推文表示你正在参与](https://twitter.com/intent/tweet?text=Pumped%20to%20be%20participating%20in%20%40devfestai%20with%20%40julep_ai%20building%20%23ai%20%23agents%20%23workflows%20Let's%20gooo!%20https%3A%2F%2Fgit.new%2Fjulep)** 让我们开始编码吧!🖥️
![Julep DevFest.AI](https://media.giphy.com/media/YjyUeyotft6epaMHtU/giphy.gif)

</details>

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
<h3>📖 目录</h3>

- [呼吁贡献者🌟](#call-for-contributors-)
- [简介](#introduction)
- [主要特点](#key-features)
- [快速示例](#quick-example)
- [安装](#安装)
- [Python 快速入门 🐍](#python-quick-start-)
- [Node.js 快速入门🟩](#nodejs-quick-start-)
- [步骤 1:创建代理](#step-1-create-an-agent)
- [组件](#components)
- [心智模型](#mental-model)
- [概念](#concepts)
- [理解任务](#understanding-tasks)
- [任务的生命周期](#lifecycle-of-a-task)
- [工作流步骤的类型](#types-of-workflow-steps)
- [常见步骤](#common-steps)
- [键值步骤](#key-value-steps)
- [迭代步骤](#iteration-steps)
- [条件步骤](#conditional-steps)
- [其他控制流](#other-control-flow)
- [工具类型](#tool-types)
- [用户定义的`函数`](#user-defined-functions)
- [`系统` 工具](#system-tools)
- [可用的系统资源和操作](#available-system-resources-and-operations)
- [内置 `integrations`](#built-in-integrations)
-[直接`api_calls`](#direct-api_calls)
- [集成](#integrations)
Expand Down Expand Up @@ -119,7 +110,7 @@ Julep 支持创建多步骤任务,包括决策、循环、并行处理以及

1. 🧠 **持久 AI 代理**:在长期交互​​中记住上下文和信息。
2. 💾 **状态会话**:跟踪过去的互动以获得个性化回应。
3. 🔄 **多步骤任务**使用循环和决策构建复杂的多步骤流程
3. 🔄 **多步骤任务**通过循环和决策构建复杂的多步骤流程
4.**任务管理**:处理可以无限期运行的长时间运行的任务。
5.🛠️**内置工具**:在您的任务中使用内置工具和外部 API。
6. 🔧 **自我修复**:Julep 将自动重试失败的步骤、重新发送消息,并确保您的任务顺利运行。
Expand All @@ -135,7 +126,7 @@ Julep 支持创建多步骤任务,包括决策、循环、并行处理以及
想象一下一个可以执行以下操作的研究 AI 代理:

1. **选择一个主题**
2. 针对该主题提出 100 个搜索查询,
2. 针对该主题提出 30 个搜索查询,
3. 同时进行网页搜索,
4. **总结**结果,
5.**摘要发送至 Discord**
Expand All @@ -155,6 +146,9 @@ input_schema:
topic:
type: string
description: The main topic to research
num_questions:
type: integer
description: The number of search queries to generate

# Define the tools that the agent can use
tools:
Expand All @@ -163,12 +157,12 @@ tools:
integration:
provider: brave
setup:
api_key: BSAqES7dj9d... # dummy key
api_key: <your-brave-api-key>

- name: discord_webhook
type: api_call
api_call:
url: https://eobuxj02se0n.m.pipedream.net # dummy requestbin
url: https://discord.com/api/webhooks/<your-webhook-id>/<your-webhook-token>
method: POST
headers:
Content-Type: application/json
Expand All @@ -180,52 +174,57 @@ tools:

# Define the main workflow
main:
- prompt:
- role: system
content: >-
You are a research assistant.
Generate 100 diverse search queries related to the topic:
{{inputs[0].topic}}
Write one query per line.
unwrap: true

# Evaluate the search queries using a simple python expression
- evaluate:
search_queries: "_.split('\n')"

# Run the web search in parallel for each query
- over: "_.search_queries"
map:
tool: web_search
arguments:
query: "_"
parallelism: 10

# Collect the results from the web search
- evaluate:
results: "'\n'.join([item.result for item in _])"

# Summarize the results
- prompt:
- role: system
content: >
You are a research summarizer. Create a comprehensive summary of the following research results on the topic {{inputs[0].topic}}.
The summary should be well-structured, informative, and highlight key findings and insights:
{{_.results}}
unwrap: true
settings:
model: gpt-4o-mini

# Send the summary to Discord
- tool: discord_webhook
- prompt:
- role: system
content: >-
You are a research assistant.
Generate {{inputs[0].num_questions|default(30, true)}} diverse search queries related to the topic:
{{inputs[0].topic}}
Write one query per line.
unwrap: true

# Evaluate the search queries using a simple python expression
- evaluate:
search_queries: "_.split(NEWLINE)"

# Run the web search in parallel for each query
- over: "_.search_queries"
map:
tool: web_search
arguments:
content: |-
f'''
**Research Summary for {inputs[0].topic}**
query: "_"
parallelism: 5

# Collect the results from the web search
- evaluate:
search_results: _

# Summarize the results
- prompt:
- role: system
content: >
You are a research summarizer. Create a comprehensive summary of the following research results on the topic {{inputs[0].topic}}.
The summary should be well-structured, informative, and highlight key findings and insights. Keep the summary concise and to the point.
The length of the summary should be less than 150 words.
Here are the search results:
{{_.search_results}}
unwrap: true
settings:
model: gpt-4o-mini

- evaluate:
discord_message: |-
f'''
**Research Summary for {inputs[0].topic}**
{_}
'''
{_}
'''
# Send the summary to Discord
- tool: discord_webhook
arguments:
json_:
content: _.discord_message[:2000] # Discord has a 2000 character limit
```
在这个例子中,Julep 将自动管理并行执行,重试失败的步骤,重新发送 API 请求,并保持任务可靠运行直到完成。
Expand Down Expand Up @@ -331,6 +330,7 @@ description: Create a story based on an idea.
tools:
- name: research_wikipedia
type: integration
integration:
provider: wikipedia
method: search
Expand Down Expand Up @@ -434,7 +434,7 @@ agent_id=代理.id,
)

# 🎉 观看故事和漫画面板的生成
while (result := client.executions.get(execution.id)).status 不在 ['成功', '失败'] 中
当(result= client.executions.getexecution.id)).status 不在['succeeded''failed']中时
打印(结果.状态,结果.输出)
时间.睡眠(1)

Expand Down Expand Up @@ -1302,7 +1302,7 @@ result: string # Brave Search 的结果
设置:
api_key: string # BrowserBase 的 API 密钥
project_id: string # BrowserBase 的项目 ID
session_id: string #(可选)BrowserBase 的会话 ID
session_id: string # (可选)BrowserBase 的会话 ID
参数:
urls: list[string] # 使用 BrowserBase 加载的 URL
Expand Down
Loading

0 comments on commit 6583fc0

Please sign in to comment.