Skip to content

Commit 7810756

Browse files
authored
docs(README): Fix quick starts examples (#875)
Closes #872 <!-- ELLIPSIS_HIDDEN --> ---- > [!IMPORTANT] > Fixes and updates quick start examples in `README.md`, including search query count, API placeholders, and workflow steps. > > - **Quick Example**: > - Change number of search queries from 100 to 30. > - Update `api_key` and `url` placeholders in `tools` section. > - Modify `main` workflow steps for clarity and accuracy, including `prompt`, `evaluate`, and `tool` steps. > - **Misc**: > - Add `num_questions` to `input_schema`. > - Adjust `parallelism` from 10 to 5 in web search step. > - Limit Discord message content to 2000 characters. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup> for 7063583. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN -->
1 parent f27c4a1 commit 7810756

File tree

1 file changed

+60
-60
lines changed

1 file changed

+60
-60
lines changed

Diff for: README.md

+60-60
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,12 @@
2828
---
2929

3030
> [!NOTE]
31-
> 👨‍💻 Here for the devfest.ai event? Join our [Discord](https://discord.com/invite/JTSBGRZrzj) and check out the details below.
32-
>
3331
> Get your API key [here](https://dashboard-dev.julep.ai).
3432
3533
<details>
36-
<summary><b>🌟 Contributors and DevFest.AI Participants</b> (Click to expand)</summary>
34+
<summary><b>Contributions 🌟</b> (Click to expand)</summary>
3735

38-
## 🌟 Call for Contributors!
36+
## Call for Contributors 🌟
3937

4038
We're excited to welcome new contributors to the Julep project! We've created several "good first issues" to help you get started. Here's how you can contribute:
4139

@@ -45,41 +43,34 @@ We're excited to welcome new contributors to the Julep project! We've created se
4543

4644
Your contributions, big or small, are valuable to us. Let's build something amazing together! 🚀
4745

48-
### 🎉 DevFest.AI October 2024
49-
50-
Exciting news! We're participating in DevFest.AI throughout October 2024! 🗓️
51-
52-
- Contribute to Julep during this event and get a chance to win awesome Julep merch and swag! 🎁
53-
- Join developers from around the world in contributing to AI repositories and participating in amazing events.
54-
- A big thank you to DevFest.AI for organizing this fantastic initiative!
55-
56-
> [!TIP]
57-
> Ready to join the fun? **[Tweet that you are participating](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)** and let's get coding! 🖥️
58-
59-
![Julep DevFest.AI](https://media.giphy.com/media/YjyUeyotft6epaMHtU/giphy.gif)
60-
6146
</details>
6247

6348
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
6449
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
6550
<h3>📖 Table of Contents</h3>
6651

52+
- [Call for Contributors 🌟](#call-for-contributors-)
6753
- [Introduction](#introduction)
6854
- [Key Features](#key-features)
6955
- [Quick Example](#quick-example)
7056
- [Installation](#installation)
7157
- [Python Quick Start 🐍](#python-quick-start-)
7258
- [Node.js Quick Start 🟩](#nodejs-quick-start-)
73-
- [Step 1: Create an Agent](#step-1-create-an-agent)
7459
- [Components](#components)
7560
- [Mental Model](#mental-model)
7661
- [Concepts](#concepts)
7762
- [Understanding Tasks](#understanding-tasks)
7863
- [Lifecycle of a Task](#lifecycle-of-a-task)
7964
- [Types of Workflow Steps](#types-of-workflow-steps)
65+
- [Common Steps](#common-steps)
66+
- [Key-Value Steps](#key-value-steps)
67+
- [Iteration Steps](#iteration-steps)
68+
- [Conditional Steps](#conditional-steps)
69+
- [Other Control Flow](#other-control-flow)
8070
- [Tool Types](#tool-types)
8171
- [User-defined `functions`](#user-defined-functions)
8272
- [`system` tools](#system-tools)
73+
- [Available `system` resources and operations](#available-system-resources-and-operations)
8374
- [Built-in `integrations`](#built-in-integrations)
8475
- [Direct `api_calls`](#direct-api_calls)
8576
- [Integrations](#integrations)
@@ -135,7 +126,7 @@ While many AI applications are limited to simple, linear chains of prompts and A
135126
Imagine a Research AI agent that can do the following:
136127

137128
1. **Take a topic**,
138-
2. **Come up with 100 search queries** for that topic,
129+
2. **Come up with 30 search queries** for that topic,
139130
3. Perform those web **searches in parallel**,
140131
4. **Summarize** the results,
141132
5. Send the **summary to Discord**.
@@ -155,6 +146,9 @@ input_schema:
155146
topic:
156147
type: string
157148
description: The main topic to research
149+
num_questions:
150+
type: integer
151+
description: The number of search queries to generate
158152

159153
# Define the tools that the agent can use
160154
tools:
@@ -163,12 +157,12 @@ tools:
163157
integration:
164158
provider: brave
165159
setup:
166-
api_key: BSAqES7dj9d... # dummy key
160+
api_key: <your-brave-api-key>
167161

168162
- name: discord_webhook
169163
type: api_call
170164
api_call:
171-
url: https://eobuxj02se0n.m.pipedream.net # dummy requestbin
165+
url: https://discord.com/api/webhooks/<your-webhook-id>/<your-webhook-token>
172166
method: POST
173167
headers:
174168
Content-Type: application/json
@@ -180,52 +174,57 @@ tools:
180174

181175
# Define the main workflow
182176
main:
183-
- prompt:
184-
- role: system
185-
content: >-
186-
You are a research assistant.
187-
Generate 100 diverse search queries related to the topic:
188-
{{inputs[0].topic}}
177+
- prompt:
178+
- role: system
179+
content: >-
180+
You are a research assistant.
181+
Generate {{inputs[0].num_questions|default(30, true)}} diverse search queries related to the topic:
182+
{{inputs[0].topic}}
189183
190-
Write one query per line.
191-
unwrap: true
184+
Write one query per line.
185+
unwrap: true
192186

193-
# Evaluate the search queries using a simple python expression
194-
- evaluate:
195-
search_queries: "_.split('\n')"
187+
# Evaluate the search queries using a simple python expression
188+
- evaluate:
189+
search_queries: "_.split(NEWLINE)"
196190

197-
# Run the web search in parallel for each query
198-
- over: "_.search_queries"
199-
map:
200-
tool: web_search
201-
arguments:
202-
query: "_"
203-
parallelism: 10
191+
# Run the web search in parallel for each query
192+
- over: "_.search_queries"
193+
map:
194+
tool: web_search
195+
arguments:
196+
query: "_"
197+
parallelism: 5
204198

205-
# Collect the results from the web search
206-
- evaluate:
207-
results: "'\n'.join([item.result for item in _])"
199+
# Collect the results from the web search
200+
- evaluate:
201+
search_results: _
208202

209-
# Summarize the results
210-
- prompt:
211-
- role: system
212-
content: >
213-
You are a research summarizer. Create a comprehensive summary of the following research results on the topic {{inputs[0].topic}}.
214-
The summary should be well-structured, informative, and highlight key findings and insights:
215-
{{_.results}}
216-
unwrap: true
217-
settings:
218-
model: gpt-4o-mini
203+
# Summarize the results
204+
- prompt:
205+
- role: system
206+
content: >
207+
You are a research summarizer. Create a comprehensive summary of the following research results on the topic {{inputs[0].topic}}.
208+
The summary should be well-structured, informative, and highlight key findings and insights. Keep the summary concise and to the point.
209+
The length of the summary should be less than 150 words.
210+
Here are the search results:
211+
{{_.search_results}}
212+
unwrap: true
213+
settings:
214+
model: gpt-4o-mini
219215

220-
# Send the summary to Discord
221-
- tool: discord_webhook
222-
arguments:
223-
content: |-
224-
f'''
225-
**Research Summary for {inputs[0].topic}**
216+
- evaluate:
217+
discord_message: |-
218+
f'''
219+
**Research Summary for {inputs[0].topic}**
220+
{_}
221+
'''
226222
227-
{_}
228-
'''
223+
# Send the summary to Discord
224+
- tool: discord_webhook
225+
arguments:
226+
json_:
227+
content: _.discord_message[:2000] # Discord has a 2000 character limit
229228
```
230229
231230
In this example, Julep will automatically manage parallel executions, retry failed steps, resend API requests, and keep the tasks running reliably until completion.
@@ -331,6 +330,7 @@ description: Create a story based on an idea.
331330
332331
tools:
333332
- name: research_wikipedia
333+
type: integration
334334
integration:
335335
provider: wikipedia
336336
method: search

0 commit comments

Comments
 (0)