Skip to content

Commit

Permalink
fix notebook one
Browse files Browse the repository at this point in the history
  • Loading branch information
antonkulaga committed Nov 27, 2024
1 parent f533a10 commit 8fb3503
Show file tree
Hide file tree
Showing 14 changed files with 99 additions and 51 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/run_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,15 @@ jobs:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
GROQ_API_KEY: ${{ secrets.GROQ_API_KEY }}
run: |
# Install root project dependencies which will include subprojects
poetry install --with dev
# Explicitly install base dependencies
poetry add pytest python-dotenv --group dev
# Run tests
# Install dependencies for each subpackage
cd core && poetry install --with dev && cd ..
cd coding && poetry install --with dev && cd ..
cd router && poetry install --with dev && cd ..
cd tools && poetry install --with dev && cd ..
cd web && poetry install --with dev && cd ..
# Run tests from project root
poetry run pytest
4 changes: 2 additions & 2 deletions coding/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "just-agents-coding"
version = "0.4.1"
version = "0.4.2"
description = "Just Agents - Coding Components"
authors = [
"Alex Karmazin <karmazinalex@gmail.com>",
Expand All @@ -19,7 +19,7 @@ license = "MIT"

[tool.poetry.dependencies]
python = ">=3.10,<4.0"
just-agents-core = ">=0.4.1"
just-agents-core = ">=0.4.2"
llm-sandbox = ">=0.1.4"

[build-system]
Expand Down
30 changes: 30 additions & 0 deletions config/agent_profiles.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
agent_profiles:
SecretaryAgent:
autoload_from_yaml: false
backstory: Developed to assist in the understanding and documentation of AI agents.
class_qualname: just_agents.router.secretary_agent.SecretaryAgent
description: Generates concise and detail-rich profiles for AI agents.
expertise_domain: AI agent analysis and profiling
extra_dict:
personality_traits: Agent's personality traits go here
goal: To provide accurate and informative profiles based on available attributes.
knowledge_sources: []
limitations: Limited to the information available up to October 2023; cannot access
external databases or APIs.
llm_options:
model: gpt-4o-mini
temperature: 0.0
model_name: gpt-4o-mini
personality_traits: Skilled, detail-oriented, concise, informative
role: AI assistant specializing in analysis and description of AI agents
system_prompt: "\n You are a skilled AI assistant specializing in analysis\
\ and description of AI agents. \n You are tasked with generation of a minimalistic\
\ and concise yet detail-rich profile for an AI agent, based on the AVAILABLE_ATTRIBUTES,\
\ \n including 'system_prompt', 'llm_options' and any other. Your task is\
\ to fill in values of a JSON-formatted profile \n that matches the PROFILE_UPDATE_TEMPLATE\
\ provided below. Values of the template describe what output is expected for\
\ each field. \n Only populate fields based on the well-established information,\
\ don't make up anything. \n Double-check that the output contains only a\
\ valid JSON with all the fields specified in PROFILE_UPDATE_TEMPLATE. \n \
\ Never include any additional text or explanations in your reply.\n "
task: Profile generation for AI agents based on specified attributes.
2 changes: 1 addition & 1 deletion core/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "just-agents-core"
version = "0.4.1"
version = "0.4.2"
description = "Just Agents - Base Package"
authors = [
"Alex Karmazin <karmazinalex@gmail.com>",
Expand Down
Empty file.
15 changes: 7 additions & 8 deletions examples/notebooks/01_just_agents_colab.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
"Requirement already satisfied: anyio<5,>=3.5.0 in /usr/local/lib/python3.10/dist-packages (from openai>=1.54.0->litellm>=1.51.0->just-agents) (3.7.1)\n",
"Requirement already satisfied: distro<2,>=1.7.0 in /usr/local/lib/python3.10/dist-packages (from openai>=1.54.0->litellm>=1.51.0->just-agents) (1.9.0)\n",
"Requirement already satisfied: httpx<1,>=0.23.0 in /usr/local/lib/python3.10/dist-packages (from openai>=1.54.0->litellm>=1.51.0->just-agents) (0.27.2)\n",
"Requirement already satisfied: jiter<1,>=0.4.1 in /usr/local/lib/python3.10/dist-packages (from openai>=1.54.0->litellm>=1.51.0->just-agents) (0.7.0)\n",
"Requirement already satisfied: jiter<1,>=0.4.2 in /usr/local/lib/python3.10/dist-packages (from openai>=1.54.0->litellm>=1.51.0->just-agents) (0.7.0)\n",
"Requirement already satisfied: sniffio in /usr/local/lib/python3.10/dist-packages (from openai>=1.54.0->litellm>=1.51.0->just-agents) (1.3.1)\n",
"Requirement already satisfied: tqdm>4 in /usr/local/lib/python3.10/dist-packages (from openai>=1.54.0->litellm>=1.51.0->just-agents) (4.66.6)\n",
"Requirement already satisfied: annotated-types>=0.6.0 in /usr/local/lib/python3.10/dist-packages (from pydantic<3.0.0,>=2.0.0->litellm>=1.51.0->just-agents) (0.7.0)\n",
Expand Down Expand Up @@ -154,8 +154,7 @@
}
],
"source": [
"!pip install just-agents-core==0.4.1\n",
"!pip install just-agents-examples==0.4.1"
"!pip install just-agents-core==0.4.2"
]
},
{
Expand Down Expand Up @@ -733,7 +732,7 @@
"from just_agents import llm_options\n",
"\n",
"session: BaseAgent = BaseAgent(\n",
" llm_options=llm_options.LLAMA3_2,\n",
" llm_options=llm_options.LLAMA3_2_VISION,\n",
" tools=[get_weather_by_city]\n",
" #if you rename the function, then do not forget to change here\n",
")\n",
Expand Down Expand Up @@ -800,7 +799,7 @@
}
],
"source": [
"!wget https://raw.githubusercontent.com/longevity-genie/just-agents/refs/heads/main/just_agents_examples/basic/agents_profiles.yaml -O agent_profiles.yaml"
"!wget https://raw.githubusercontent.com/longevity-genie/just-agents/refs/heads/main/examples/just_agents/examples/basic/agent_profiles.yaml -O agent_profiles.yaml\n"
]
},
{
Expand Down Expand Up @@ -876,7 +875,7 @@
"source": [
"\n",
"from just_agents.patterns.chain_of_throught import ChainOfThoughtAgent\n",
"agent = ChainOfThoughtAgent.from_yaml(\"ChainOfThoughtAgent\")\n",
"agent = ChainOfThoughtAgent.from_yaml(\"ChainOfThoughtAgent\", file_path=\"agent_profiles.yaml\")\n",
"# Add a callback to print all messages that the agent processes\n",
"agent.memory.add_on_message(lambda message: print(message))\n",
"\n",
Expand Down Expand Up @@ -1013,7 +1012,7 @@
" task=\"Make America great again! Use Trump style of communication\")\n",
"\n",
"\n",
"exchanges = 3\n",
"exchanges = 2\n",
"\n",
"\n",
"Harris_reply = \"Hi.\"\n",
Expand Down Expand Up @@ -1055,7 +1054,7 @@
" task=\"Make America great again! Use Trump style of communication\")\n",
"Moderator: ChatAgent = #YOUR CODE HERE\n",
"\n",
"exchanges = 3\n",
"exchanges = 2\n",
"\n",
"Moderator.memory.add_on_message(\n",
" lambda m: display(Markdown(f\"**Trump:** {m['content']}\")) if m[\"role\"] == \"user\" else display(Markdown(f\"**Harris:** {m['content']}\"))\n",
Expand Down
6 changes: 3 additions & 3 deletions examples/notebooks/02_sqlite_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@
"Requirement already satisfied: anyio<5,>=3.5.0 in /usr/local/lib/python3.10/dist-packages (from openai>=1.54.0->litellm>=1.51.0->just-agents) (3.7.1)\n",
"Requirement already satisfied: distro<2,>=1.7.0 in /usr/local/lib/python3.10/dist-packages (from openai>=1.54.0->litellm>=1.51.0->just-agents) (1.9.0)\n",
"Requirement already satisfied: httpx<1,>=0.23.0 in /usr/local/lib/python3.10/dist-packages (from openai>=1.54.0->litellm>=1.51.0->just-agents) (0.27.2)\n",
"Requirement already satisfied: jiter<1,>=0.4.1 in /usr/local/lib/python3.10/dist-packages (from openai>=1.54.0->litellm>=1.51.0->just-agents) (0.7.0)\n",
"Requirement already satisfied: jiter<1,>=0.4.2 in /usr/local/lib/python3.10/dist-packages (from openai>=1.54.0->litellm>=1.51.0->just-agents) (0.7.0)\n",
"Requirement already satisfied: sniffio in /usr/local/lib/python3.10/dist-packages (from openai>=1.54.0->litellm>=1.51.0->just-agents) (1.3.1)\n",
"Requirement already satisfied: tqdm>4 in /usr/local/lib/python3.10/dist-packages (from openai>=1.54.0->litellm>=1.51.0->just-agents) (4.66.6)\n",
"Requirement already satisfied: annotated-types>=0.6.0 in /usr/local/lib/python3.10/dist-packages (from pydantic<3.0.0,>=2.0.0->litellm>=1.51.0->just-agents) (0.7.0)\n",
Expand Down Expand Up @@ -312,8 +312,8 @@
}
],
"source": [
"!pip install just-agents-core==0.4.1\n",
"!pip install just-agents-examples==0.4.1"
"!pip install just-agents-core==0.4.2\n",
"!pip install just-agents-examples==0.4.2"
]
},
{
Expand Down
6 changes: 3 additions & 3 deletions examples/notebooks/03_coding_agent.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
"Requirement already satisfied: anyio<5,>=3.5.0 in /usr/local/lib/python3.10/dist-packages (from openai>=1.54.0->litellm>=1.51.0->just-agents) (3.7.1)\n",
"Requirement already satisfied: distro<2,>=1.7.0 in /usr/local/lib/python3.10/dist-packages (from openai>=1.54.0->litellm>=1.51.0->just-agents) (1.9.0)\n",
"Requirement already satisfied: httpx<1,>=0.23.0 in /usr/local/lib/python3.10/dist-packages (from openai>=1.54.0->litellm>=1.51.0->just-agents) (0.27.2)\n",
"Requirement already satisfied: jiter<1,>=0.4.1 in /usr/local/lib/python3.10/dist-packages (from openai>=1.54.0->litellm>=1.51.0->just-agents) (0.7.1)\n",
"Requirement already satisfied: jiter<1,>=0.4.2 in /usr/local/lib/python3.10/dist-packages (from openai>=1.54.0->litellm>=1.51.0->just-agents) (0.7.1)\n",
"Requirement already satisfied: sniffio in /usr/local/lib/python3.10/dist-packages (from openai>=1.54.0->litellm>=1.51.0->just-agents) (1.3.1)\n",
"Requirement already satisfied: tqdm>4 in /usr/local/lib/python3.10/dist-packages (from openai>=1.54.0->litellm>=1.51.0->just-agents) (4.66.6)\n",
"Requirement already satisfied: annotated-types>=0.6.0 in /usr/local/lib/python3.10/dist-packages (from pydantic<3.0.0,>=2.0.0->litellm>=1.51.0->just-agents) (0.7.0)\n",
Expand Down Expand Up @@ -156,8 +156,8 @@
}
],
"source": [
"!pip install just-agents-core==0.4.1\n",
"!pip install just-agents-examples==0.4.1"
"!pip install just-agents-core==0.4.2\n",
"!pip install just-agents-examples==0.4.2"
]
},
{
Expand Down
16 changes: 10 additions & 6 deletions examples/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "just-agents-examples"
version = "0.4.1"
version = "0.4.2"
description = "Just Agents - Examples code"
authors = ["Alex Karmazin <karmazinalex@gmail.com>"]
maintainers = ["Anton Kulaga <antonkulaga@gmail.com>"]
Expand All @@ -12,11 +12,15 @@ license = "MIT"

[tool.poetry.dependencies]
python = ">=3.10,<4.0"
just-agents-core = ">=0.4.1"
just-agents-tools = ">=0.4.1"
just-agents-coding = ">=0.4.1"
just-agents-web = ">=0.4.1"
just-agents-router = ">=0.4.1"
just-agents-core = ">=0.4.2"
just-agents-tools = ">=0.4.2"
just-agents-coding = ">=0.4.2"
just-agents-web = ">=0.4.2"
just-agents-router = ">=0.4.2"

[tool.poetry.group.dev.dependencies]
pytest = "^7.4.4"
python-dotenv = "*"

[build-system]
requires = ["poetry-core"]
Expand Down
26 changes: 13 additions & 13 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "just-agents"
version = "0.4.1"
version = "0.4.2"
description = "Just Agents - A lightweight, straightforward library for LLM agents that focuses on simplicity over unnecessary abstractions."
authors = [
"Alex Karmazin <karmazinalex@gmail.com>",
Expand All @@ -26,11 +26,11 @@ just-agents-web = { path = "web", develop = true }
just-agents-router = { path = "router", develop = true }

[tool.poetry.group.publish.dependencies]
just-agents-core = "0.4.1"
just-agents-tools = "0.4.1"
just-agents-coding = "0.4.1"
just-agents-web = "0.4.1"
just-agents-router = "0.4.1"
just-agents-core = "0.4.2"
just-agents-tools = "0.4.2"
just-agents-coding = "0.4.2"
just-agents-web = "0.4.2"
just-agents-router = "0.4.2"

[tool.poetry.group.dev.dependencies]
pytest = "^7.4.4"
Expand Down
8 changes: 6 additions & 2 deletions router/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "just-agents-router"
version = "0.4.1"
version = "0.4.2"
description = "Just Agents - Router Components"
authors = [
"Newton Winter <isoutthere@gmail.com>",
Expand All @@ -18,7 +18,11 @@ license = "MIT"

[tool.poetry.dependencies]
python = ">=3.10,<4.0"
just-agents-core = ">=0.4.1"
just-agents-core = ">=0.4.2"

[tool.poetry.group.dev.dependencies]
pytest = "^7.4.4"
python-dotenv = "*"

[build-system]
requires = ["poetry-core"]
Expand Down
8 changes: 6 additions & 2 deletions tools/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "just-agents-tools"
version = "0.4.1"
version = "0.4.2"
description = "Just Agents - Tools Components"
authors = ["Alex Karmazin <karmazinalex@gmail.com>"]
maintainers = ["Anton Kulaga <antonkulaga@gmail.com>"]
Expand All @@ -12,10 +12,14 @@ license = "MIT"

[tool.poetry.dependencies]
python = ">=3.10,<4.0"
just-agents-core = ">=0.4.1"
just-agents-core = ">=0.4.2"
semanticscholar = ">=0.8.4"
typer = ">=0.13.0"

[tool.poetry.group.dev.dependencies]
pytest = "^7.4.4"
python-dotenv = "*"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
Loading

0 comments on commit 8fb3503

Please sign in to comment.