From c371adb8847b67da08e46ac7ac229377ac3f82e8 Mon Sep 17 00:00:00 2001 From: HamadaSalhab Date: Sat, 23 Nov 2024 14:09:55 +0300 Subject: [PATCH 1/4] Fix Quick Example Task --- README.md | 101 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 58 insertions(+), 43 deletions(-) diff --git a/README.md b/README.md index 8e0401ad7..5c1b2e359 100644 --- a/README.md +++ b/README.md @@ -64,22 +64,29 @@ Exciting news! We're participating in DevFest.AI throughout October 2024! 🗓

📖 Table of Contents

+- [🌟 Call for Contributors!](#-call-for-contributors) + - [🎉 DevFest.AI October 2024](#-devfestai-october-2024) - [Introduction](#introduction) - [Key Features](#key-features) - [Quick Example](#quick-example) - [Installation](#installation) - [Python Quick Start 🐍](#python-quick-start-) - [Node.js Quick Start 🟩](#nodejs-quick-start-) - - [Step 1: Create an Agent](#step-1-create-an-agent) - [Components](#components) - [Mental Model](#mental-model) - [Concepts](#concepts) - [Understanding Tasks](#understanding-tasks) - [Lifecycle of a Task](#lifecycle-of-a-task) - [Types of Workflow Steps](#types-of-workflow-steps) + - [Common Steps](#common-steps) + - [Key-Value Steps](#key-value-steps) + - [Iteration Steps](#iteration-steps) + - [Conditional Steps](#conditional-steps) + - [Other Control Flow](#other-control-flow) - [Tool Types](#tool-types) - [User-defined `functions`](#user-defined-functions) - [`system` tools](#system-tools) + - [Available `system` resources and operations](#available-system-resources-and-operations) - [Built-in `integrations`](#built-in-integrations) - [Direct `api_calls`](#direct-api_calls) - [Integrations](#integrations) @@ -135,7 +142,7 @@ While many AI applications are limited to simple, linear chains of prompts and A Imagine a Research AI agent that can do the following: 1. **Take a topic**, -2. **Come up with 100 search queries** for that topic, +2. **Come up with 30 search queries** for that topic, 3. Perform those web **searches in parallel**, 4. **Summarize** the results, 5. Send the **summary to Discord**. @@ -155,6 +162,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: @@ -163,12 +173,12 @@ tools: integration: provider: brave setup: - api_key: BSAqES7dj9d... # dummy key + api_key: - name: discord_webhook type: api_call api_call: - url: https://eobuxj02se0n.m.pipedream.net # dummy requestbin + url: https://discord.com/api/webhooks// method: POST headers: Content-Type: application/json @@ -180,52 +190,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}} +- 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 + Write one query per line. + unwrap: true - # Evaluate the search queries using a simple python expression - - evaluate: - search_queries: "_.split('\n')" +# 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: - query: "_" - parallelism: 10 +# Run the web search in parallel for each query +- over: "_.search_queries" + map: + tool: web_search + arguments: + query: "_" + parallelism: 5 - # Collect the results from the web search - - evaluate: - results: "'\n'.join([item.result for item in _])" +# 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: - {{_.results}} - unwrap: true - settings: - model: gpt-4o-mini +# 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 - # Send the summary to Discord - - tool: discord_webhook - arguments: - content: |- - f''' - **Research Summary for {inputs[0].topic}** +- 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 ``` In this example, Julep will automatically manage parallel executions, retry failed steps, resend API requests, and keep the tasks running reliably until completion. From 57bc6c7011a4be22c7ee2dddfa22c38fcf8bed90 Mon Sep 17 00:00:00 2001 From: HamadaSalhab Date: Sat, 23 Nov 2024 14:16:35 +0300 Subject: [PATCH 2/4] Fix python quickstart example --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 5c1b2e359..06724773b 100644 --- a/README.md +++ b/README.md @@ -346,6 +346,7 @@ description: Create a story based on an idea. tools: - name: research_wikipedia + type: integration integration: provider: wikipedia method: search From 7130f52e1831f02ac80d255bd8b7c73a28148cf7 Mon Sep 17 00:00:00 2001 From: HamadaSalhab Date: Sat, 23 Nov 2024 14:29:40 +0300 Subject: [PATCH 3/4] Remove old events & announcements --- README.md | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 06724773b..31a039c80 100644 --- a/README.md +++ b/README.md @@ -28,14 +28,12 @@ --- > [!NOTE] -> 👨‍💻 Here for the devfest.ai event? Join our [Discord](https://discord.com/invite/JTSBGRZrzj) and check out the details below. -> > Get your API key [here](https://dashboard-dev.julep.ai).
🌟 Contributors and DevFest.AI Participants (Click to expand) -## 🌟 Call for Contributors! +## Call for Contributors 🌟 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: @@ -45,19 +43,6 @@ We're excited to welcome new contributors to the Julep project! We've created se Your contributions, big or small, are valuable to us. Let's build something amazing together! 🚀 -### 🎉 DevFest.AI October 2024 - -Exciting news! We're participating in DevFest.AI throughout October 2024! 🗓️ - -- Contribute to Julep during this event and get a chance to win awesome Julep merch and swag! 🎁 -- Join developers from around the world in contributing to AI repositories and participating in amazing events. -- A big thank you to DevFest.AI for organizing this fantastic initiative! - -> [!TIP] -> 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! 🖥️ - -![Julep DevFest.AI](https://media.giphy.com/media/YjyUeyotft6epaMHtU/giphy.gif) -
@@ -72,21 +57,16 @@ Exciting news! We're participating in DevFest.AI throughout October 2024! 🗓 - [Installation](#installation) - [Python Quick Start 🐍](#python-quick-start-) - [Node.js Quick Start 🟩](#nodejs-quick-start-) + - [Step 1: Create an Agent](#step-1-create-an-agent) - [Components](#components) - [Mental Model](#mental-model) - [Concepts](#concepts) - [Understanding Tasks](#understanding-tasks) - [Lifecycle of a Task](#lifecycle-of-a-task) - [Types of Workflow Steps](#types-of-workflow-steps) - - [Common Steps](#common-steps) - - [Key-Value Steps](#key-value-steps) - - [Iteration Steps](#iteration-steps) - - [Conditional Steps](#conditional-steps) - - [Other Control Flow](#other-control-flow) - [Tool Types](#tool-types) - [User-defined `functions`](#user-defined-functions) - [`system` tools](#system-tools) - - [Available `system` resources and operations](#available-system-resources-and-operations) - [Built-in `integrations`](#built-in-integrations) - [Direct `api_calls`](#direct-api_calls) - [Integrations](#integrations) From 70635834759db8ba1b83386602b2ca701630fad8 Mon Sep 17 00:00:00 2001 From: HamadaSalhab Date: Sat, 23 Nov 2024 14:32:57 +0300 Subject: [PATCH 4/4] Styling changes --- README.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 31a039c80..fc49e78a0 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ > Get your API key [here](https://dashboard-dev.julep.ai).
-🌟 Contributors and DevFest.AI Participants (Click to expand) +Contributions 🌟 (Click to expand) ## Call for Contributors 🌟 @@ -49,24 +49,28 @@ Your contributions, big or small, are valuable to us. Let's build something amaz

📖 Table of Contents

-- [🌟 Call for Contributors!](#-call-for-contributors) - - [🎉 DevFest.AI October 2024](#-devfestai-october-2024) +- [Call for Contributors 🌟](#call-for-contributors-) - [Introduction](#introduction) - [Key Features](#key-features) - [Quick Example](#quick-example) - [Installation](#installation) - [Python Quick Start 🐍](#python-quick-start-) - [Node.js Quick Start 🟩](#nodejs-quick-start-) - - [Step 1: Create an Agent](#step-1-create-an-agent) - [Components](#components) - [Mental Model](#mental-model) - [Concepts](#concepts) - [Understanding Tasks](#understanding-tasks) - [Lifecycle of a Task](#lifecycle-of-a-task) - [Types of Workflow Steps](#types-of-workflow-steps) + - [Common Steps](#common-steps) + - [Key-Value Steps](#key-value-steps) + - [Iteration Steps](#iteration-steps) + - [Conditional Steps](#conditional-steps) + - [Other Control Flow](#other-control-flow) - [Tool Types](#tool-types) - [User-defined `functions`](#user-defined-functions) - [`system` tools](#system-tools) + - [Available `system` resources and operations](#available-system-resources-and-operations) - [Built-in `integrations`](#built-in-integrations) - [Direct `api_calls`](#direct-api_calls) - [Integrations](#integrations)