Skip to content
Open
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
2 changes: 1 addition & 1 deletion cookbook/pocketflow-a2a/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# For PocketFlow Agent Logic
pocketflow>=0.0.1
openai>=1.0.0
duckduckgo-search>=7.5.2
ddgs>=9.10.0
pyyaml>=5.1

# For A2A Server Infrastructure (from common)
Expand Down
2 changes: 1 addition & 1 deletion cookbook/pocketflow-a2a/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from openai import OpenAI
import os
from duckduckgo_search import DDGS
from ddgs import DDGS

def call_llm(prompt):
client = OpenAI(api_key=os.environ.get("OPENAI_API_KEY", "your-api-key"))
Expand Down
46 changes: 23 additions & 23 deletions cookbook/pocketflow-agent/demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,36 @@
"cell_type": "code",
"execution_count": 1,
"metadata": {
"id": "8MeqVASIxKBH",
"vscode": {
"languageId": "plaintext"
},
"id": "8MeqVASIxKBH"
}
},
"outputs": [],
"source": [
"! pip install pocketflow>=0.0.1\n",
"! pip install aiohttp>=3.8.0\n",
"! pip install openai>=1.0.0\n",
"! pip install duckduckgo-search>=7.5.2"
"! pip install ddgs>=9.10.0"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"vscode": {
"languageId": "plaintext"
},
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "wUp_sNU1xKBI",
"outputId": "a647f919-b253-48c8-c132-5eef582e29c7"
"outputId": "a647f919-b253-48c8-c132-5eef582e29c7",
"vscode": {
"languageId": "plaintext"
}
},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"output_type": "stream",
"text": [
"## Testing call_llm\n",
"## Prompt: In a few words, what is the meaning of life?\n",
Expand Down Expand Up @@ -66,7 +66,7 @@
"# utils.py\n",
"from openai import OpenAI\n",
"import os\n",
"from duckduckgo_search import DDGS\n",
"from ddgs import DDGS\n",
"\n",
"def call_llm(prompt):\n",
" client = OpenAI(api_key=\"your-api-key\")\n",
Expand Down Expand Up @@ -99,10 +99,10 @@
"cell_type": "code",
"execution_count": 3,
"metadata": {
"id": "T0ETd4C2xKBI",
"vscode": {
"languageId": "plaintext"
},
"id": "T0ETd4C2xKBI"
}
},
"outputs": [],
"source": [
Expand Down Expand Up @@ -247,10 +247,10 @@
"cell_type": "code",
"execution_count": 4,
"metadata": {
"id": "0B4jCAmXxKBI",
"vscode": {
"languageId": "plaintext"
},
"id": "0B4jCAmXxKBI"
}
},
"outputs": [],
"source": [
Expand Down Expand Up @@ -293,19 +293,19 @@
"cell_type": "code",
"execution_count": 5,
"metadata": {
"vscode": {
"languageId": "plaintext"
},
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "bIwsNEDCxKBI",
"outputId": "e6c02020-6fae-4377-8f0a-01d2580dd659"
"outputId": "e6c02020-6fae-4377-8f0a-01d2580dd659",
"vscode": {
"languageId": "plaintext"
}
},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"output_type": "stream",
"text": [
"🤔 Processing question: Who won the Nobel Prize in Physics 2024?\n",
"🤔 Agent deciding what to do next...\n",
Expand Down Expand Up @@ -353,15 +353,15 @@
}
],
"metadata": {
"language_info": {
"name": "python"
},
"colab": {
"provenance": []
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
"display_name": "Python 3",
"name": "python3"
},
"language_info": {
"name": "python"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion cookbook/pocketflow-agent/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pocketflow>=0.0.1
duckduckgo-search>=7.5.2 # For web search
ddgs>=9.10.0 # For web search
aiohttp>=3.8.0 # For HTTP requests
openai>=1.0.0 # For LLM calls
requests>=2.25.1 # For HTTP requests
Expand Down
2 changes: 1 addition & 1 deletion cookbook/pocketflow-agent/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from openai import OpenAI
import os
from duckduckgo_search import DDGS
from ddgs import DDGS
import requests

def call_llm(prompt):
Expand Down
6 changes: 3 additions & 3 deletions cookbook/pocketflow-supervisor/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pocketflow>=0.0.1
aiohttp>=3.8.0 # For async HTTP requests
openai>=1.0.0 # For async LLM calls
duckduckgo-search>=7.5.2 # For web search
aiohttp>=3.8.0 # For async HTTP requests
openai>=1.0.0 # For async LLM calls
ddgs>=9.10.0 # For web search
2 changes: 1 addition & 1 deletion cookbook/pocketflow-supervisor/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from openai import OpenAI
import os
from duckduckgo_search import DDGS
from ddgs import DDGS

def call_llm(prompt):
client = OpenAI(api_key=os.environ.get("OPENAI_API_KEY", "your-api-key"))
Expand Down