From f1e6a764d30f1fe98f3f79e0d6a5f6a044aeb2b1 Mon Sep 17 00:00:00 2001 From: antonkulaga Date: Fri, 17 Jan 2025 23:41:39 +0200 Subject: [PATCH] fixed lock, extended restapi, updated litellm --- coding/pyproject.toml | 4 +- config/agent_profiles.yaml | 30 +++ core/pyproject.toml | 6 +- .../examples/multiagent/drug_example.py | 127 ++++++++++ examples/just_agents/examples/web/nice_web.py | 4 +- examples/notebooks/01_just_agents_colab.ipynb | 2 +- examples/notebooks/02_sqlite_example.ipynb | 6 +- examples/notebooks/03_coding_agent.ipynb | 6 +- examples/pyproject.toml | 12 +- poetry.lock | 218 ++++++++++-------- pyproject.toml | 16 +- router/pyproject.toml | 4 +- tools/just_agents/tools/db.py | 3 +- tools/just_agents/tools/search.py | 5 +- tools/pyproject.toml | 4 +- web/README.md | 15 +- web/just_agents/web/rest_api.py | 41 +++- web/just_agents/web/{run.py => run_agent.py} | 21 +- web/just_agents/web/streaming.py | 7 +- web/pyproject.toml | 6 +- 20 files changed, 378 insertions(+), 159 deletions(-) create mode 100644 config/agent_profiles.yaml create mode 100644 examples/just_agents/examples/multiagent/drug_example.py rename web/just_agents/web/{run.py => run_agent.py} (77%) diff --git a/coding/pyproject.toml b/coding/pyproject.toml index 01f38d4..93d33ef 100644 --- a/coding/pyproject.toml +++ b/coding/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "just-agents-coding" -version = "0.4.8" +version = "0.4.9" description = "Just Agents - Coding Components" authors = [ "Alex Karmazin ", @@ -19,7 +19,7 @@ license = "MIT" [tool.poetry.dependencies] python = ">=3.10,<4.0" -just-agents-core = ">=0.4.8" +just-agents-core = ">=0.4.9" llm-sandbox = ">=0.1.8" [build-system] diff --git a/config/agent_profiles.yaml b/config/agent_profiles.yaml new file mode 100644 index 0000000..f4f7c23 --- /dev/null +++ b/config/agent_profiles.yaml @@ -0,0 +1,30 @@ +SecretaryAgent: + autoload_from_yaml: false + backstory: Developed to assist in understanding and documenting AI agents' capabilities + and characteristics. + class_qualname: just_agents.router.secretary_agent.SecretaryAgent + description: A skilled AI assistant focused on generating detailed profiles for + AI agents. + expertise_domain: AI agent analysis and description + extra_dict: + personality_traits: Agent's personality traits go here + goal: To provide accurate and informative profiles for various AI agents. + knowledge_sources: [] + limitations: Limited to analysis and description tasks; may not perform actions + outside of its defined scope. + llm_options: + model: gpt-4o-mini + temperature: 0.0 + model_name: gpt-4o-mini + personality_traits: Detail-oriented, analytical, concise, informative + role: AI assistant specializing in agent profiling. + system_prompt: |2- + + You are a skilled AI assistant specializing in analysis and description of AI agents. + You are tasked with generation of a minimalistic and concise yet detail-rich profile for an AI agent, based on the AVAILABLE_ATTRIBUTES, + including 'system_prompt', 'llm_options' and any other. Your task is to fill in values of a JSON-formatted profile + that matches the PROFILE_UPDATE_TEMPLATE provided below. Values of the template describe what output is expected for each field. + Only populate fields based on the well-established information, don't make up anything. + Double-check that the output contains only a valid JSON with all the fields specified in PROFILE_UPDATE_TEMPLATE. + Never include any additional text or explanations in your reply. + task: Generate concise and detail-rich profiles for AI agents. diff --git a/core/pyproject.toml b/core/pyproject.toml index d80e33f..8cc90a1 100644 --- a/core/pyproject.toml +++ b/core/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "just-agents-core" -version = "0.4.8" +version = "0.4.9" description = "Just Agents - Base Package" authors = [ "Alex Karmazin ", @@ -16,7 +16,7 @@ packages = [ { include = "just_agents" } ] license = "MIT" -keywords = ["python", "llm", "science", "review", "agents", "AI"] +keywords = ["python", "llm", "science", "review", "agents", "AI", "longevity", "biology", "coding", "web", "tools", "router"] classifiers = [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", @@ -30,7 +30,7 @@ classifiers = [ [tool.poetry.dependencies] python = ">=3.10,<4.0" -litellm = ">=1.57.2" +litellm = ">=1.58.4" pydantic = ">=2.0.0,<3.0.0" Deprecated = ">=1.2.15" requests = "*" diff --git a/examples/just_agents/examples/multiagent/drug_example.py b/examples/just_agents/examples/multiagent/drug_example.py new file mode 100644 index 0000000..219ef3b --- /dev/null +++ b/examples/just_agents/examples/multiagent/drug_example.py @@ -0,0 +1,127 @@ +from dotenv import load_dotenv +from just_agents.base_agent import BaseAgent +from just_agents import llm_options +from pathlib import Path +import json + +# Load environment variables (for API keys) +load_dotenv(override=True) + +def format_responses_markdown(topic: str, model_responses: dict, include_individual_responses: bool = True) -> str: + """ + Format multiple model responses into a markdown document with a consensus summary. + + Args: + topic: The main topic or question being discussed + model_responses: Dictionary of model names and their responses + include_individual_responses: Whether to include individual model responses in output + """ + markdown = f"# {topic}\n\n" + + if include_individual_responses: + for model, response in model_responses.items(): + markdown += f"## Analysis from {model}\n\n" + markdown += f"{response}\n\n" + + markdown += "## Consensus Summary\n\n" + + # Create consensus summary using Claude + summary_agent = BaseAgent( + llm_options=llm_options.ANTHROPIC_CLAUDE_3_5_SONNET, + system_prompt="""You are an expert summarizer. Your task is to: + 1. Analyze multiple model outputs on the same topic + 2. Identify key points of agreement and disagreement + 3. Synthesize a clear, comprehensive consensus summary + 4. Format the output in clear markdown with appropriate headers and bullet points + 5. Highlight any important caveats or limitations + Please be thorough but concise in your summary.""" + ) + + summary_prompt = f"Please provide a consensus summary of these model outputs about '{topic}':\n\n" + for model, response in model_responses.items(): + summary_prompt += f"{model}:\n{response}\n\n" + + consensus_summary = summary_agent.query(summary_prompt) + markdown += consensus_summary + + return markdown + +def save_markdown_summary(output_dir: Path, filename: str, markdown_content: str): + """Save markdown content to a file""" + output_dir.mkdir(exist_ok=True) + output_file = output_dir / f"{filename}.md" + output_file.write_text(markdown_content) + return output_file + +def ensure_drugs_directory() -> Path: + """Create and return the drugs directory path""" + drugs_dir = Path("drugs") + drugs_dir.mkdir(exist_ok=True) + return drugs_dir + +def query_drug_info(): + # List of drugs to query + drugs = ["rapamycin", "quercetin", "metformin", "curcumin"] + + # Initialize agents with different models + agents = { + "GPT-4": BaseAgent( + llm_options=llm_options.OPENAI_GPT4o, + system_prompt="""You are a knowledgeable pharmaceutical expert. + When asked about a drug, provide information about: + 1. Its mechanism of action + 2. Common uses + 3. Potential longevity/anti-aging effects + 4. Known side effects + Please be concise but thorough in your responses.""" + ), + "Claude-3": BaseAgent( + llm_options=llm_options.ANTHROPIC_CLAUDE_3_5_SONNET, + system_prompt="""You are a knowledgeable pharmaceutical expert. + When asked about a drug, provide information about: + 1. Its mechanism of action + 2. Common uses + 3. Potential longevity/anti-aging effects + 4. Known side effects + Please be concise but thorough in your responses.""" + ), + "LLAMA-3": BaseAgent( + llm_options=llm_options.LLAMA3_3, # You'll need to ensure this constant exists in llm_options + system_prompt="""You are a knowledgeable pharmaceutical expert. + When asked about a drug, provide information about: + 1. Its mechanism of action + 2. Common uses + 3. Potential longevity/anti-aging effects + 4. Known side effects + Please be concise but thorough in your responses.""" + ) + } + + # Create drugs directory + drugs_dir = ensure_drugs_directory() + + # Query information for each drug + for drug in drugs: + print(f"\nQuerying information about {drug}...") + model_responses = {} + + for model_name, agent in agents.items(): + prompt = f"What do you know about {drug} and its effects on longevity and health?" + response = agent.query(prompt) + model_responses[model_name] = response + + # Format and save markdown file + markdown_content = format_responses_markdown(drug, model_responses) + output_file = drugs_dir / f"{drug}.md" + output_file.write_text(markdown_content) + + print(f"Saved information about {drug} to {output_file}") + print(f"\n{'='*50}\n") + + return drugs_dir + +if __name__ == "__main__": + output_dir = query_drug_info() + # this code was generated by cursor withing 5 mins by adding just-agents to the context + print(f"\nAll drug information has been saved to {output_dir}") + diff --git a/examples/just_agents/examples/web/nice_web.py b/examples/just_agents/examples/web/nice_web.py index 038bccd..90d9119 100644 --- a/examples/just_agents/examples/web/nice_web.py +++ b/examples/just_agents/examples/web/nice_web.py @@ -3,7 +3,7 @@ from just_agents.interfaces.agent import IAgent from just_agents.simple.utils import build_agent from just_agents.web.rest_api import * -from just_agents.web.run import * +from just_agents.web.run_agent import * from pycomfort.logging import to_nice_stdout @@ -19,4 +19,4 @@ if __name__ == "__main__": to_nice_stdout() cofig_path = web_examples_dir / "agent.yaml" - run_server(config=cofig_path) + run_agent_server(config=cofig_path) diff --git a/examples/notebooks/01_just_agents_colab.ipynb b/examples/notebooks/01_just_agents_colab.ipynb index 5ab809c..e49e671 100644 --- a/examples/notebooks/01_just_agents_colab.ipynb +++ b/examples/notebooks/01_just_agents_colab.ipynb @@ -73,7 +73,7 @@ } ], "source": [ - "!pip install just-agents-core==0.4.8" + "!pip install just-agents-core==0.4.9" ] }, { diff --git a/examples/notebooks/02_sqlite_example.ipynb b/examples/notebooks/02_sqlite_example.ipynb index 1755122..4c330e1 100644 --- a/examples/notebooks/02_sqlite_example.ipynb +++ b/examples/notebooks/02_sqlite_example.ipynb @@ -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.8 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.9 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", @@ -312,8 +312,8 @@ } ], "source": [ - "!pip install just-agents-core==0.4.8\n", - "!pip install just-agents-examples==0.4.8" + "!pip install just-agents-core==0.4.9\n", + "!pip install just-agents-examples==0.4.9" ] }, { diff --git a/examples/notebooks/03_coding_agent.ipynb b/examples/notebooks/03_coding_agent.ipynb index 80e991b..6c5505e 100644 --- a/examples/notebooks/03_coding_agent.ipynb +++ b/examples/notebooks/03_coding_agent.ipynb @@ -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.8 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.9 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", @@ -156,8 +156,8 @@ } ], "source": [ - "!pip install just-agents-core==0.4.8\n", - "!pip install just-agents-examples==0.4.8" + "!pip install just-agents-core==0.4.9\n", + "!pip install just-agents-examples==0.4.9" ] }, { diff --git a/examples/pyproject.toml b/examples/pyproject.toml index c8ad4bc..2b00a62 100644 --- a/examples/pyproject.toml +++ b/examples/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "just-agents-examples" -version = "0.4.8" +version = "0.4.9" description = "Just Agents - Examples code" authors = ["Alex Karmazin "] maintainers = ["Anton Kulaga "] @@ -12,11 +12,11 @@ license = "MIT" [tool.poetry.dependencies] python = ">=3.10,<4.0" -just-agents-core = ">=0.4.8" -just-agents-tools = ">=0.4.8" -just-agents-coding = ">=0.4.8" -just-agents-web = ">=0.4.8" -just-agents-router = ">=0.4.8" +just-agents-core = ">=0.4.9" +just-agents-tools = ">=0.4.9" +just-agents-coding = ">=0.4.9" +just-agents-web = ">=0.4.9" +just-agents-router = ">=0.4.9" docker = ">=7.1.0" [tool.poetry.group.dev.dependencies] diff --git a/poetry.lock b/poetry.lock index f54cbc6..44f2bda 100644 --- a/poetry.lock +++ b/poetry.lock @@ -992,7 +992,7 @@ referencing = ">=0.31.0" [[package]] name = "just-agents-coding" -version = "0.4.8" +version = "0.4.9" description = "Just Agents - Coding Components" optional = false python-versions = ">=3.10,<4.0" @@ -1000,7 +1000,7 @@ files = [] develop = true [package.dependencies] -just-agents-core = ">=0.4.8" +just-agents-core = ">=0.4.9" llm-sandbox = ">=0.1.8" [package.source] @@ -1009,7 +1009,7 @@ url = "coding" [[package]] name = "just-agents-core" -version = "0.4.8" +version = "0.4.9" description = "Just Agents - Base Package" optional = false python-versions = ">=3.10,<4.0" @@ -1018,11 +1018,12 @@ develop = true [package.dependencies] Deprecated = ">=1.2.15" -litellm = ">=1.57.2" +litellm = ">=1.58.4" numpydoc = "*" pydantic = ">=2.0.0,<3.0.0" python-dotenv = ">=1.0.1" requests = "*" +rich = ">=13.9.4" [package.source] type = "directory" @@ -1030,7 +1031,7 @@ url = "core" [[package]] name = "just-agents-examples" -version = "0.4.8" +version = "0.4.9" description = "Just Agents - Examples code" optional = false python-versions = ">=3.10,<4.0" @@ -1039,11 +1040,11 @@ develop = true [package.dependencies] docker = ">=7.1.0" -just-agents-coding = ">=0.4.8" -just-agents-core = ">=0.4.8" -just-agents-router = ">=0.4.8" -just-agents-tools = ">=0.4.8" -just-agents-web = ">=0.4.8" +just-agents-coding = ">=0.4.9" +just-agents-core = ">=0.4.9" +just-agents-router = ">=0.4.9" +just-agents-tools = ">=0.4.9" +just-agents-web = ">=0.4.9" [package.source] type = "directory" @@ -1051,7 +1052,7 @@ url = "examples" [[package]] name = "just-agents-router" -version = "0.4.8" +version = "0.4.9" description = "Just Agents - Router Components" optional = false python-versions = ">=3.10,<4.0" @@ -1059,7 +1060,7 @@ files = [] develop = true [package.dependencies] -just-agents-core = ">=0.4.8" +just-agents-core = ">=0.4.9" [package.source] type = "directory" @@ -1067,7 +1068,7 @@ url = "router" [[package]] name = "just-agents-tools" -version = "0.4.8" +version = "0.4.9" description = "Just Agents - Tools Components" optional = false python-versions = ">=3.10,<4.0" @@ -1075,7 +1076,7 @@ files = [] develop = true [package.dependencies] -just-agents-core = ">=0.4.8" +just-agents-core = ">=0.4.9" semanticscholar = ">=0.8.4" typer = ">=0.13.0" @@ -1085,7 +1086,7 @@ url = "tools" [[package]] name = "just-agents-web" -version = "0.4.8" +version = "0.4.9" description = "Just Agents - Web. It allows runing openai API for the agent in the browser." optional = false python-versions = ">=3.10,<4.0" @@ -1094,7 +1095,7 @@ develop = true [package.dependencies] fastapi = ">=0.115.6" -just-agents-core = ">=0.4.8" +just-agents-core = ">=0.4.9" pycomfort = ">=0.0.17" uvicorn = ">=0.34.0" @@ -1104,13 +1105,13 @@ url = "web" [[package]] name = "litellm" -version = "1.57.4" +version = "1.58.4" description = "Library to easily interface with LLM API providers" optional = false python-versions = "!=2.7.*,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,!=3.7.*,>=3.8" files = [ - {file = "litellm-1.57.4-py3-none-any.whl", hash = "sha256:afe48924d8a36db801018970a101622fce33d117fe9c54441c0095c491511abb"}, - {file = "litellm-1.57.4.tar.gz", hash = "sha256:747a870ddee9c71f9560fc68ad02485bc1008fcad7d7a43e87867a59b8ed0669"}, + {file = "litellm-1.58.4-py3-none-any.whl", hash = "sha256:72e06adae450cd96eccf0810c314016c13ea63efffcbfa975719ab08445a292e"}, + {file = "litellm-1.58.4.tar.gz", hash = "sha256:40136e177f05aa77ed071adbe7a213385cd3efb8e9a2b21015298e7964e6b73d"}, ] [package.dependencies] @@ -1128,7 +1129,7 @@ tokenizers = "*" [package.extras] extra-proxy = ["azure-identity (>=1.15.0,<2.0.0)", "azure-keyvault-secrets (>=4.8.0,<5.0.0)", "google-cloud-kms (>=2.21.3,<3.0.0)", "prisma (==0.11.0)", "resend (>=0.8.0,<0.9.0)"] -proxy = ["PyJWT (>=2.8.0,<3.0.0)", "apscheduler (>=3.10.4,<4.0.0)", "backoff", "cryptography (>=43.0.1,<44.0.0)", "fastapi (>=0.115.5,<0.116.0)", "fastapi-sso (>=0.16.0,<0.17.0)", "gunicorn (>=22.0.0,<23.0.0)", "orjson (>=3.9.7,<4.0.0)", "pynacl (>=1.5.0,<2.0.0)", "python-multipart (>=0.0.18,<0.0.19)", "pyyaml (>=6.0.1,<7.0.0)", "rq", "uvicorn (>=0.22.0,<0.23.0)"] +proxy = ["PyJWT (>=2.8.0,<3.0.0)", "apscheduler (>=3.10.4,<4.0.0)", "backoff", "cryptography (>=43.0.1,<44.0.0)", "fastapi (>=0.115.5,<0.116.0)", "fastapi-sso (>=0.16.0,<0.17.0)", "gunicorn (>=22.0.0,<23.0.0)", "orjson (>=3.9.7,<4.0.0)", "pynacl (>=1.5.0,<2.0.0)", "python-multipart (>=0.0.18,<0.0.19)", "pyyaml (>=6.0.1,<7.0.0)", "rq", "uvicorn (>=0.29.0,<0.30.0)", "uvloop (>=0.21.0,<0.22.0)"] [[package]] name = "llm-sandbox" @@ -1253,13 +1254,13 @@ files = [ [[package]] name = "more-itertools" -version = "10.5.0" +version = "10.6.0" description = "More routines for operating on iterables, beyond itertools" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "more-itertools-10.5.0.tar.gz", hash = "sha256:5482bfef7849c25dc3c6dd53a6173ae4795da2a41a80faea6700d9f5846c5da6"}, - {file = "more_itertools-10.5.0-py3-none-any.whl", hash = "sha256:037b0d3203ce90cca8ab1defbbdac29d5f993fc20131f3664dc8d6acfa872aef"}, + {file = "more-itertools-10.6.0.tar.gz", hash = "sha256:2cd7fad1009c31cc9fb6a035108509e6547547a7a738374f10bd49a09eb3ee3b"}, + {file = "more_itertools-10.6.0-py3-none-any.whl", hash = "sha256:6eb054cb4b6db1473f6e15fcc676a08e4732548acd47c708f0e179c2c7c01e89"}, ] [[package]] @@ -1400,13 +1401,13 @@ test = ["matplotlib", "pytest", "pytest-cov"] [[package]] name = "openai" -version = "1.59.5" +version = "1.59.8" description = "The official Python library for the openai API" optional = false python-versions = ">=3.8" files = [ - {file = "openai-1.59.5-py3-none-any.whl", hash = "sha256:e646b44856b0dda9345d3c43639e056334d792d1690e99690313c0ef7ca4d8cc"}, - {file = "openai-1.59.5.tar.gz", hash = "sha256:9886e77c02dad9dc6a7b67a11ab372a56842a9b5d376aa476672175ab10e83a0"}, + {file = "openai-1.59.8-py3-none-any.whl", hash = "sha256:a8b8ee35c4083b88e6da45406d883cf6bd91a98ab7dd79178b8bc24c8bfb09d9"}, + {file = "openai-1.59.8.tar.gz", hash = "sha256:ac4bda5fa9819fdc6127e8ea8a63501f425c587244bc653c7c11a8ad84f953e1"}, ] [package.dependencies] @@ -1646,13 +1647,13 @@ typer = ">=0.15.1" [[package]] name = "pydantic" -version = "2.10.4" +version = "2.10.5" description = "Data validation using Python type hints" optional = false python-versions = ">=3.8" files = [ - {file = "pydantic-2.10.4-py3-none-any.whl", hash = "sha256:597e135ea68be3a37552fb524bc7d0d66dcf93d395acd93a00682f1efcb8ee3d"}, - {file = "pydantic-2.10.4.tar.gz", hash = "sha256:82f12e9723da6de4fe2ba888b5971157b3be7ad914267dea8f05f82b28254f06"}, + {file = "pydantic-2.10.5-py3-none-any.whl", hash = "sha256:4dd4e322dbe55472cb7ca7e73f4b63574eecccf2835ffa2af9021ce113c83c53"}, + {file = "pydantic-2.10.5.tar.gz", hash = "sha256:278b38dbbaec562011d659ee05f63346951b3a248a6f3642e1bc68894ea2b4ff"}, ] [package.dependencies] @@ -1976,18 +1977,19 @@ files = [ [[package]] name = "referencing" -version = "0.35.1" +version = "0.36.1" description = "JSON Referencing + Python" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "referencing-0.35.1-py3-none-any.whl", hash = "sha256:eda6d3234d62814d1c64e305c1331c9a3a6132da475ab6382eaa997b21ee75de"}, - {file = "referencing-0.35.1.tar.gz", hash = "sha256:25b42124a6c8b632a425174f24087783efb348a6f1e0008e63cd4466fedf703c"}, + {file = "referencing-0.36.1-py3-none-any.whl", hash = "sha256:363d9c65f080d0d70bc41c721dce3c7f3e77fc09f269cd5c8813da18069a6794"}, + {file = "referencing-0.36.1.tar.gz", hash = "sha256:ca2e6492769e3602957e9b831b94211599d2aade9477f5d44110d2530cf9aade"}, ] [package.dependencies] attrs = ">=22.2.0" rpds-py = ">=0.7.0" +typing-extensions = {version = ">=4.4.0", markers = "python_version < \"3.13\""} [[package]] name = "regex" @@ -2727,76 +2729,90 @@ files = [ [[package]] name = "wrapt" -version = "1.17.0" +version = "1.17.2" description = "Module for decorators, wrappers and monkey patching." optional = false python-versions = ">=3.8" files = [ - {file = "wrapt-1.17.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2a0c23b8319848426f305f9cb0c98a6e32ee68a36264f45948ccf8e7d2b941f8"}, - {file = "wrapt-1.17.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b1ca5f060e205f72bec57faae5bd817a1560fcfc4af03f414b08fa29106b7e2d"}, - {file = "wrapt-1.17.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e185ec6060e301a7e5f8461c86fb3640a7beb1a0f0208ffde7a65ec4074931df"}, - {file = "wrapt-1.17.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bb90765dd91aed05b53cd7a87bd7f5c188fcd95960914bae0d32c5e7f899719d"}, - {file = "wrapt-1.17.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:879591c2b5ab0a7184258274c42a126b74a2c3d5a329df16d69f9cee07bba6ea"}, - {file = "wrapt-1.17.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:fce6fee67c318fdfb7f285c29a82d84782ae2579c0e1b385b7f36c6e8074fffb"}, - {file = "wrapt-1.17.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:0698d3a86f68abc894d537887b9bbf84d29bcfbc759e23f4644be27acf6da301"}, - {file = "wrapt-1.17.0-cp310-cp310-win32.whl", hash = "sha256:69d093792dc34a9c4c8a70e4973a3361c7a7578e9cd86961b2bbf38ca71e4e22"}, - {file = "wrapt-1.17.0-cp310-cp310-win_amd64.whl", hash = "sha256:f28b29dc158ca5d6ac396c8e0a2ef45c4e97bb7e65522bfc04c989e6fe814575"}, - {file = "wrapt-1.17.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:74bf625b1b4caaa7bad51d9003f8b07a468a704e0644a700e936c357c17dd45a"}, - {file = "wrapt-1.17.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0f2a28eb35cf99d5f5bd12f5dd44a0f41d206db226535b37b0c60e9da162c3ed"}, - {file = "wrapt-1.17.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:81b1289e99cf4bad07c23393ab447e5e96db0ab50974a280f7954b071d41b489"}, - {file = "wrapt-1.17.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9f2939cd4a2a52ca32bc0b359015718472d7f6de870760342e7ba295be9ebaf9"}, - {file = "wrapt-1.17.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:6a9653131bda68a1f029c52157fd81e11f07d485df55410401f745007bd6d339"}, - {file = "wrapt-1.17.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:4e4b4385363de9052dac1a67bfb535c376f3d19c238b5f36bddc95efae15e12d"}, - {file = "wrapt-1.17.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:bdf62d25234290db1837875d4dceb2151e4ea7f9fff2ed41c0fde23ed542eb5b"}, - {file = "wrapt-1.17.0-cp311-cp311-win32.whl", hash = "sha256:5d8fd17635b262448ab8f99230fe4dac991af1dabdbb92f7a70a6afac8a7e346"}, - {file = "wrapt-1.17.0-cp311-cp311-win_amd64.whl", hash = "sha256:92a3d214d5e53cb1db8b015f30d544bc9d3f7179a05feb8f16df713cecc2620a"}, - {file = "wrapt-1.17.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:89fc28495896097622c3fc238915c79365dd0ede02f9a82ce436b13bd0ab7569"}, - {file = "wrapt-1.17.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:875d240fdbdbe9e11f9831901fb8719da0bd4e6131f83aa9f69b96d18fae7504"}, - {file = "wrapt-1.17.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e5ed16d95fd142e9c72b6c10b06514ad30e846a0d0917ab406186541fe68b451"}, - {file = "wrapt-1.17.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:18b956061b8db634120b58f668592a772e87e2e78bc1f6a906cfcaa0cc7991c1"}, - {file = "wrapt-1.17.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:daba396199399ccabafbfc509037ac635a6bc18510ad1add8fd16d4739cdd106"}, - {file = "wrapt-1.17.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:4d63f4d446e10ad19ed01188d6c1e1bb134cde8c18b0aa2acfd973d41fcc5ada"}, - {file = "wrapt-1.17.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:8a5e7cc39a45fc430af1aefc4d77ee6bad72c5bcdb1322cfde852c15192b8bd4"}, - {file = "wrapt-1.17.0-cp312-cp312-win32.whl", hash = "sha256:0a0a1a1ec28b641f2a3a2c35cbe86c00051c04fffcfcc577ffcdd707df3f8635"}, - {file = "wrapt-1.17.0-cp312-cp312-win_amd64.whl", hash = "sha256:3c34f6896a01b84bab196f7119770fd8466c8ae3dfa73c59c0bb281e7b588ce7"}, - {file = "wrapt-1.17.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:714c12485aa52efbc0fc0ade1e9ab3a70343db82627f90f2ecbc898fdf0bb181"}, - {file = "wrapt-1.17.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:da427d311782324a376cacb47c1a4adc43f99fd9d996ffc1b3e8529c4074d393"}, - {file = "wrapt-1.17.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ba1739fb38441a27a676f4de4123d3e858e494fac05868b7a281c0a383c098f4"}, - {file = "wrapt-1.17.0-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e711fc1acc7468463bc084d1b68561e40d1eaa135d8c509a65dd534403d83d7b"}, - {file = "wrapt-1.17.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:140ea00c87fafc42739bd74a94a5a9003f8e72c27c47cd4f61d8e05e6dec8721"}, - {file = "wrapt-1.17.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:73a96fd11d2b2e77d623a7f26e004cc31f131a365add1ce1ce9a19e55a1eef90"}, - {file = "wrapt-1.17.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:0b48554952f0f387984da81ccfa73b62e52817a4386d070c75e4db7d43a28c4a"}, - {file = "wrapt-1.17.0-cp313-cp313-win32.whl", hash = "sha256:498fec8da10e3e62edd1e7368f4b24aa362ac0ad931e678332d1b209aec93045"}, - {file = "wrapt-1.17.0-cp313-cp313-win_amd64.whl", hash = "sha256:fd136bb85f4568fffca995bd3c8d52080b1e5b225dbf1c2b17b66b4c5fa02838"}, - {file = "wrapt-1.17.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:17fcf043d0b4724858f25b8826c36e08f9fb2e475410bece0ec44a22d533da9b"}, - {file = "wrapt-1.17.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e4a557d97f12813dc5e18dad9fa765ae44ddd56a672bb5de4825527c847d6379"}, - {file = "wrapt-1.17.0-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0229b247b0fc7dee0d36176cbb79dbaf2a9eb7ecc50ec3121f40ef443155fb1d"}, - {file = "wrapt-1.17.0-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8425cfce27b8b20c9b89d77fb50e368d8306a90bf2b6eef2cdf5cd5083adf83f"}, - {file = "wrapt-1.17.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:9c900108df470060174108012de06d45f514aa4ec21a191e7ab42988ff42a86c"}, - {file = "wrapt-1.17.0-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:4e547b447073fc0dbfcbff15154c1be8823d10dab4ad401bdb1575e3fdedff1b"}, - {file = "wrapt-1.17.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:914f66f3b6fc7b915d46c1cc424bc2441841083de01b90f9e81109c9759e43ab"}, - {file = "wrapt-1.17.0-cp313-cp313t-win32.whl", hash = "sha256:a4192b45dff127c7d69b3bdfb4d3e47b64179a0b9900b6351859f3001397dabf"}, - {file = "wrapt-1.17.0-cp313-cp313t-win_amd64.whl", hash = "sha256:4f643df3d4419ea3f856c5c3f40fec1d65ea2e89ec812c83f7767c8730f9827a"}, - {file = "wrapt-1.17.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:69c40d4655e078ede067a7095544bcec5a963566e17503e75a3a3e0fe2803b13"}, - {file = "wrapt-1.17.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2f495b6754358979379f84534f8dd7a43ff8cff2558dcdea4a148a6e713a758f"}, - {file = "wrapt-1.17.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:baa7ef4e0886a6f482e00d1d5bcd37c201b383f1d314643dfb0367169f94f04c"}, - {file = "wrapt-1.17.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a8fc931382e56627ec4acb01e09ce66e5c03c384ca52606111cee50d931a342d"}, - {file = "wrapt-1.17.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:8f8909cdb9f1b237786c09a810e24ee5e15ef17019f7cecb207ce205b9b5fcce"}, - {file = "wrapt-1.17.0-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:ad47b095f0bdc5585bced35bd088cbfe4177236c7df9984b3cc46b391cc60627"}, - {file = "wrapt-1.17.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:948a9bd0fb2c5120457b07e59c8d7210cbc8703243225dbd78f4dfc13c8d2d1f"}, - {file = "wrapt-1.17.0-cp38-cp38-win32.whl", hash = "sha256:5ae271862b2142f4bc687bdbfcc942e2473a89999a54231aa1c2c676e28f29ea"}, - {file = "wrapt-1.17.0-cp38-cp38-win_amd64.whl", hash = "sha256:f335579a1b485c834849e9075191c9898e0731af45705c2ebf70e0cd5d58beed"}, - {file = "wrapt-1.17.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:d751300b94e35b6016d4b1e7d0e7bbc3b5e1751e2405ef908316c2a9024008a1"}, - {file = "wrapt-1.17.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7264cbb4a18dc4acfd73b63e4bcfec9c9802614572025bdd44d0721983fc1d9c"}, - {file = "wrapt-1.17.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:33539c6f5b96cf0b1105a0ff4cf5db9332e773bb521cc804a90e58dc49b10578"}, - {file = "wrapt-1.17.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c30970bdee1cad6a8da2044febd824ef6dc4cc0b19e39af3085c763fdec7de33"}, - {file = "wrapt-1.17.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:bc7f729a72b16ee21795a943f85c6244971724819819a41ddbaeb691b2dd85ad"}, - {file = "wrapt-1.17.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:6ff02a91c4fc9b6a94e1c9c20f62ea06a7e375f42fe57587f004d1078ac86ca9"}, - {file = "wrapt-1.17.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:2dfb7cff84e72e7bf975b06b4989477873dcf160b2fd89959c629535df53d4e0"}, - {file = "wrapt-1.17.0-cp39-cp39-win32.whl", hash = "sha256:2399408ac33ffd5b200480ee858baa58d77dd30e0dd0cab6a8a9547135f30a88"}, - {file = "wrapt-1.17.0-cp39-cp39-win_amd64.whl", hash = "sha256:4f763a29ee6a20c529496a20a7bcb16a73de27f5da6a843249c7047daf135977"}, - {file = "wrapt-1.17.0-py3-none-any.whl", hash = "sha256:d2c63b93548eda58abf5188e505ffed0229bf675f7c3090f8e36ad55b8cbc371"}, - {file = "wrapt-1.17.0.tar.gz", hash = "sha256:16187aa2317c731170a88ef35e8937ae0f533c402872c1ee5e6d079fcf320801"}, + {file = "wrapt-1.17.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:3d57c572081fed831ad2d26fd430d565b76aa277ed1d30ff4d40670b1c0dd984"}, + {file = "wrapt-1.17.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b5e251054542ae57ac7f3fba5d10bfff615b6c2fb09abeb37d2f1463f841ae22"}, + {file = "wrapt-1.17.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:80dd7db6a7cb57ffbc279c4394246414ec99537ae81ffd702443335a61dbf3a7"}, + {file = "wrapt-1.17.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0a6e821770cf99cc586d33833b2ff32faebdbe886bd6322395606cf55153246c"}, + {file = "wrapt-1.17.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b60fb58b90c6d63779cb0c0c54eeb38941bae3ecf7a73c764c52c88c2dcb9d72"}, + {file = "wrapt-1.17.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b870b5df5b71d8c3359d21be8f0d6c485fa0ebdb6477dda51a1ea54a9b558061"}, + {file = "wrapt-1.17.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:4011d137b9955791f9084749cba9a367c68d50ab8d11d64c50ba1688c9b457f2"}, + {file = "wrapt-1.17.2-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:1473400e5b2733e58b396a04eb7f35f541e1fb976d0c0724d0223dd607e0f74c"}, + {file = "wrapt-1.17.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:3cedbfa9c940fdad3e6e941db7138e26ce8aad38ab5fe9dcfadfed9db7a54e62"}, + {file = "wrapt-1.17.2-cp310-cp310-win32.whl", hash = "sha256:582530701bff1dec6779efa00c516496968edd851fba224fbd86e46cc6b73563"}, + {file = "wrapt-1.17.2-cp310-cp310-win_amd64.whl", hash = "sha256:58705da316756681ad3c9c73fd15499aa4d8c69f9fd38dc8a35e06c12468582f"}, + {file = "wrapt-1.17.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:ff04ef6eec3eee8a5efef2401495967a916feaa353643defcc03fc74fe213b58"}, + {file = "wrapt-1.17.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:4db983e7bca53819efdbd64590ee96c9213894272c776966ca6306b73e4affda"}, + {file = "wrapt-1.17.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:9abc77a4ce4c6f2a3168ff34b1da9b0f311a8f1cfd694ec96b0603dff1c79438"}, + {file = "wrapt-1.17.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0b929ac182f5ace000d459c59c2c9c33047e20e935f8e39371fa6e3b85d56f4a"}, + {file = "wrapt-1.17.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f09b286faeff3c750a879d336fb6d8713206fc97af3adc14def0cdd349df6000"}, + {file = "wrapt-1.17.2-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1a7ed2d9d039bd41e889f6fb9364554052ca21ce823580f6a07c4ec245c1f5d6"}, + {file = "wrapt-1.17.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:129a150f5c445165ff941fc02ee27df65940fcb8a22a61828b1853c98763a64b"}, + {file = "wrapt-1.17.2-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:1fb5699e4464afe5c7e65fa51d4f99e0b2eadcc176e4aa33600a3df7801d6662"}, + {file = "wrapt-1.17.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:9a2bce789a5ea90e51a02dfcc39e31b7f1e662bc3317979aa7e5538e3a034f72"}, + {file = "wrapt-1.17.2-cp311-cp311-win32.whl", hash = "sha256:4afd5814270fdf6380616b321fd31435a462019d834f83c8611a0ce7484c7317"}, + {file = "wrapt-1.17.2-cp311-cp311-win_amd64.whl", hash = "sha256:acc130bc0375999da18e3d19e5a86403667ac0c4042a094fefb7eec8ebac7cf3"}, + {file = "wrapt-1.17.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:d5e2439eecc762cd85e7bd37161d4714aa03a33c5ba884e26c81559817ca0925"}, + {file = "wrapt-1.17.2-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:3fc7cb4c1c744f8c05cd5f9438a3caa6ab94ce8344e952d7c45a8ed59dd88392"}, + {file = "wrapt-1.17.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8fdbdb757d5390f7c675e558fd3186d590973244fab0c5fe63d373ade3e99d40"}, + {file = "wrapt-1.17.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5bb1d0dbf99411f3d871deb6faa9aabb9d4e744d67dcaaa05399af89d847a91d"}, + {file = "wrapt-1.17.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d18a4865f46b8579d44e4fe1e2bcbc6472ad83d98e22a26c963d46e4c125ef0b"}, + {file = "wrapt-1.17.2-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc570b5f14a79734437cb7b0500376b6b791153314986074486e0b0fa8d71d98"}, + {file = "wrapt-1.17.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:6d9187b01bebc3875bac9b087948a2bccefe464a7d8f627cf6e48b1bbae30f82"}, + {file = "wrapt-1.17.2-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:9e8659775f1adf02eb1e6f109751268e493c73716ca5761f8acb695e52a756ae"}, + {file = "wrapt-1.17.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:e8b2816ebef96d83657b56306152a93909a83f23994f4b30ad4573b00bd11bb9"}, + {file = "wrapt-1.17.2-cp312-cp312-win32.whl", hash = "sha256:468090021f391fe0056ad3e807e3d9034e0fd01adcd3bdfba977b6fdf4213ea9"}, + {file = "wrapt-1.17.2-cp312-cp312-win_amd64.whl", hash = "sha256:ec89ed91f2fa8e3f52ae53cd3cf640d6feff92ba90d62236a81e4e563ac0e991"}, + {file = "wrapt-1.17.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:6ed6ffac43aecfe6d86ec5b74b06a5be33d5bb9243d055141e8cabb12aa08125"}, + {file = "wrapt-1.17.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:35621ae4c00e056adb0009f8e86e28eb4a41a4bfa8f9bfa9fca7d343fe94f998"}, + {file = "wrapt-1.17.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a604bf7a053f8362d27eb9fefd2097f82600b856d5abe996d623babd067b1ab5"}, + {file = "wrapt-1.17.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5cbabee4f083b6b4cd282f5b817a867cf0b1028c54d445b7ec7cfe6505057cf8"}, + {file = "wrapt-1.17.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:49703ce2ddc220df165bd2962f8e03b84c89fee2d65e1c24a7defff6f988f4d6"}, + {file = "wrapt-1.17.2-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8112e52c5822fc4253f3901b676c55ddf288614dc7011634e2719718eaa187dc"}, + {file = "wrapt-1.17.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:9fee687dce376205d9a494e9c121e27183b2a3df18037f89d69bd7b35bcf59e2"}, + {file = "wrapt-1.17.2-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:18983c537e04d11cf027fbb60a1e8dfd5190e2b60cc27bc0808e653e7b218d1b"}, + {file = "wrapt-1.17.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:703919b1633412ab54bcf920ab388735832fdcb9f9a00ae49387f0fe67dad504"}, + {file = "wrapt-1.17.2-cp313-cp313-win32.whl", hash = "sha256:abbb9e76177c35d4e8568e58650aa6926040d6a9f6f03435b7a522bf1c487f9a"}, + {file = "wrapt-1.17.2-cp313-cp313-win_amd64.whl", hash = "sha256:69606d7bb691b50a4240ce6b22ebb319c1cfb164e5f6569835058196e0f3a845"}, + {file = "wrapt-1.17.2-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:4a721d3c943dae44f8e243b380cb645a709ba5bd35d3ad27bc2ed947e9c68192"}, + {file = "wrapt-1.17.2-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:766d8bbefcb9e00c3ac3b000d9acc51f1b399513f44d77dfe0eb026ad7c9a19b"}, + {file = "wrapt-1.17.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:e496a8ce2c256da1eb98bd15803a79bee00fc351f5dfb9ea82594a3f058309e0"}, + {file = "wrapt-1.17.2-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:40d615e4fe22f4ad3528448c193b218e077656ca9ccb22ce2cb20db730f8d306"}, + {file = "wrapt-1.17.2-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a5aaeff38654462bc4b09023918b7f21790efb807f54c000a39d41d69cf552cb"}, + {file = "wrapt-1.17.2-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9a7d15bbd2bc99e92e39f49a04653062ee6085c0e18b3b7512a4f2fe91f2d681"}, + {file = "wrapt-1.17.2-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:e3890b508a23299083e065f435a492b5435eba6e304a7114d2f919d400888cc6"}, + {file = "wrapt-1.17.2-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:8c8b293cd65ad716d13d8dd3624e42e5a19cc2a2f1acc74b30c2c13f15cb61a6"}, + {file = "wrapt-1.17.2-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:4c82b8785d98cdd9fed4cac84d765d234ed3251bd6afe34cb7ac523cb93e8b4f"}, + {file = "wrapt-1.17.2-cp313-cp313t-win32.whl", hash = "sha256:13e6afb7fe71fe7485a4550a8844cc9ffbe263c0f1a1eea569bc7091d4898555"}, + {file = "wrapt-1.17.2-cp313-cp313t-win_amd64.whl", hash = "sha256:eaf675418ed6b3b31c7a989fd007fa7c3be66ce14e5c3b27336383604c9da85c"}, + {file = "wrapt-1.17.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:5c803c401ea1c1c18de70a06a6f79fcc9c5acfc79133e9869e730ad7f8ad8ef9"}, + {file = "wrapt-1.17.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:f917c1180fdb8623c2b75a99192f4025e412597c50b2ac870f156de8fb101119"}, + {file = "wrapt-1.17.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:ecc840861360ba9d176d413a5489b9a0aff6d6303d7e733e2c4623cfa26904a6"}, + {file = "wrapt-1.17.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bb87745b2e6dc56361bfde481d5a378dc314b252a98d7dd19a651a3fa58f24a9"}, + {file = "wrapt-1.17.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:58455b79ec2661c3600e65c0a716955adc2410f7383755d537584b0de41b1d8a"}, + {file = "wrapt-1.17.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b4e42a40a5e164cbfdb7b386c966a588b1047558a990981ace551ed7e12ca9c2"}, + {file = "wrapt-1.17.2-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:91bd7d1773e64019f9288b7a5101f3ae50d3d8e6b1de7edee9c2ccc1d32f0c0a"}, + {file = "wrapt-1.17.2-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:bb90fb8bda722a1b9d48ac1e6c38f923ea757b3baf8ebd0c82e09c5c1a0e7a04"}, + {file = "wrapt-1.17.2-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:08e7ce672e35efa54c5024936e559469436f8b8096253404faeb54d2a878416f"}, + {file = "wrapt-1.17.2-cp38-cp38-win32.whl", hash = "sha256:410a92fefd2e0e10d26210e1dfb4a876ddaf8439ef60d6434f21ef8d87efc5b7"}, + {file = "wrapt-1.17.2-cp38-cp38-win_amd64.whl", hash = "sha256:95c658736ec15602da0ed73f312d410117723914a5c91a14ee4cdd72f1d790b3"}, + {file = "wrapt-1.17.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:99039fa9e6306880572915728d7f6c24a86ec57b0a83f6b2491e1d8ab0235b9a"}, + {file = "wrapt-1.17.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:2696993ee1eebd20b8e4ee4356483c4cb696066ddc24bd70bcbb80fa56ff9061"}, + {file = "wrapt-1.17.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:612dff5db80beef9e649c6d803a8d50c409082f1fedc9dbcdfde2983b2025b82"}, + {file = "wrapt-1.17.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:62c2caa1585c82b3f7a7ab56afef7b3602021d6da34fbc1cf234ff139fed3cd9"}, + {file = "wrapt-1.17.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c958bcfd59bacc2d0249dcfe575e71da54f9dcf4a8bdf89c4cb9a68a1170d73f"}, + {file = "wrapt-1.17.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fc78a84e2dfbc27afe4b2bd7c80c8db9bca75cc5b85df52bfe634596a1da846b"}, + {file = "wrapt-1.17.2-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:ba0f0eb61ef00ea10e00eb53a9129501f52385c44853dbd6c4ad3f403603083f"}, + {file = "wrapt-1.17.2-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:1e1fe0e6ab7775fd842bc39e86f6dcfc4507ab0ffe206093e76d61cde37225c8"}, + {file = "wrapt-1.17.2-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:c86563182421896d73858e08e1db93afdd2b947a70064b813d515d66549e15f9"}, + {file = "wrapt-1.17.2-cp39-cp39-win32.whl", hash = "sha256:f393cda562f79828f38a819f4788641ac7c4085f30f1ce1a68672baa686482bb"}, + {file = "wrapt-1.17.2-cp39-cp39-win_amd64.whl", hash = "sha256:36ccae62f64235cf8ddb682073a60519426fdd4725524ae38874adf72b5f2aeb"}, + {file = "wrapt-1.17.2-py3-none-any.whl", hash = "sha256:b18f2d1533a71f069c7f82d524a52599053d4c7166e9dd374ae2136b7f40f7c8"}, + {file = "wrapt-1.17.2.tar.gz", hash = "sha256:41388e9d4d1522446fe79d3213196bd9e3b301a336965b9e27ca2788ebd122f3"}, ] [[package]] @@ -2971,4 +2987,4 @@ testing = ["coverage[toml]", "zope.event", "zope.testing"] [metadata] lock-version = "2.0" python-versions = ">=3.10,<4.0" -content-hash = "6f5f15d1410867cc3b4b49b9f8624a14725a218cd6dfd3ba90718613b2807464" +content-hash = "66147fd0a9e791c172b8b3336c371e8e96d051a4efdce0235d69662a743c2203" diff --git a/pyproject.toml b/pyproject.toml index 9d84061..15508ce 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "just-agents" -version = "0.4.8" +version = "0.4.9" description = "Just Agents - A lightweight, straightforward library for LLM agents that focuses on simplicity over unnecessary abstractions." authors = [ "Alex Karmazin ", @@ -26,19 +26,19 @@ just-agents-router = { path = "router", develop = true } just-agents-examples = { path = "examples", develop = true } [tool.poetry.group.publish.dependencies] -just-agents-core = "0.4.8" -just-agents-tools = "0.4.8" -just-agents-coding = "0.4.8" -just-agents-web = "0.4.8" -just-agents-router = "0.4.8" -just-agents-examples = "0.4.8" +just-agents-core = "0.4.9" +just-agents-tools = "0.4.9" +just-agents-coding = "0.4.9" +just-agents-web = "0.4.9" +just-agents-router = "0.4.9" +just-agents-examples = "0.4.9" [tool.poetry.group.dev.dependencies] pytest = ">=8.3.4" python-dotenv = "*" [tool.poetry.scripts] -run-agent = "just_agents.web.run:app" +run-agent = "just_agents.web.run_agent:app" [build-system] requires = ["poetry-core"] diff --git a/router/pyproject.toml b/router/pyproject.toml index 1a35ad7..f022ab8 100644 --- a/router/pyproject.toml +++ b/router/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "just-agents-router" -version = "0.4.8" +version = "0.4.9" description = "Just Agents - Router Components" authors = [ "Newton Winter ", @@ -18,7 +18,7 @@ license = "MIT" [tool.poetry.dependencies] python = ">=3.10,<4.0" -just-agents-core = ">=0.4.8" +just-agents-core = ">=0.4.9" [tool.poetry.group.dev.dependencies] pytest = ">=8.3.4" diff --git a/tools/just_agents/tools/db.py b/tools/just_agents/tools/db.py index 1bc08a0..1b6b490 100644 --- a/tools/just_agents/tools/db.py +++ b/tools/just_agents/tools/db.py @@ -46,4 +46,5 @@ def sqlite_query(database: str, sql: str) -> str: # Ensure connection is closed even if an error occurs conn.close() - return text \ No newline at end of file + return text + diff --git a/tools/just_agents/tools/search.py b/tools/just_agents/tools/search.py index f116e7d..176af4c 100644 --- a/tools/just_agents/tools/search.py +++ b/tools/just_agents/tools/search.py @@ -1,11 +1,8 @@ -import pprint -from typing import Optional, Union +from typing import Union import requests -from typing import List, Dict, Any from semanticscholar import SemanticScholar from semanticscholar.PaginatedResults import PaginatedResults -from semanticscholar.Paper import Paper def get_semantic_paper(query: str, year: str = None, diff --git a/tools/pyproject.toml b/tools/pyproject.toml index b676986..efe2e08 100644 --- a/tools/pyproject.toml +++ b/tools/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "just-agents-tools" -version = "0.4.8" +version = "0.4.9" description = "Just Agents - Tools Components" authors = ["Alex Karmazin "] maintainers = ["Anton Kulaga "] @@ -12,7 +12,7 @@ license = "MIT" [tool.poetry.dependencies] python = ">=3.10,<4.0" -just-agents-core = ">=0.4.8" +just-agents-core = ">=0.4.9" semanticscholar = ">=0.8.4" typer = ">=0.13.0" diff --git a/web/README.md b/web/README.md index 8455e48..585aae6 100644 --- a/web/README.md +++ b/web/README.md @@ -23,12 +23,17 @@ pip install just-agents-web ## Quick Start +The project subpublish run-agent script, so you can run any agent yaml by running: + +```bash +run-agent path/to/agent.yaml +``` + +You can also do it with few lines of python code: ```python -from just_agents.web import create_app -from just_agents.simple.chat_agent import ChatAgent +from just_agents.web.run_agent import run_agent_server -agent = ChatAgent(...) -app = create_app(agent) +run_agent_server(Path("agent_profiles.yaml")) ``` -For detailed documentation and examples, visit our [main repository](https://github.com/longevity-genie/just-agents). +We also provide AgentRestAPI class that you can extend and add your methods to agent endpoint. \ No newline at end of file diff --git a/web/just_agents/web/rest_api.py b/web/just_agents/web/rest_api.py index b0c6571..4feb184 100644 --- a/web/just_agents/web/rest_api.py +++ b/web/just_agents/web/rest_api.py @@ -1,3 +1,6 @@ +import base64 +import hashlib +import mimetypes import os import json import time @@ -40,7 +43,8 @@ def __init__( redoc_url: str = "/redoc", terms_of_service: Optional[str] = None, contact: Optional[Dict[str, Union[str, Any]]] = None, - license_info: Optional[Dict[str, Union[str, Any]]] = None + license_info: Optional[Dict[str, Union[str, Any]]] = None, + remove_system_prompt: Optional[bool] = None ) -> None: """Initialize the AgentRestAPI with FastAPI parameters. @@ -74,6 +78,10 @@ def __init__( ) load_dotenv(override=True) + if remove_system_prompt is None: + self.remove_system_prompt = os.getenv('REMOVE_SYSTEM_PROMPT', False) + else: + self.remove_system_prompt = remove_system_prompt self._agent_related_config(agent_config, agent_section, agent_parent_section) self._routes_config() @@ -116,6 +124,29 @@ def _remove_system_prompt(self, request: ChatCompletionRequest): def default(self): return f"This is default page for the {self.title}" + def sha256sum(self, content_str: str): + hash = hashlib.sha256() + hash.update(content_str.encode('utf-8')) + return hash.hexdigest() + + def save_files(self, request: dict): + for file in request.get("file_params", []): + file_name = file.get("name") + file_content_base64 = file.get("content") + file_checksum = file.get("checksum") + file_mime = file.get("mime") + + if self.sha256sum(file_content_base64) != file_checksum: + raise Exception("File checksum does not match") + + extension = mimetypes.guess_extension(file_mime) + file_content = base64.urlsafe_b64decode(file_content_base64.encode('utf-8')) + full_file_name = file_name + extension + + file_path = Path('/tmp', full_file_name) + with open(file_path, "wb") as f: + f.write(file_content) + # @log_call(action_type="chat_completions", include_result=False) @@ -123,7 +154,13 @@ async def chat_completions(self, request: ChatCompletionRequest) -> Union[ChatCo try: agent = self.agent self._clean_messages(request) - self._remove_system_prompt(request) + if self.remove_system_prompt: + self._remove_system_prompt(request) + + if "file_params" in request: + params = request.file_params + if params != []: + self.save_files(request.model_dump()) #Done by FastAPI+pydantic under the hood! Just supply schema... diff --git a/web/just_agents/web/run.py b/web/just_agents/web/run_agent.py similarity index 77% rename from web/just_agents/web/run.py rename to web/just_agents/web/run_agent.py index 0d2b9c0..50da2ff 100644 --- a/web/just_agents/web/run.py +++ b/web/just_agents/web/run_agent.py @@ -8,14 +8,16 @@ app = typer.Typer() -def run_server( +def run_agent_server( config: Path, host: str = "0.0.0.0", port: int = 8088, workers: int = 1, title: str = "Just-Agent endpoint", section: Optional[str] = None, - parent_section: Optional[str] = None + parent_section: Optional[str] = None, + debug: bool = True, + remove_system_prompt: bool = False ) -> None: """ Run the FastAPI server with the given configuration. @@ -35,7 +37,8 @@ def run_server( title=title, agent_section=section, agent_parent_section=parent_section, - debug=True + debug=debug, + remove_system_prompt=remove_system_prompt ) uvicorn.run( @@ -53,18 +56,22 @@ def run_server_command( workers: int = typer.Option(1, help="Number of worker processes"), title: str = typer.Option("Just-Agent endpoint", help="Title for the API endpoint"), section: Optional[str] = typer.Option(None, help="Optional section name in the config file"), - parent_section: Optional[str] = typer.Option(None, help="Optional parent section name in the config file") + parent_section: Optional[str] = typer.Option(None, help="Optional parent section name in the config file"), + debug: bool = typer.Option(True, help="Debug mode"), + remove_system_prompt: bool = typer.Option(False, help="Remove system prompt") ) -> None: """Run the FastAPI server with the given configuration.""" - with start_task(action_type="run_server"): - run_server( + with start_task(action_type="run_agent_server"): + run_agent_server( config=config, host=host, port=port, workers=workers, title=title, section=section, - parent_section=parent_section + parent_section=parent_section, + debug=debug, + remove_system_prompt=remove_system_prompt ) if __name__ == "__main__": diff --git a/web/just_agents/web/streaming.py b/web/just_agents/web/streaming.py index 61e70c3..92ae419 100644 --- a/web/just_agents/web/streaming.py +++ b/web/just_agents/web/streaming.py @@ -1,12 +1,11 @@ import asyncio import time -from typing import Optional, List, Dict, Any, Union, AsyncGenerator, Generator +from typing import Optional, Any, AsyncGenerator, Generator -from just_agents.base_agent import BaseAgent from just_agents.web.models import ( - ChatCompletionRequest, TextContent, ChatCompletionChoiceChunk, ChatCompletionChunkResponse, - ChatCompletionResponse, ChatCompletionChoice, ChatCompletionUsage, ResponseMessage, ErrorResponse + ChatCompletionChoiceChunk, ChatCompletionChunkResponse, + ChatCompletionResponse, ResponseMessage ) async def async_wrap(response: Generator) -> AsyncGenerator[Any, None]: diff --git a/web/pyproject.toml b/web/pyproject.toml index bf9b91b..dab3bf7 100644 --- a/web/pyproject.toml +++ b/web/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "just-agents-web" -version = "0.4.8" +version = "0.4.9" description = "Just Agents - Web. It allows runing openai API for the agent in the browser." authors = [ @@ -31,7 +31,7 @@ classifiers = [ [tool.poetry.dependencies] python = ">=3.10,<4.0" -just-agents-core = ">=0.4.8" +just-agents-core = ">=0.4.9" pycomfort = ">=0.0.17" fastapi = ">=0.115.6" uvicorn = ">=0.34.0" @@ -39,4 +39,4 @@ uvicorn = ">=0.34.0" [tool.poetry.group.dev.dependencies] [tool.poetry.scripts] -run-agent = "just_agents.web.run:app" \ No newline at end of file +run-agent = "just_agents.web.run_agent:app"