From 7a037732eb4d9d7b2b344b813a797838ebd8a60c Mon Sep 17 00:00:00 2001 From: antonkulaga Date: Mon, 6 Jan 2025 20:04:08 +0200 Subject: [PATCH] fixed web package --- coding/pyproject.toml | 6 +- config/agent_profiles.yaml | 29 ++ core/just_agents/simple/README.md | 2 +- core/just_agents/simple/chat_agent.py | 3 +- core/just_agents/simple/cot_agent.py | 2 + core/just_agents/simple/llm_session.py | 3 +- core/just_agents/simple/memory.py | 2 + .../simple/streaming/chain_of_thought.py | 2 + .../simple/streaming/openai_streaming.py | 3 +- .../simple/streaming/qwen2_streaming.py | 3 +- core/pyproject.toml | 2 +- .../just_agents/examples/web/nice_agent.yaml | 32 +- examples/just_agents/examples/web/nice_web.py | 5 +- examples/notebooks/01_just_agents_colab.ipynb | 4 +- examples/notebooks/02_sqlite_example.ipynb | 6 +- examples/notebooks/03_coding_agent.ipynb | 6 +- examples/pyproject.toml | 12 +- just_agents/meta/__init__.py | 1 + poetry.lock | 493 +++++++++++++++--- pyproject.toml | 17 +- pyproject.toml.bak | 42 ++ router/pyproject.toml | 4 +- tools/pyproject.toml | 4 +- web/just_agents/web/rest_api.py | 136 +++++ web/just_agents/web/run.py | 66 +++ web/just_agents/web/web.py | 131 ----- web/pyproject.toml | 12 +- 27 files changed, 786 insertions(+), 242 deletions(-) create mode 100644 config/agent_profiles.yaml create mode 100644 just_agents/meta/__init__.py create mode 100644 pyproject.toml.bak create mode 100644 web/just_agents/web/rest_api.py create mode 100644 web/just_agents/web/run.py delete mode 100644 web/just_agents/web/web.py diff --git a/coding/pyproject.toml b/coding/pyproject.toml index 2e208a5..f9ad12c 100644 --- a/coding/pyproject.toml +++ b/coding/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "just-agents-coding" -version = "0.4.4" +version = "0.4.5" description = "Just Agents - Coding Components" authors = [ "Alex Karmazin ", @@ -19,8 +19,8 @@ license = "MIT" [tool.poetry.dependencies] python = ">=3.10,<4.0" -just-agents-core = ">=0.4.3" -llm-sandbox = ">=0.1.4" +just-agents-core = ">=0.4.5" +llm-sandbox = ">=0.1.8" [build-system] requires = ["poetry-core"] diff --git a/config/agent_profiles.yaml b/config/agent_profiles.yaml new file mode 100644 index 0000000..fa4b4fc --- /dev/null +++ b/config/agent_profiles.yaml @@ -0,0 +1,29 @@ +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: A skilled AI assistant specializing in the generation of concise + and detail-rich profiles for AI agents. + expertise_domain: AI agent profiling and analysis. + extra_dict: + personality_traits: Agent's personality traits go here + goal: To generate detailed profiles for AI agents. + knowledge_sources: [] + limitations: Limited to the information available up to October 2023. + llm_options: + model: gpt-4o-mini + temperature: 0.0 + model_name: gpt-4o-mini + personality_traits: Skilled, detail-oriented, concise, analytical + role: AI assistant. + 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: Analysis and description of AI agents. diff --git a/core/just_agents/simple/README.md b/core/just_agents/simple/README.md index 3ded7c6..bef6f5e 100644 --- a/core/just_agents/simple/README.md +++ b/core/just_agents/simple/README.md @@ -2,4 +2,4 @@ This is a legacy package, left for backward compatibility. Here you see initial implementation of agents, which are now deprecated. -These implementations are simplier than the current ones but with less features. +These implementations are simplier than the current ones but with less features. \ No newline at end of file diff --git a/core/just_agents/simple/chat_agent.py b/core/just_agents/simple/chat_agent.py index d3f495a..72fab66 100644 --- a/core/just_agents/simple/chat_agent.py +++ b/core/just_agents/simple/chat_agent.py @@ -2,8 +2,9 @@ from just_agents.simple.llm_session import LLMSession from just_agents.simple.utils import load_config +from deprecated import deprecated - +@deprecated(reason="This is old memory implementation, everything in simple package is deprecated") class ChatAgent(LLMSession): """ Default agent class, it assumes that each agent has a role, goal, and background story. diff --git a/core/just_agents/simple/cot_agent.py b/core/just_agents/simple/cot_agent.py index d8709cf..7ea63a8 100644 --- a/core/just_agents/simple/cot_agent.py +++ b/core/just_agents/simple/cot_agent.py @@ -1,3 +1,4 @@ +from deprecated import deprecated from just_agents.interfaces.agent import IAgent from just_agents.simple.llm_session import LLMSession import json @@ -17,6 +18,7 @@ FINAL_PROMPT = "final_prompt" +@deprecated(reason="This is old memory implementation, everything in simple package is deprecated") class ChainOfThoughtAgent(IAgent): def __init__(self, llm_options: dict = None, agent_schema: str | Path | dict | None = None, diff --git a/core/just_agents/simple/llm_session.py b/core/just_agents/simple/llm_session.py index 2f9233c..7f749bc 100644 --- a/core/just_agents/simple/llm_session.py +++ b/core/just_agents/simple/llm_session.py @@ -3,6 +3,7 @@ from pathlib import Path from typing import Any, AsyncGenerator +from deprecated import deprecated import litellm from litellm import ModelResponse, completion from litellm.utils import Choices @@ -29,7 +30,7 @@ QWEN2 = "qwen2" CHAIN_OF_THOUGHT = "chain_of_thought" - +@deprecated(reason="This is old memory implementation, everything in simple package is deprecated") class LLMSession( IAgent[ str | dict | list[dict], diff --git a/core/just_agents/simple/memory.py b/core/just_agents/simple/memory.py index a387e2a..a98efba 100644 --- a/core/just_agents/simple/memory.py +++ b/core/just_agents/simple/memory.py @@ -1,6 +1,7 @@ from dataclasses import dataclass, field from typing import Callable, Optional from litellm.types.utils import Function +from deprecated import deprecated OnMessageCallable = Callable[[dict], None] OnFunctionCallable = Callable[[Function], None] @@ -10,6 +11,7 @@ ASSISTANT = "assistant" SYSTEM = "system" +@deprecated(reason="This is old memory implementation, everything in simple package is deprecated") class Memory: def __init__(self): self.on_message:dict[str, list] = {TOOL:[], USER:[], ASSISTANT:[], SYSTEM:[]} diff --git a/core/just_agents/simple/streaming/chain_of_thought.py b/core/just_agents/simple/streaming/chain_of_thought.py index 0603535..e64bde6 100644 --- a/core/just_agents/simple/streaming/chain_of_thought.py +++ b/core/just_agents/simple/streaming/chain_of_thought.py @@ -4,7 +4,9 @@ from just_agents.protocols.openai_streaming import OpenaiStreamingProtocol from just_agents.interfaces.streaming_protocol import IAbstractStreamingProtocol import json +from deprecated import deprecated +@deprecated(reason="This is old memory implementation, everything in simple package is deprecated") class ChainOfThought(AbstractStreaming): def __init__(self, llm_session, output_streaming: IAbstractStreamingProtocol = OpenaiStreamingProtocol()): diff --git a/core/just_agents/simple/streaming/openai_streaming.py b/core/just_agents/simple/streaming/openai_streaming.py index cdff443..7b62ae7 100644 --- a/core/just_agents/simple/streaming/openai_streaming.py +++ b/core/just_agents/simple/streaming/openai_streaming.py @@ -6,8 +6,9 @@ from just_agents.simple.streaming.protocols.abstract_streaming import AbstractStreaming, FunctionParser from just_agents.interfaces.streaming_protocol import IAbstractStreamingProtocol from just_agents.protocols.openai_streaming import OpenaiStreamingProtocol +from deprecated import deprecated - +@deprecated(reason="This is old memory implementation, everything in simple package is deprecated") class AsyncSession(AbstractStreaming): def __init__(self, llm_session, output_streaming: IAbstractStreamingProtocol = OpenaiStreamingProtocol()): diff --git a/core/just_agents/simple/streaming/qwen2_streaming.py b/core/just_agents/simple/streaming/qwen2_streaming.py index 6728bd5..2edbbac 100644 --- a/core/just_agents/simple/streaming/qwen2_streaming.py +++ b/core/just_agents/simple/streaming/qwen2_streaming.py @@ -7,8 +7,9 @@ import json from qwen_agent.llm import get_chat_model # deprecated, so far we do not use qwen_agent import litellm +from deprecated import deprecated - +@deprecated(reason="This is old memory implementation, everything in simple package is deprecated") class Qwen2AsyncSession(AbstractStreaming): def __init__(self, llm_session, output_streaming: IAbstractStreamingProtocol = OpenaiStreamingProtocol()): diff --git a/core/pyproject.toml b/core/pyproject.toml index 8589796..ba785a3 100644 --- a/core/pyproject.toml +++ b/core/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "just-agents-core" -version = "0.4.4" +version = "0.4.5" description = "Just Agents - Base Package" authors = [ "Alex Karmazin ", diff --git a/examples/just_agents/examples/web/nice_agent.yaml b/examples/just_agents/examples/web/nice_agent.yaml index 1502f44..dda3cc9 100644 --- a/examples/just_agents/examples/web/nice_agent.yaml +++ b/examples/just_agents/examples/web/nice_agent.yaml @@ -1,6 +1,26 @@ -system_prompt: "You are super-nice assistant that could help with anything. -You communicate in a very friendly and positive informal way." -options: - model: "groq/llama-3.1-70b-versatile" - api_base: "https://api.groq.com/openai/v1" - temperature: 0.0 \ No newline at end of file +agent_profiles: + SimpleWeatherAgent: + class_qualname: just_agents.base_agent.BaseAgent + llm_options: + api_base: https://api.groq.com/openai/v1 + model: groq/llama-3.3-70b-versatile + temperature: 0.0 + tool_choice: auto + tools: [] + tools: + mock_get_current_weather: + arguments: + - location: + default: null + kind: POSITIONAL_OR_KEYWORD + type_annotation: + description: Gets the current weather in a given location + function: mock_get_current_weather + package: just_agents.tools.weather + parameters: + properties: + location: + type: string + required: + - location + type: object diff --git a/examples/just_agents/examples/web/nice_web.py b/examples/just_agents/examples/web/nice_web.py index 27424bc..f885ca0 100644 --- a/examples/just_agents/examples/web/nice_web.py +++ b/examples/just_agents/examples/web/nice_web.py @@ -2,7 +2,8 @@ from dotenv import load_dotenv from just_agents.interfaces.agent import IAgent from just_agents.simple.utils import build_agent -from just_agents_web.web import create_app, run_server +from just_agents.web.rest_api import * +from just_agents.web.run import * load_dotenv(override=True) @@ -15,4 +16,4 @@ if __name__ == "__main__": cofig_path = web_examples_dir / "nice_agent.yaml" - run_server(config_path=cofig_path) \ No newline at end of file + run_server(config=cofig_path, agent_parent_section="agent_profiles", agent_section="SimpleWeatherAgent") diff --git a/examples/notebooks/01_just_agents_colab.ipynb b/examples/notebooks/01_just_agents_colab.ipynb index 0bea167..51eb7de 100644 --- a/examples/notebooks/01_just_agents_colab.ipynb +++ b/examples/notebooks/01_just_agents_colab.ipynb @@ -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.3 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.5 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", @@ -154,7 +154,7 @@ } ], "source": [ - "!pip install just-agents-core==0.4.3" + "!pip install just-agents-core==0.4.5" ] }, { diff --git a/examples/notebooks/02_sqlite_example.ipynb b/examples/notebooks/02_sqlite_example.ipynb index 8007912..02ef6db 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.3 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.5 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.3\n", - "!pip install just-agents-examples==0.4.3" + "!pip install just-agents-core==0.4.5\n", + "!pip install just-agents-examples==0.4.5" ] }, { diff --git a/examples/notebooks/03_coding_agent.ipynb b/examples/notebooks/03_coding_agent.ipynb index dc040d0..89fae88 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.3 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.5 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.3\n", - "!pip install just-agents-examples==0.4.3" + "!pip install just-agents-core==0.4.5\n", + "!pip install just-agents-examples==0.4.5" ] }, { diff --git a/examples/pyproject.toml b/examples/pyproject.toml index fe85039..21e780e 100644 --- a/examples/pyproject.toml +++ b/examples/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "just-agents-examples" -version = "0.4.4" +version = "0.4.5" 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.3" -just-agents-tools = ">=0.4.3" -just-agents-coding = ">=0.4.3" -just-agents-web = ">=0.4.3" -just-agents-router = ">=0.4.3" +just-agents-core = ">=0.4.5" +just-agents-tools = ">=0.4.5" +just-agents-coding = ">=0.4.5" +just-agents-web = ">=0.4.5" +just-agents-router = ">=0.4.5" [tool.poetry.group.dev.dependencies] pytest = "^7.4.4" diff --git a/just_agents/meta/__init__.py b/just_agents/meta/__init__.py new file mode 100644 index 0000000..2152c64 --- /dev/null +++ b/just_agents/meta/__init__.py @@ -0,0 +1 @@ +#placeholder for namespace package \ No newline at end of file diff --git a/poetry.lock b/poetry.lock index 661a050..386257c 100644 --- a/poetry.lock +++ b/poetry.lock @@ -147,13 +147,13 @@ files = [ [[package]] name = "anyio" -version = "4.7.0" +version = "4.8.0" description = "High level compatibility layer for multiple asynchronous event loop implementations" optional = false python-versions = ">=3.9" files = [ - {file = "anyio-4.7.0-py3-none-any.whl", hash = "sha256:ea60c3723ab42ba6fff7e8ccb0488c898ec538ff4df1f1d5e642c3601d07e352"}, - {file = "anyio-4.7.0.tar.gz", hash = "sha256:2f834749c602966b7d456a7567cafcb309f96482b5081d14ac93ccd457f9dd48"}, + {file = "anyio-4.8.0-py3-none-any.whl", hash = "sha256:b5011f270ab5eb0abf13385f851315585cc37ef330dd88e27ec3d34d651fd47a"}, + {file = "anyio-4.8.0.tar.gz", hash = "sha256:1d9fe889df5212298c0c0723fa20479d1b94883a2df44bd3897aa91083316f7a"}, ] [package.dependencies] @@ -164,7 +164,7 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] doc = ["Sphinx (>=7.4,<8.0)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx_rtd_theme"] -test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "truststore (>=0.9.1)", "uvloop (>=0.21)"] +test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "trustme", "truststore (>=0.9.1)", "uvloop (>=0.21)"] trio = ["trio (>=0.26.1)"] [[package]] @@ -211,6 +211,17 @@ files = [ [package.extras] dev = ["freezegun (>=1.0,<2.0)", "pytest (>=6.0)", "pytest-cov"] +[[package]] +name = "boltons" +version = "24.1.0" +description = "When they're not builtins, they're boltons." +optional = false +python-versions = ">=3.7" +files = [ + {file = "boltons-24.1.0-py3-none-any.whl", hash = "sha256:a1776d47fdc387fb730fba1fe245f405ee184ee0be2fb447dd289773a84aed3b"}, + {file = "boltons-24.1.0.tar.gz", hash = "sha256:4a49b7d57ee055b83a458c8682a2a6f199d263a8aa517098bda9bab813554b87"}, +] + [[package]] name = "certifi" version = "2024.12.14" @@ -348,6 +359,17 @@ files = [ {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, ] +[[package]] +name = "colored" +version = "2.2.4" +description = "Simple python library for color and formatting to terminal" +optional = false +python-versions = ">=3.9" +files = [ + {file = "colored-2.2.4-py3-none-any.whl", hash = "sha256:a7069673bd90a35f46cb748d012c17284a0668d2f1c06bc7a51822a2d5ad2112"}, + {file = "colored-2.2.4.tar.gz", hash = "sha256:595e1dd7f3b472ea5f12af21d2fec8a2ea2cf8f9d93e67180197330b26df9b61"}, +] + [[package]] name = "deprecated" version = "1.2.15" @@ -365,6 +387,21 @@ wrapt = ">=1.10,<2" [package.extras] dev = ["PyTest", "PyTest-Cov", "bump2version (<1)", "jinja2 (>=3.0.3,<3.1.0)", "setuptools", "sphinx (<2)", "tox"] +[[package]] +name = "dill" +version = "0.3.9" +description = "serialize all of Python" +optional = false +python-versions = ">=3.8" +files = [ + {file = "dill-0.3.9-py3-none-any.whl", hash = "sha256:468dff3b89520b474c0397703366b7b95eebe6303f108adf9b19da1f702be87a"}, + {file = "dill-0.3.9.tar.gz", hash = "sha256:81aa267dddf68cbfe8029c42ca9ec6a4ab3b22371d1c450abc54422577b4512c"}, +] + +[package.extras] +graph = ["objgraph (>=1.7.2)"] +profile = ["gprof2dot (>=2022.7.29)"] + [[package]] name = "distro" version = "1.9.0" @@ -387,6 +424,51 @@ files = [ {file = "docutils-0.21.2.tar.gz", hash = "sha256:3a6b18732edf182daa3cd12775bbb338cf5691468f91eeeb109deff6ebfa986f"}, ] +[[package]] +name = "eliot" +version = "1.16.0" +description = "Logging library that tells you why it happened" +optional = false +python-versions = ">=3.8.0" +files = [ + {file = "eliot-1.16.0-py3-none-any.whl", hash = "sha256:b83ac0ffd63b7b2d64a1097bb06dfeef4d68d39783d7eaf31aeadc7441ac39c5"}, + {file = "eliot-1.16.0.tar.gz", hash = "sha256:8a26da750c62d20193533ac8d0e705010e04512a43853ab3f3486494e92c6ef9"}, +] + +[package.dependencies] +boltons = ">=19.0.1" +orjson = {version = "*", markers = "implementation_name == \"cpython\""} +pyrsistent = ">=0.11.8" +"zope.interface" = "*" + +[package.extras] +dev = ["black", "coverage", "flake8", "setuptools (>=40)", "sphinx", "sphinx_rtd_theme", "twine (>=1.12.1)"] +journald = ["cffi (>=1.1.2)"] +test = ["hypothesis (>=1.14.0)", "pytest", "pytest-xdist", "testtools"] + +[[package]] +name = "eliot-tree" +version = "24.0.0" +description = "Render Eliot logs as an ASCII tree" +optional = false +python-versions = "*" +files = [ + {file = "eliot-tree-24.0.0.tar.gz", hash = "sha256:264a44970417005d432f5adef1ccf5ceab58843c237223f7bc77eb1498cc5fcc"}, + {file = "eliot_tree-24.0.0-py3-none-any.whl", hash = "sha256:236221975a8ee6f9afdd2a7a8e21a4f6ab042d7836f7138457c7f01336f5d146"}, +] + +[package.dependencies] +colored = ">=1.4.2" +eliot = ">=1.6.0" +iso8601 = ">=0.1.10" +jmespath = ">=0.7.1" +six = ">=1.13.0" +toolz = ">=0.8.2" +win-unicode-console = {version = ">=0.5", markers = "platform_system == \"Windows\""} + +[package.extras] +test = ["testtools (>=1.8.0)"] + [[package]] name = "exceptiongroup" version = "1.2.2" @@ -636,13 +718,13 @@ zstd = ["zstandard (>=0.18.0)"] [[package]] name = "huggingface-hub" -version = "0.27.0" +version = "0.27.1" description = "Client library to download and publish models, datasets and other repos on the huggingface.co hub" optional = false python-versions = ">=3.8.0" files = [ - {file = "huggingface_hub-0.27.0-py3-none-any.whl", hash = "sha256:8f2e834517f1f1ddf1ecc716f91b120d7333011b7485f665a9a412eacb1a2a81"}, - {file = "huggingface_hub-0.27.0.tar.gz", hash = "sha256:902cce1a1be5739f5589e560198a65a8edcfd3b830b1666f36e4b961f0454fac"}, + {file = "huggingface_hub-0.27.1-py3-none-any.whl", hash = "sha256:1c5155ca7d60b60c2e2fc38cbb3ffb7f7c3adf48f824015b219af9061771daec"}, + {file = "huggingface_hub-0.27.1.tar.gz", hash = "sha256:c004463ca870283909d715d20f066ebd6968c2207dae9393fdffb3c1d4d8f98b"}, ] [package.dependencies] @@ -727,6 +809,17 @@ files = [ {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, ] +[[package]] +name = "iso8601" +version = "2.1.0" +description = "Simple module to parse ISO 8601 dates" +optional = false +python-versions = ">=3.7,<4.0" +files = [ + {file = "iso8601-2.1.0-py3-none-any.whl", hash = "sha256:aac4145c4dcb66ad8b648a02830f5e2ff6c24af20f4f482689be402db2429242"}, + {file = "iso8601-2.1.0.tar.gz", hash = "sha256:6b1d3829ee8921c4301998c909f7829fa9ed3cbdac0d3b16af2d743aed1ba8df"}, +] + [[package]] name = "jinja2" version = "3.1.5" @@ -829,6 +922,17 @@ files = [ {file = "jiter-0.8.2.tar.gz", hash = "sha256:cd73d3e740666d0e639f678adb176fad25c1bcbdae88d8d7b857e1783bb4212d"}, ] +[[package]] +name = "jmespath" +version = "1.0.1" +description = "JSON Matching Expressions" +optional = false +python-versions = ">=3.7" +files = [ + {file = "jmespath-1.0.1-py3-none-any.whl", hash = "sha256:02e2e4cc71b5bcab88332eebf907519190dd9e6e82107fa7f83b1003a6252980"}, + {file = "jmespath-1.0.1.tar.gz", hash = "sha256:90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe"}, +] + [[package]] name = "jsonschema" version = "4.23.0" @@ -866,7 +970,7 @@ referencing = ">=0.31.0" [[package]] name = "just-agents-coding" -version = "0.4.4" +version = "0.4.5" description = "Just Agents - Coding Components" optional = false python-versions = ">=3.10,<4.0" @@ -874,8 +978,8 @@ files = [] develop = true [package.dependencies] -just-agents-core = ">=0.4.3" -llm-sandbox = ">=0.1.4" +just-agents-core = ">=0.4.5" +llm-sandbox = ">=0.1.8" [package.source] type = "directory" @@ -883,7 +987,7 @@ url = "coding" [[package]] name = "just-agents-core" -version = "0.4.4" +version = "0.4.5" description = "Just Agents - Base Package" optional = false python-versions = ">=3.10,<4.0" @@ -903,7 +1007,7 @@ url = "core" [[package]] name = "just-agents-examples" -version = "0.4.4" +version = "0.4.5" description = "Just Agents - Examples code" optional = false python-versions = ">=3.10,<4.0" @@ -911,11 +1015,11 @@ files = [] develop = true [package.dependencies] -just-agents-coding = ">=0.4.3" -just-agents-core = ">=0.4.3" -just-agents-router = ">=0.4.3" -just-agents-tools = ">=0.4.3" -just-agents-web = ">=0.4.3" +just-agents-coding = ">=0.4.5" +just-agents-core = ">=0.4.5" +just-agents-router = ">=0.4.5" +just-agents-tools = ">=0.4.5" +just-agents-web = ">=0.4.5" [package.source] type = "directory" @@ -923,7 +1027,7 @@ url = "examples" [[package]] name = "just-agents-router" -version = "0.4.4" +version = "0.4.5" description = "Just Agents - Router Components" optional = false python-versions = ">=3.10,<4.0" @@ -931,7 +1035,7 @@ files = [] develop = true [package.dependencies] -just-agents-core = ">=0.4.3" +just-agents-core = ">=0.4.5" [package.source] type = "directory" @@ -939,7 +1043,7 @@ url = "router" [[package]] name = "just-agents-tools" -version = "0.4.4" +version = "0.4.5" description = "Just Agents - Tools Components" optional = false python-versions = ">=3.10,<4.0" @@ -947,7 +1051,7 @@ files = [] develop = true [package.dependencies] -just-agents-core = ">=0.4.3" +just-agents-core = ">=0.4.5" semanticscholar = ">=0.8.4" typer = ">=0.13.0" @@ -957,7 +1061,7 @@ url = "tools" [[package]] name = "just-agents-web" -version = "0.4.4" +version = "0.4.5" description = "Just Agents - Web. It allows runing openai API for the agent in the browser." optional = false python-versions = ">=3.10,<4.0" @@ -965,10 +1069,10 @@ files = [] develop = true [package.dependencies] -fastapi = "^0.115.5" -just-agents-core = ">=0.4.3" -loguru = "^0.7.2" -starlette = "^0.41.3" +fastapi = ">=0.115.6" +just-agents-core = ">=0.4.5" +pycomfort = ">=0.0.17" +uvicorn = ">=0.34.0" [package.source] type = "directory" @@ -976,13 +1080,13 @@ url = "web" [[package]] name = "litellm" -version = "1.56.4" +version = "1.57.0" 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.56.4-py3-none-any.whl", hash = "sha256:699a8db46f7de045069a77c435e13244b5fdaf5df1c8cb5e6ad675ef7e104ccd"}, - {file = "litellm-1.56.4.tar.gz", hash = "sha256:2808ca21878d200f7676a3d11e5bf2b5e3349ae504628f279cd7297c7dbd2038"}, + {file = "litellm-1.57.0-py3-none-any.whl", hash = "sha256:339aec6f3ecac2035bf6311aa8913ce587c9aca2dc7d72a63a210c659e9721ca"}, + {file = "litellm-1.57.0.tar.gz", hash = "sha256:53a6f2bd9575823e102f7d18dde5cbd2d48eed027cecbb585f18a208605b34c5"}, ] [package.dependencies] @@ -1018,24 +1122,6 @@ docker = ["docker (>=7.1.0,<8.0.0)"] k8s = ["kubernetes (>=30.1.0,<31.0.0)"] podman = ["podman (>=5.2.0,<6.0.0)"] -[[package]] -name = "loguru" -version = "0.7.3" -description = "Python logging made (stupidly) simple" -optional = false -python-versions = "<4.0,>=3.5" -files = [ - {file = "loguru-0.7.3-py3-none-any.whl", hash = "sha256:31a33c10c8e1e10422bfd431aeb5d351c7cf7fa671e3c4df004162264b28220c"}, - {file = "loguru-0.7.3.tar.gz", hash = "sha256:19480589e77d47b8d85b2c827ad95d49bf31b0dcde16593892eb51dd18706eb6"}, -] - -[package.dependencies] -colorama = {version = ">=0.3.4", markers = "sys_platform == \"win32\""} -win32-setctime = {version = ">=1.0.0", markers = "sys_platform == \"win32\""} - -[package.extras] -dev = ["Sphinx (==8.1.3)", "build (==1.2.2)", "colorama (==0.4.5)", "colorama (==0.4.6)", "exceptiongroup (==1.1.3)", "freezegun (==1.1.0)", "freezegun (==1.5.0)", "mypy (==v0.910)", "mypy (==v0.971)", "mypy (==v1.13.0)", "mypy (==v1.4.1)", "myst-parser (==4.0.0)", "pre-commit (==4.0.1)", "pytest (==6.1.2)", "pytest (==8.3.2)", "pytest-cov (==2.12.1)", "pytest-cov (==5.0.0)", "pytest-cov (==6.0.0)", "pytest-mypy-plugins (==1.9.3)", "pytest-mypy-plugins (==3.1.0)", "sphinx-rtd-theme (==3.0.2)", "tox (==3.27.1)", "tox (==4.23.2)", "twine (==6.0.1)"] - [[package]] name = "markdown-it-py" version = "3.0.0" @@ -1141,6 +1227,17 @@ files = [ {file = "mdurl-0.1.2.tar.gz", hash = "sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba"}, ] +[[package]] +name = "more-itertools" +version = "10.5.0" +description = "More routines for operating on iterables, beyond itertools" +optional = false +python-versions = ">=3.8" +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"}, +] + [[package]] name = "multidict" version = "6.1.0" @@ -1279,13 +1376,13 @@ test = ["matplotlib", "pytest", "pytest-cov"] [[package]] name = "openai" -version = "1.58.1" +version = "1.59.3" description = "The official Python library for the openai API" optional = false python-versions = ">=3.8" files = [ - {file = "openai-1.58.1-py3-none-any.whl", hash = "sha256:e2910b1170a6b7f88ef491ac3a42c387f08bd3db533411f7ee391d166571d63c"}, - {file = "openai-1.58.1.tar.gz", hash = "sha256:f5a035fd01e141fc743f4b0e02c41ca49be8fab0866d3b67f5f29b4f4d3c0973"}, + {file = "openai-1.59.3-py3-none-any.whl", hash = "sha256:b041887a0d8f3e70d1fc6ffbb2bf7661c3b9a2f3e806c04bf42f572b9ac7bc37"}, + {file = "openai-1.59.3.tar.gz", hash = "sha256:7f7fff9d8729968588edf1524e73266e8593bb6cab09298340efb755755bb66f"}, ] [package.dependencies] @@ -1302,6 +1399,90 @@ typing-extensions = ">=4.11,<5" datalib = ["numpy (>=1)", "pandas (>=1.2.3)", "pandas-stubs (>=1.1.0.11)"] realtime = ["websockets (>=13,<15)"] +[[package]] +name = "orjson" +version = "3.10.13" +description = "Fast, correct Python JSON library supporting dataclasses, datetimes, and numpy" +optional = false +python-versions = ">=3.8" +files = [ + {file = "orjson-3.10.13-cp310-cp310-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:1232c5e873a4d1638ef957c5564b4b0d6f2a6ab9e207a9b3de9de05a09d1d920"}, + {file = "orjson-3.10.13-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d26a0eca3035619fa366cbaf49af704c7cb1d4a0e6c79eced9f6a3f2437964b6"}, + {file = "orjson-3.10.13-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d4b6acd7c9c829895e50d385a357d4b8c3fafc19c5989da2bae11783b0fd4977"}, + {file = "orjson-3.10.13-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1884e53c6818686891cc6fc5a3a2540f2f35e8c76eac8dc3b40480fb59660b00"}, + {file = "orjson-3.10.13-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6a428afb5720f12892f64920acd2eeb4d996595bf168a26dd9190115dbf1130d"}, + {file = "orjson-3.10.13-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ba5b13b8739ce5b630c65cb1c85aedbd257bcc2b9c256b06ab2605209af75a2e"}, + {file = "orjson-3.10.13-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:cab83e67f6aabda1b45882254b2598b48b80ecc112968fc6483fa6dae609e9f0"}, + {file = "orjson-3.10.13-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:62c3cc00c7e776c71c6b7b9c48c5d2701d4c04e7d1d7cdee3572998ee6dc57cc"}, + {file = "orjson-3.10.13-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:dc03db4922e75bbc870b03fc49734cefbd50fe975e0878327d200022210b82d8"}, + {file = "orjson-3.10.13-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:22f1c9a30b43d14a041a6ea190d9eca8a6b80c4beb0e8b67602c82d30d6eec3e"}, + {file = "orjson-3.10.13-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:b42f56821c29e697c68d7d421410d7c1d8f064ae288b525af6a50cf99a4b1200"}, + {file = "orjson-3.10.13-cp310-cp310-win32.whl", hash = "sha256:0dbf3b97e52e093d7c3e93eb5eb5b31dc7535b33c2ad56872c83f0160f943487"}, + {file = "orjson-3.10.13-cp310-cp310-win_amd64.whl", hash = "sha256:46c249b4e934453be4ff2e518cd1adcd90467da7391c7a79eaf2fbb79c51e8c7"}, + {file = "orjson-3.10.13-cp311-cp311-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:a36c0d48d2f084c800763473020a12976996f1109e2fcb66cfea442fdf88047f"}, + {file = "orjson-3.10.13-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0065896f85d9497990731dfd4a9991a45b0a524baec42ef0a63c34630ee26fd6"}, + {file = "orjson-3.10.13-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:92b4ec30d6025a9dcdfe0df77063cbce238c08d0404471ed7a79f309364a3d19"}, + {file = "orjson-3.10.13-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a94542d12271c30044dadad1125ee060e7a2048b6c7034e432e116077e1d13d2"}, + {file = "orjson-3.10.13-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3723e137772639af8adb68230f2aa4bcb27c48b3335b1b1e2d49328fed5e244c"}, + {file = "orjson-3.10.13-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5f00c7fb18843bad2ac42dc1ce6dd214a083c53f1e324a0fd1c8137c6436269b"}, + {file = "orjson-3.10.13-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:0e2759d3172300b2f892dee85500b22fca5ac49e0c42cfff101aaf9c12ac9617"}, + {file = "orjson-3.10.13-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:ee948c6c01f6b337589c88f8e0bb11e78d32a15848b8b53d3f3b6fea48842c12"}, + {file = "orjson-3.10.13-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:aa6fe68f0981fba0d4bf9cdc666d297a7cdba0f1b380dcd075a9a3dd5649a69e"}, + {file = "orjson-3.10.13-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:dbcd7aad6bcff258f6896abfbc177d54d9b18149c4c561114f47ebfe74ae6bfd"}, + {file = "orjson-3.10.13-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:2149e2fcd084c3fd584881c7f9d7f9e5ad1e2e006609d8b80649655e0d52cd02"}, + {file = "orjson-3.10.13-cp311-cp311-win32.whl", hash = "sha256:89367767ed27b33c25c026696507c76e3d01958406f51d3a2239fe9e91959df2"}, + {file = "orjson-3.10.13-cp311-cp311-win_amd64.whl", hash = "sha256:dca1d20f1af0daff511f6e26a27354a424f0b5cf00e04280279316df0f604a6f"}, + {file = "orjson-3.10.13-cp312-cp312-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:a3614b00621c77f3f6487792238f9ed1dd8a42f2ec0e6540ee34c2d4e6db813a"}, + {file = "orjson-3.10.13-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9c976bad3996aa027cd3aef78aa57873f3c959b6c38719de9724b71bdc7bd14b"}, + {file = "orjson-3.10.13-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5f74d878d1efb97a930b8a9f9898890067707d683eb5c7e20730030ecb3fb930"}, + {file = "orjson-3.10.13-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:33ef84f7e9513fb13b3999c2a64b9ca9c8143f3da9722fbf9c9ce51ce0d8076e"}, + {file = "orjson-3.10.13-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dd2bcde107221bb9c2fa0c4aaba735a537225104173d7e19cf73f70b3126c993"}, + {file = "orjson-3.10.13-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:064b9dbb0217fd64a8d016a8929f2fae6f3312d55ab3036b00b1d17399ab2f3e"}, + {file = "orjson-3.10.13-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:c0044b0b8c85a565e7c3ce0a72acc5d35cda60793edf871ed94711e712cb637d"}, + {file = "orjson-3.10.13-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:7184f608ad563032e398f311910bc536e62b9fbdca2041be889afcbc39500de8"}, + {file = "orjson-3.10.13-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:d36f689e7e1b9b6fb39dbdebc16a6f07cbe994d3644fb1c22953020fc575935f"}, + {file = "orjson-3.10.13-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:54433e421618cd5873e51c0e9d0b9fb35f7bf76eb31c8eab20b3595bb713cd3d"}, + {file = "orjson-3.10.13-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:e1ba0c5857dd743438acecc1cd0e1adf83f0a81fee558e32b2b36f89e40cee8b"}, + {file = "orjson-3.10.13-cp312-cp312-win32.whl", hash = "sha256:a42b9fe4b0114b51eb5cdf9887d8c94447bc59df6dbb9c5884434eab947888d8"}, + {file = "orjson-3.10.13-cp312-cp312-win_amd64.whl", hash = "sha256:3a7df63076435f39ec024bdfeb4c9767ebe7b49abc4949068d61cf4857fa6d6c"}, + {file = "orjson-3.10.13-cp313-cp313-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:2cdaf8b028a976ebab837a2c27b82810f7fc76ed9fb243755ba650cc83d07730"}, + {file = "orjson-3.10.13-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:48a946796e390cbb803e069472de37f192b7a80f4ac82e16d6eb9909d9e39d56"}, + {file = "orjson-3.10.13-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1a7d64f1db5ecbc21eb83097e5236d6ab7e86092c1cd4c216c02533332951afc"}, + {file = "orjson-3.10.13-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:711878da48f89df194edd2ba603ad42e7afed74abcd2bac164685e7ec15f96de"}, + {file = "orjson-3.10.13-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:cf16f06cb77ce8baf844bc222dbcb03838f61d0abda2c3341400c2b7604e436e"}, + {file = "orjson-3.10.13-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:8257c3fb8dd7b0b446b5e87bf85a28e4071ac50f8c04b6ce2d38cb4abd7dff57"}, + {file = "orjson-3.10.13-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:d9c3a87abe6f849a4a7ac8a8a1dede6320a4303d5304006b90da7a3cd2b70d2c"}, + {file = "orjson-3.10.13-cp313-cp313-win32.whl", hash = "sha256:527afb6ddb0fa3fe02f5d9fba4920d9d95da58917826a9be93e0242da8abe94a"}, + {file = "orjson-3.10.13-cp313-cp313-win_amd64.whl", hash = "sha256:b5f7c298d4b935b222f52d6c7f2ba5eafb59d690d9a3840b7b5c5cda97f6ec5c"}, + {file = "orjson-3.10.13-cp38-cp38-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:e49333d1038bc03a25fdfe11c86360df9b890354bfe04215f1f54d030f33c342"}, + {file = "orjson-3.10.13-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:003721c72930dbb973f25c5d8e68d0f023d6ed138b14830cc94e57c6805a2eab"}, + {file = "orjson-3.10.13-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:63664bf12addb318dc8f032160e0f5dc17eb8471c93601e8f5e0d07f95003784"}, + {file = "orjson-3.10.13-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6066729cf9552d70de297b56556d14b4f49c8f638803ee3c90fd212fa43cc6af"}, + {file = "orjson-3.10.13-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8a1152e2761025c5d13b5e1908d4b1c57f3797ba662e485ae6f26e4e0c466388"}, + {file = "orjson-3.10.13-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:69b21d91c5c5ef8a201036d207b1adf3aa596b930b6ca3c71484dd11386cf6c3"}, + {file = "orjson-3.10.13-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b12a63f48bb53dba8453d36ca2661f2330126d54e26c1661e550b32864b28ce3"}, + {file = "orjson-3.10.13-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:a5a7624ab4d121c7e035708c8dd1f99c15ff155b69a1c0affc4d9d8b551281ba"}, + {file = "orjson-3.10.13-cp38-cp38-musllinux_1_2_armv7l.whl", hash = "sha256:0fee076134398d4e6cb827002468679ad402b22269510cf228301b787fdff5ae"}, + {file = "orjson-3.10.13-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:ae537fcf330b3947e82c6ae4271e092e6cf16b9bc2cef68b14ffd0df1fa8832a"}, + {file = "orjson-3.10.13-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:f81b26c03f5fb5f0d0ee48d83cea4d7bc5e67e420d209cc1a990f5d1c62f9be0"}, + {file = "orjson-3.10.13-cp38-cp38-win32.whl", hash = "sha256:0bc858086088b39dc622bc8219e73d3f246fb2bce70a6104abd04b3a080a66a8"}, + {file = "orjson-3.10.13-cp38-cp38-win_amd64.whl", hash = "sha256:3ca6f17467ebbd763f8862f1d89384a5051b461bb0e41074f583a0ebd7120e8e"}, + {file = "orjson-3.10.13-cp39-cp39-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:4a11532cbfc2f5752c37e84863ef8435b68b0e6d459b329933294f65fa4bda1a"}, + {file = "orjson-3.10.13-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c96d2fb80467d1d0dfc4d037b4e1c0f84f1fe6229aa7fea3f070083acef7f3d7"}, + {file = "orjson-3.10.13-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:dda4ba4d3e6f6c53b6b9c35266788053b61656a716a7fef5c884629c2a52e7aa"}, + {file = "orjson-3.10.13-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e4f998bbf300690be881772ee9c5281eb9c0044e295bcd4722504f5b5c6092ff"}, + {file = "orjson-3.10.13-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dce1cc42ed75b585c0c4dc5eb53a90a34ccb493c09a10750d1a1f9b9eff2bd12"}, + {file = "orjson-3.10.13-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:03b0f29d485411e3c13d79604b740b14e4e5fb58811743f6f4f9693ee6480a8f"}, + {file = "orjson-3.10.13-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:233aae4474078d82f425134bb6a10fb2b3fc5a1a1b3420c6463ddd1b6a97eda8"}, + {file = "orjson-3.10.13-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:e384e330a67cf52b3597ee2646de63407da6f8fc9e9beec3eaaaef5514c7a1c9"}, + {file = "orjson-3.10.13-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:4222881d0aab76224d7b003a8e5fdae4082e32c86768e0e8652de8afd6c4e2c1"}, + {file = "orjson-3.10.13-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:e400436950ba42110a20c50c80dff4946c8e3ec09abc1c9cf5473467e83fd1c5"}, + {file = "orjson-3.10.13-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:f47c9e7d224b86ffb086059cdcf634f4b3f32480f9838864aa09022fe2617ce2"}, + {file = "orjson-3.10.13-cp39-cp39-win32.whl", hash = "sha256:a9ecea472f3eb653e1c0a3d68085f031f18fc501ea392b98dcca3e87c24f9ebe"}, + {file = "orjson-3.10.13-cp39-cp39-win_amd64.whl", hash = "sha256:5385935a73adce85cc7faac9d396683fd813566d3857fa95a0b521ef84a5b588"}, + {file = "orjson-3.10.13.tar.gz", hash = "sha256:eb9bfb14ab8f68d9d9492d4817ae497788a15fd7da72e14dfabc289c3bb088ec"}, +] + [[package]] name = "packaging" version = "24.2" @@ -1419,6 +1600,26 @@ files = [ {file = "propcache-0.2.1.tar.gz", hash = "sha256:3f77ce728b19cb537714499928fe800c3dda29e8d9428778fc7c186da4c09a64"}, ] +[[package]] +name = "pycomfort" +version = "0.0.17" +description = "Python helper methods to make life easier" +optional = false +python-versions = "<4.0,>=3.10" +files = [ + {file = "pycomfort-0.0.17-py3-none-any.whl", hash = "sha256:9da8cde93898f5b4f185032af1732ddb3fc76842e18e8b4923fce0c63559e472"}, + {file = "pycomfort-0.0.17.tar.gz", hash = "sha256:31c890f88ebebb665fbeec6b8f8af17f5163d308897f9cfeb6158bb64bcd0606"}, +] + +[package.dependencies] +Deprecated = ">=1.2.15" +eliot = ">=1.16.0" +eliot-tree = ">=24.0.0" +more-itertools = ">=10.5.0" +pyfunctional = "<=1.5.0" +python-dotenv = "*" +typer = ">=0.15.1" + [[package]] name = "pydantic" version = "2.10.4" @@ -1551,20 +1752,79 @@ files = [ [package.dependencies] typing-extensions = ">=4.6.0,<4.7.0 || >4.7.0" +[[package]] +name = "pyfunctional" +version = "1.5.0" +description = "Package for creating data pipelines with chain functional programming" +optional = false +python-versions = ">=3.8.0,<4.0.0" +files = [ + {file = "pyfunctional-1.5.0-py3-none-any.whl", hash = "sha256:dfee0f4110f4167801bb12f8d497230793392f694655103b794460daefbebf2b"}, + {file = "pyfunctional-1.5.0.tar.gz", hash = "sha256:e184f3d7167e5822b227c95292c3557cf59edf258b1f06a08c8e82991de98769"}, +] + +[package.dependencies] +dill = ">=0.2.5" +tabulate = "<=1.0.0" + +[package.extras] +all = ["pandas (>=1.0.3)"] + [[package]] name = "pygments" -version = "2.18.0" +version = "2.19.1" description = "Pygments is a syntax highlighting package written in Python." optional = false python-versions = ">=3.8" files = [ - {file = "pygments-2.18.0-py3-none-any.whl", hash = "sha256:b8e6aca0523f3ab76fee51799c488e38782ac06eafcf95e7ba832985c8e7b13a"}, - {file = "pygments-2.18.0.tar.gz", hash = "sha256:786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199"}, + {file = "pygments-2.19.1-py3-none-any.whl", hash = "sha256:9ea1544ad55cecf4b8242fab6dd35a93bbce657034b0611ee383099054ab6d8c"}, + {file = "pygments-2.19.1.tar.gz", hash = "sha256:61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f"}, ] [package.extras] windows-terminal = ["colorama (>=0.4.6)"] +[[package]] +name = "pyrsistent" +version = "0.20.0" +description = "Persistent/Functional/Immutable data structures" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pyrsistent-0.20.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:8c3aba3e01235221e5b229a6c05f585f344734bd1ad42a8ac51493d74722bbce"}, + {file = "pyrsistent-0.20.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c1beb78af5423b879edaf23c5591ff292cf7c33979734c99aa66d5914ead880f"}, + {file = "pyrsistent-0.20.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:21cc459636983764e692b9eba7144cdd54fdec23ccdb1e8ba392a63666c60c34"}, + {file = "pyrsistent-0.20.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f5ac696f02b3fc01a710427585c855f65cd9c640e14f52abe52020722bb4906b"}, + {file = "pyrsistent-0.20.0-cp310-cp310-win32.whl", hash = "sha256:0724c506cd8b63c69c7f883cc233aac948c1ea946ea95996ad8b1380c25e1d3f"}, + {file = "pyrsistent-0.20.0-cp310-cp310-win_amd64.whl", hash = "sha256:8441cf9616d642c475684d6cf2520dd24812e996ba9af15e606df5f6fd9d04a7"}, + {file = "pyrsistent-0.20.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:0f3b1bcaa1f0629c978b355a7c37acd58907390149b7311b5db1b37648eb6958"}, + {file = "pyrsistent-0.20.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5cdd7ef1ea7a491ae70d826b6cc64868de09a1d5ff9ef8d574250d0940e275b8"}, + {file = "pyrsistent-0.20.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cae40a9e3ce178415040a0383f00e8d68b569e97f31928a3a8ad37e3fde6df6a"}, + {file = "pyrsistent-0.20.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6288b3fa6622ad8a91e6eb759cfc48ff3089e7c17fb1d4c59a919769314af224"}, + {file = "pyrsistent-0.20.0-cp311-cp311-win32.whl", hash = "sha256:7d29c23bdf6e5438c755b941cef867ec2a4a172ceb9f50553b6ed70d50dfd656"}, + {file = "pyrsistent-0.20.0-cp311-cp311-win_amd64.whl", hash = "sha256:59a89bccd615551391f3237e00006a26bcf98a4d18623a19909a2c48b8e986ee"}, + {file = "pyrsistent-0.20.0-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:09848306523a3aba463c4b49493a760e7a6ca52e4826aa100ee99d8d39b7ad1e"}, + {file = "pyrsistent-0.20.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a14798c3005ec892bbada26485c2eea3b54109cb2533713e355c806891f63c5e"}, + {file = "pyrsistent-0.20.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b14decb628fac50db5e02ee5a35a9c0772d20277824cfe845c8a8b717c15daa3"}, + {file = "pyrsistent-0.20.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2e2c116cc804d9b09ce9814d17df5edf1df0c624aba3b43bc1ad90411487036d"}, + {file = "pyrsistent-0.20.0-cp312-cp312-win32.whl", hash = "sha256:e78d0c7c1e99a4a45c99143900ea0546025e41bb59ebc10182e947cf1ece9174"}, + {file = "pyrsistent-0.20.0-cp312-cp312-win_amd64.whl", hash = "sha256:4021a7f963d88ccd15b523787d18ed5e5269ce57aa4037146a2377ff607ae87d"}, + {file = "pyrsistent-0.20.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:79ed12ba79935adaac1664fd7e0e585a22caa539dfc9b7c7c6d5ebf91fb89054"}, + {file = "pyrsistent-0.20.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f920385a11207dc372a028b3f1e1038bb244b3ec38d448e6d8e43c6b3ba20e98"}, + {file = "pyrsistent-0.20.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4f5c2d012671b7391803263419e31b5c7c21e7c95c8760d7fc35602353dee714"}, + {file = "pyrsistent-0.20.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ef3992833fbd686ee783590639f4b8343a57f1f75de8633749d984dc0eb16c86"}, + {file = "pyrsistent-0.20.0-cp38-cp38-win32.whl", hash = "sha256:881bbea27bbd32d37eb24dd320a5e745a2a5b092a17f6debc1349252fac85423"}, + {file = "pyrsistent-0.20.0-cp38-cp38-win_amd64.whl", hash = "sha256:6d270ec9dd33cdb13f4d62c95c1a5a50e6b7cdd86302b494217137f760495b9d"}, + {file = "pyrsistent-0.20.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:ca52d1ceae015859d16aded12584c59eb3825f7b50c6cfd621d4231a6cc624ce"}, + {file = "pyrsistent-0.20.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b318ca24db0f0518630e8b6f3831e9cba78f099ed5c1d65ffe3e023003043ba0"}, + {file = "pyrsistent-0.20.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fed2c3216a605dc9a6ea50c7e84c82906e3684c4e80d2908208f662a6cbf9022"}, + {file = "pyrsistent-0.20.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2e14c95c16211d166f59c6611533d0dacce2e25de0f76e4c140fde250997b3ca"}, + {file = "pyrsistent-0.20.0-cp39-cp39-win32.whl", hash = "sha256:f058a615031eea4ef94ead6456f5ec2026c19fb5bd6bfe86e9665c4158cf802f"}, + {file = "pyrsistent-0.20.0-cp39-cp39-win_amd64.whl", hash = "sha256:58b8f6366e152092194ae68fefe18b9f0b4f89227dfd86a07770c3d86097aebf"}, + {file = "pyrsistent-0.20.0-py3-none-any.whl", hash = "sha256:c55acc4733aad6560a7f5f818466631f07efc001fd023f34a6c203f8b6df0f0b"}, + {file = "pyrsistent-0.20.0.tar.gz", hash = "sha256:4c48f78f62ab596c679086084d0dd13254ae4f3d6c72a83ffdf5ebdef8f265a4"}, +] + [[package]] name = "pytest" version = "7.4.4" @@ -1949,6 +2209,26 @@ httpx = "*" nest_asyncio = "*" tenacity = "*" +[[package]] +name = "setuptools" +version = "75.7.0" +description = "Easily download, build, install, upgrade, and uninstall Python packages" +optional = false +python-versions = ">=3.9" +files = [ + {file = "setuptools-75.7.0-py3-none-any.whl", hash = "sha256:84fb203f278ebcf5cd08f97d3fb96d3fbed4b629d500b29ad60d11e00769b183"}, + {file = "setuptools-75.7.0.tar.gz", hash = "sha256:886ff7b16cd342f1d1defc16fc98c9ce3fde69e087a4e1983d7ab634e5f41f4f"}, +] + +[package.extras] +check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1)", "ruff (>=0.8.0)"] +core = ["importlib_metadata (>=6)", "jaraco.collections", "jaraco.functools (>=4)", "jaraco.text (>=3.7)", "more_itertools", "more_itertools (>=8.8)", "packaging", "packaging (>=24.2)", "platformdirs (>=4.2.2)", "tomli (>=2.0.1)", "wheel (>=0.43.0)"] +cover = ["pytest-cov"] +doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "pyproject-hooks (!=1.1)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier", "towncrier (<24.7)"] +enabler = ["pytest-enabler (>=2.2)"] +test = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "ini2toml[lite] (>=0.14)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.7.2)", "jaraco.test (>=5.5)", "packaging (>=24.2)", "pip (>=19.1)", "pyproject-hooks (!=1.1)", "pytest (>=6,!=8.1.*)", "pytest-home (>=0.5)", "pytest-perf", "pytest-subprocess", "pytest-timeout", "pytest-xdist (>=3)", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel (>=0.44.0)"] +type = ["importlib_metadata (>=7.0.2)", "jaraco.develop (>=7.21)", "mypy (==1.14.*)", "pytest-mypy"] + [[package]] name = "shellingham" version = "1.5.4" @@ -1960,6 +2240,17 @@ files = [ {file = "shellingham-1.5.4.tar.gz", hash = "sha256:8dbca0739d487e5bd35ab3ca4b36e11c4078f3a234bfce294b0a0291363404de"}, ] +[[package]] +name = "six" +version = "1.17.0" +description = "Python 2 and 3 compatibility utilities" +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" +files = [ + {file = "six-1.17.0-py2.py3-none-any.whl", hash = "sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274"}, + {file = "six-1.17.0.tar.gz", hash = "sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81"}, +] + [[package]] name = "sniffio" version = "1.3.1" @@ -2277,6 +2568,17 @@ files = [ {file = "tomli-2.2.1.tar.gz", hash = "sha256:cd45e1dc79c835ce60f7404ec8119f2eb06d38b1deba146f07ced3bbc44505ff"}, ] +[[package]] +name = "toolz" +version = "1.0.0" +description = "List processing tools and functional utilities" +optional = false +python-versions = ">=3.8" +files = [ + {file = "toolz-1.0.0-py3-none-any.whl", hash = "sha256:292c8f1c4e7516bf9086f8850935c799a874039c8bcf959d47b600e4c44a6236"}, + {file = "toolz-1.0.0.tar.gz", hash = "sha256:2c86e3d9a04798ac556793bced838816296a2f085017664e4995cb40a1047a02"}, +] + [[package]] name = "tqdm" version = "4.67.1" @@ -2344,18 +2646,33 @@ socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] zstd = ["zstandard (>=0.18.0)"] [[package]] -name = "win32-setctime" -version = "1.2.0" -description = "A small Python utility to set file creation time on Windows" +name = "uvicorn" +version = "0.34.0" +description = "The lightning-fast ASGI server." optional = false -python-versions = ">=3.5" +python-versions = ">=3.9" files = [ - {file = "win32_setctime-1.2.0-py3-none-any.whl", hash = "sha256:95d644c4e708aba81dc3704a116d8cbc974d70b3bdb8be1d150e36be6e9d1390"}, - {file = "win32_setctime-1.2.0.tar.gz", hash = "sha256:ae1fdf948f5640aae05c511ade119313fb6a30d7eabe25fef9764dca5873c4c0"}, + {file = "uvicorn-0.34.0-py3-none-any.whl", hash = "sha256:023dc038422502fa28a09c7a30bf2b6991512da7dcdb8fd35fe57cfc154126f4"}, + {file = "uvicorn-0.34.0.tar.gz", hash = "sha256:404051050cd7e905de2c9a7e61790943440b3416f49cb409f965d9dcd0fa73e9"}, ] +[package.dependencies] +click = ">=7.0" +h11 = ">=0.8" +typing-extensions = {version = ">=4.0", markers = "python_version < \"3.11\""} + [package.extras] -dev = ["black (>=19.3b0)", "pytest (>=4.6.2)"] +standard = ["colorama (>=0.4)", "httptools (>=0.6.3)", "python-dotenv (>=0.13)", "pyyaml (>=5.1)", "uvloop (>=0.14.0,!=0.15.0,!=0.15.1)", "watchfiles (>=0.13)", "websockets (>=10.4)"] + +[[package]] +name = "win-unicode-console" +version = "0.5" +description = "Enable Unicode input and display when running Python from Windows console." +optional = false +python-versions = "*" +files = [ + {file = "win_unicode_console-0.5.zip", hash = "sha256:d4142d4d56d46f449d6f00536a73625a871cba040f0bc1a2e305a04578f07d1e"}, +] [[package]] name = "wrapt" @@ -2546,7 +2863,61 @@ enabler = ["pytest-enabler (>=2.2)"] test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more-itertools", "pytest (>=6,!=8.1.*)", "pytest-ignore-flaky"] type = ["pytest-mypy"] +[[package]] +name = "zope-interface" +version = "7.2" +description = "Interfaces for Python" +optional = false +python-versions = ">=3.8" +files = [ + {file = "zope.interface-7.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ce290e62229964715f1011c3dbeab7a4a1e4971fd6f31324c4519464473ef9f2"}, + {file = "zope.interface-7.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:05b910a5afe03256b58ab2ba6288960a2892dfeef01336dc4be6f1b9ed02ab0a"}, + {file = "zope.interface-7.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:550f1c6588ecc368c9ce13c44a49b8d6b6f3ca7588873c679bd8fd88a1b557b6"}, + {file = "zope.interface-7.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0ef9e2f865721553c6f22a9ff97da0f0216c074bd02b25cf0d3af60ea4d6931d"}, + {file = "zope.interface-7.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:27f926f0dcb058211a3bb3e0e501c69759613b17a553788b2caeb991bed3b61d"}, + {file = "zope.interface-7.2-cp310-cp310-win_amd64.whl", hash = "sha256:144964649eba4c5e4410bb0ee290d338e78f179cdbfd15813de1a664e7649b3b"}, + {file = "zope.interface-7.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:1909f52a00c8c3dcab6c4fad5d13de2285a4b3c7be063b239b8dc15ddfb73bd2"}, + {file = "zope.interface-7.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:80ecf2451596f19fd607bb09953f426588fc1e79e93f5968ecf3367550396b22"}, + {file = "zope.interface-7.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:033b3923b63474800b04cba480b70f6e6243a62208071fc148354f3f89cc01b7"}, + {file = "zope.interface-7.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a102424e28c6b47c67923a1f337ede4a4c2bba3965b01cf707978a801fc7442c"}, + {file = "zope.interface-7.2-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:25e6a61dcb184453bb00eafa733169ab6d903e46f5c2ace4ad275386f9ab327a"}, + {file = "zope.interface-7.2-cp311-cp311-win_amd64.whl", hash = "sha256:3f6771d1647b1fc543d37640b45c06b34832a943c80d1db214a37c31161a93f1"}, + {file = "zope.interface-7.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:086ee2f51eaef1e4a52bd7d3111a0404081dadae87f84c0ad4ce2649d4f708b7"}, + {file = "zope.interface-7.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:21328fcc9d5b80768bf051faa35ab98fb979080c18e6f84ab3f27ce703bce465"}, + {file = "zope.interface-7.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f6dd02ec01f4468da0f234da9d9c8545c5412fef80bc590cc51d8dd084138a89"}, + {file = "zope.interface-7.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8e7da17f53e25d1a3bde5da4601e026adc9e8071f9f6f936d0fe3fe84ace6d54"}, + {file = "zope.interface-7.2-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cab15ff4832580aa440dc9790b8a6128abd0b88b7ee4dd56abacbc52f212209d"}, + {file = "zope.interface-7.2-cp312-cp312-win_amd64.whl", hash = "sha256:29caad142a2355ce7cfea48725aa8bcf0067e2b5cc63fcf5cd9f97ad12d6afb5"}, + {file = "zope.interface-7.2-cp313-cp313-macosx_10_9_x86_64.whl", hash = "sha256:3e0350b51e88658d5ad126c6a57502b19d5f559f6cb0a628e3dc90442b53dd98"}, + {file = "zope.interface-7.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:15398c000c094b8855d7d74f4fdc9e73aa02d4d0d5c775acdef98cdb1119768d"}, + {file = "zope.interface-7.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:802176a9f99bd8cc276dcd3b8512808716492f6f557c11196d42e26c01a69a4c"}, + {file = "zope.interface-7.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:eb23f58a446a7f09db85eda09521a498e109f137b85fb278edb2e34841055398"}, + {file = "zope.interface-7.2-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a71a5b541078d0ebe373a81a3b7e71432c61d12e660f1d67896ca62d9628045b"}, + {file = "zope.interface-7.2-cp313-cp313-win_amd64.whl", hash = "sha256:4893395d5dd2ba655c38ceb13014fd65667740f09fa5bb01caa1e6284e48c0cd"}, + {file = "zope.interface-7.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d3a8ffec2a50d8ec470143ea3d15c0c52d73df882eef92de7537e8ce13475e8a"}, + {file = "zope.interface-7.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:31d06db13a30303c08d61d5fb32154be51dfcbdb8438d2374ae27b4e069aac40"}, + {file = "zope.interface-7.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e204937f67b28d2dca73ca936d3039a144a081fc47a07598d44854ea2a106239"}, + {file = "zope.interface-7.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:224b7b0314f919e751f2bca17d15aad00ddbb1eadf1cb0190fa8175edb7ede62"}, + {file = "zope.interface-7.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:baf95683cde5bc7d0e12d8e7588a3eb754d7c4fa714548adcd96bdf90169f021"}, + {file = "zope.interface-7.2-cp38-cp38-win_amd64.whl", hash = "sha256:7dc5016e0133c1a1ec212fc87a4f7e7e562054549a99c73c8896fa3a9e80cbc7"}, + {file = "zope.interface-7.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:7bd449c306ba006c65799ea7912adbbfed071089461a19091a228998b82b1fdb"}, + {file = "zope.interface-7.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a19a6cc9c6ce4b1e7e3d319a473cf0ee989cbbe2b39201d7c19e214d2dfb80c7"}, + {file = "zope.interface-7.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:72cd1790b48c16db85d51fbbd12d20949d7339ad84fd971427cf00d990c1f137"}, + {file = "zope.interface-7.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:52e446f9955195440e787596dccd1411f543743c359eeb26e9b2c02b077b0519"}, + {file = "zope.interface-7.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2ad9913fd858274db8dd867012ebe544ef18d218f6f7d1e3c3e6d98000f14b75"}, + {file = "zope.interface-7.2-cp39-cp39-win_amd64.whl", hash = "sha256:1090c60116b3da3bfdd0c03406e2f14a1ff53e5771aebe33fec1edc0a350175d"}, + {file = "zope.interface-7.2.tar.gz", hash = "sha256:8b49f1a3d1ee4cdaf5b32d2e738362c7f5e40ac8b46dd7d1a65e82a4872728fe"}, +] + +[package.dependencies] +setuptools = "*" + +[package.extras] +docs = ["Sphinx", "furo", "repoze.sphinx.autointerface"] +test = ["coverage[toml]", "zope.event", "zope.testing"] +testing = ["coverage[toml]", "zope.event", "zope.testing"] + [metadata] lock-version = "2.0" python-versions = ">=3.10,<4.0" -content-hash = "a506974e36501204baaf4c20320c88df1ed69ab96a646d8a7ef3d67870d8ccda" +content-hash = "9a36c178676d7ac4e458ed10e31505e21e78857dfe03a6684527f9a3adee0aa6" diff --git a/pyproject.toml b/pyproject.toml index 2be3d91..992e1f3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "just-agents" -version = "0.4.4" +version = "0.4.5" description = "Just Agents - A lightweight, straightforward library for LLM agents that focuses on simplicity over unnecessary abstractions." authors = [ "Alex Karmazin ", @@ -14,11 +14,10 @@ maintainers = [ readme = "README.md" license = "MIT" keywords = ["python", "llm", "agents", "AI", "machine-learning"] -package-mode = false +packages = [{include = "just_agents"}] [tool.poetry.dependencies] python = ">=3.10,<4.0" -llm-sandbox = ">=0.1.4" just-agents-core = { path = "core", develop = true } just-agents-tools = { path = "tools", develop = true } just-agents-coding = { path = "coding", develop = true } @@ -27,12 +26,12 @@ just-agents-router = { path = "router", develop = true } just-agents-examples = { path = "examples", develop = true } [tool.poetry.group.publish.dependencies] -just-agents-core = "0.4.4" -just-agents-tools = "0.4.4" -just-agents-coding = "0.4.4" -just-agents-web = "0.4.4" -just-agents-router = "0.4.4" -just-agents-examples = "0.4.4" +just-agents-core = "0.4.5" +just-agents-tools = "0.4.5" +just-agents-coding = "0.4.5" +just-agents-web = "0.4.5" +just-agents-router = "0.4.5" +just-agents-examples = "0.4.5" [tool.poetry.group.dev.dependencies] pytest = "^7.4.4" diff --git a/pyproject.toml.bak b/pyproject.toml.bak new file mode 100644 index 0000000..6f5101e --- /dev/null +++ b/pyproject.toml.bak @@ -0,0 +1,42 @@ +[tool.poetry] +name = "just-agents" +version = "0.4.5" +description = "Just Agents - A lightweight, straightforward library for LLM agents that focuses on simplicity over unnecessary abstractions." +authors = [ + "Alex Karmazin ", + "Newton Winter ", + "Anton Kulaga " +] +maintainers = [ + "Anton Kulaga ", + "Newton Winter " +] +readme = "README.md" +license = "MIT" +keywords = ["python", "llm", "agents", "AI", "machine-learning"] +package-mode = false + +[tool.poetry.dependencies] +python = ">=3.10,<4.0" +just-agents-core = { path = "core", develop = true } +just-agents-tools = { path = "tools", develop = true } +just-agents-coding = { path = "coding", develop = true } +just-agents-web = { path = "web", develop = true } +just-agents-router = { path = "router", develop = true } +just-agents-examples = { path = "examples", develop = true } + +[tool.poetry.group.publish.dependencies] +just-agents-core = "0.4.5" +just-agents-tools = "0.4.5" +just-agents-coding = "0.4.5" +just-agents-web = "0.4.5" +just-agents-router = "0.4.5" +just-agents-examples = "0.4.5" + +[tool.poetry.group.dev.dependencies] +pytest = "^7.4.4" +python-dotenv = "*" + +[build-system] +requires = ["poetry-core"] +build-backend = "poetry.core.masonry.api" \ No newline at end of file diff --git a/router/pyproject.toml b/router/pyproject.toml index 863388d..5b964bd 100644 --- a/router/pyproject.toml +++ b/router/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "just-agents-router" -version = "0.4.4" +version = "0.4.5" 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.3" +just-agents-core = ">=0.4.5" [tool.poetry.group.dev.dependencies] pytest = "^7.4.4" diff --git a/tools/pyproject.toml b/tools/pyproject.toml index 2be1fd9..55fa079 100644 --- a/tools/pyproject.toml +++ b/tools/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "just-agents-tools" -version = "0.4.4" +version = "0.4.5" 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.3" +just-agents-core = ">=0.4.5" semanticscholar = ">=0.8.4" typer = ">=0.13.0" diff --git a/web/just_agents/web/rest_api.py b/web/just_agents/web/rest_api.py new file mode 100644 index 0000000..3b1e193 --- /dev/null +++ b/web/just_agents/web/rest_api.py @@ -0,0 +1,136 @@ +import time +from pathlib import Path +from typing import Optional, List, Dict, Any, Union +from fastapi import FastAPI +from just_agents.base_agent import BaseAgent +from just_agents.interfaces.agent import IAgent +from starlette.responses import StreamingResponse +from dotenv import load_dotenv +from fastapi.middleware.cors import CORSMiddleware +import loguru +import yaml +import os + + +class AgentRestAPI(FastAPI): + + def __init__( + self, + *, + agent_config: Optional[Path | str] = None, + agent_section: Optional[str] = None, + agent_parent_section: Optional[str] = None, + debug: bool = False, + title: str = "Just-Agent endpoint", + description: str = "OpenAI-compatible API endpoint for Just-Agents", + version: str = "1.0.0", + openapi_url: str = "/openapi.json", + openapi_tags: Optional[List[Dict[str, Any]]] = None, + servers: Optional[List[Dict[str, Union[str, Any]]]] = None, + docs_url: str = "/docs", + 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 + ) -> None: + """Initialize the AgentRestAPI with FastAPI parameters. + + Args: + debug: Enable debug mode + title: API title shown in documentation + description: API description shown in documentation + version: API version + openapi_url: URL for OpenAPI schema + openapi_tags: List of tags to be included in the OpenAPI schema + servers: List of servers to be included in the OpenAPI schema + docs_url: URL for API documentation + redoc_url: URL for ReDoc documentation + terms_of_service: URL to the terms of service + contact: Contact information in the OpenAPI schema + license_info: License information in the OpenAPI schema + """ + super().__init__( + debug=debug, + title=title, + description=description, + version=version, + openapi_url=openapi_url, + openapi_tags=openapi_tags, + servers=servers, + docs_url=docs_url, + redoc_url=redoc_url, + terms_of_service=terms_of_service, + contact=contact, + license_info=license_info + ) + + load_dotenv(override=True) + + self._agent_related_config(agent_config, agent_section, agent_parent_section) + self._routes_config() + + def _agent_related_config(self, agent_config: Path | str, agent_section: Optional[str] = None, agent_parent_section: Optional[str] = None): + if agent_config is None: + # Load from environment variable or use default + agent_config = os.getenv('AGENT_CONFIG_PATH', 'agent_profiles.yaml') + + self.agent = BaseAgent.from_yaml(file_path=agent_config, section_name=agent_section, parent_section=agent_parent_section) + + + + def _routes_config(self): + # Add CORS middleware + self.add_middleware( + CORSMiddleware, + allow_origins=["*"], + allow_credentials=True, + allow_methods=["*"], + allow_headers=["*"], + ) + # Register routes + self.get("/")(self.default) + self.post("/v1/chat/completions")(self.chat_completions) + + + def _clean_messages(self, request: dict): + for message in request["messages"]: + if message["role"] == "user": + content = message["content"] + if type(content) is list: + if len(content) > 0: + if type(content[0]) is dict: + if content[0].get("type", "") == "text": + if type(content[0].get("text", None)) is str: + message["content"] = content[0]["text"] + + + def _remove_system_prompt(self, request: dict): + if request["messages"][0]["role"] == "system": + request["messages"] = request["messages"][1:] + + def default(self): + return f"This is default page for the {self.title}" + + def chat_completions(self, request: dict): + try: + loguru.logger.debug(request) + self._clean_messages(request) + self._remove_system_prompt(request) + if request["messages"]: + if request.get("stream") and str(request.get("stream")).lower() != "false": + return StreamingResponse( + self.agent.stream(request["messages"]), media_type="application/x-ndjson" + ) + resp_content = self.agent.query(request["messages"]) + else: + resp_content = "Something goes wrong, request did not contain messages!!!" + except Exception as e: + loguru.logger.error(str(e)) + resp_content = str(e) + return { + "id": "1", + "object": "chat.completion", + "created": time.time(), + "model": request["model"], + "choices": [{"message": {"role": "assistant", "content": resp_content}}], + } diff --git a/web/just_agents/web/run.py b/web/just_agents/web/run.py new file mode 100644 index 0000000..9c7f994 --- /dev/null +++ b/web/just_agents/web/run.py @@ -0,0 +1,66 @@ +from pathlib import Path +from typing import Optional +from just_agents.web.rest_api import AgentRestAPI +import uvicorn +import typer + +app = typer.Typer() + +def run_server( + config: Path, + host: str = "0.0.0.0", + port: int = 8088, + workers: int = 1, + title: str = "Just-Agent endpoint", + agent_section: Optional[str] = None, + agent_parent_section: Optional[str] = None +) -> None: + """ + Run the FastAPI server with the given configuration. + + Args: + config_path: Path to the YAML configuration file + host: Host to bind the server to + port: Port to run the server on + workers: Number of worker processes + title: Title for the API endpoint + agent_section: Optional section name in the config file + agent_parent_section: Optional parent section name in the config file + """ + api = AgentRestAPI( + agent_config=config, + title=title, + agent_section=agent_section, + agent_parent_section=agent_parent_section + ) + + uvicorn.run( + api, + host=host, + port=port, + workers=workers + ) + +@app.command() +def run_server_command( + config: Path = typer.Option(help="Path to the YAML configuration file"), #typer.Argument(..., help="Path to the YAML configuration file"), + host: str = typer.Option("0.0.0.0", help="Host to bind the server to"), + port: int = typer.Option(8088, help="Port to run the server on"), + 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") +) -> None: + """Run the FastAPI server with the given configuration.""" + run_server( + config=config, + host=host, + port=port, + workers=workers, + title=title, + section=section, + parent_section=parent_section + ) + +if __name__ == "__main__": + app() \ No newline at end of file diff --git a/web/just_agents/web/web.py b/web/just_agents/web/web.py deleted file mode 100644 index 31fb9c8..0000000 --- a/web/just_agents/web/web.py +++ /dev/null @@ -1,131 +0,0 @@ -import time -from pathlib import Path -from fastapi import FastAPI -from just_agents.interfaces.agent import IAgent -from just_agents.simple.utils import build_agent -from starlette.responses import StreamingResponse -from dotenv import load_dotenv -from fastapi.middleware.cors import CORSMiddleware -import loguru -import yaml - - -""" -Module that can wrap the agent into OpenAI API endpoint -""" - -def clean_messages(request: dict): - for message in request["messages"]: - if message["role"] == "user": - content = message["content"] - if type(content) is list: - if len(content) > 0: - if type(content[0]) is dict: - if content[0].get("type", "") == "text": - if type(content[0].get("text", None)) is str: - message["content"] = content[0]["text"] - - -def remove_system_prompt(request: dict): - if request["messages"][0]["role"] == "system": - request["messages"] = request["messages"][1:] - - -def get_agent(request): - with open("endpoint_options.yaml") as f: - agent_schema = yaml.full_load(f).get(request["model"]) - - return build_agent(agent_schema) - - - -def create_app(config_path: Path, title: str = "Just-Agent endpoint") -> FastAPI: - """ - Create and configure the FastAPI application with the given config path. - - Args: - config_path: Path to the YAML configuration file (str or Path object) - title: Title for the API endpoint (defaults to "Just-Agent endpoint") - - Returns: - FastAPI: Configured FastAPI application - """ - app = FastAPI(title=title) - - load_dotenv(override=True) - - # Verify config file exists - if not config_path.exists(): - raise FileNotFoundError(f"Configuration file not found: {str(config_path)}") - - app.add_middleware( - CORSMiddleware, - allow_origins=["*"], - allow_credentials=True, - allow_methods=["*"], - allow_headers=["*"], - ) - - # Move the config loading here so it's available throughout the app lifetime - with config_path.open() as f: - agent_config = yaml.full_load(f) - - def get_agent(request): - return build_agent(agent_config.get(request["model"])) - - # ... existing clean_messages and remove_system_prompt functions ... - - @app.get("/") - def default(): - return f"This is default page for the {title}" - - @app.post("/v1/chat/completions") - def chat_completions(request: dict): - try: - loguru.logger.debug(request) - agent: IAgent = get_agent(request) - clean_messages(request) - remove_system_prompt(request) - if request["messages"]: - if request.get("stream") and str(request.get("stream")).lower() != "false": - return StreamingResponse( - agent.stream(request["messages"]), media_type="application/x-ndjson" - ) - resp_content = agent.query(request["messages"]) - else: - resp_content = "Something goes wrong, request did not contain messages!!!" - except Exception as e: - loguru.logger.error(str(e)) - resp_content = str(e) - return { - "id": "1", - "object": "chat.completion", - "created": time.time(), - "model": request["model"], - "choices": [{"message": {"role": "assistant", "content": resp_content}}], - } - - return app - -def run_server(config_path: Path, host: str = "0.0.0.0", port: int = 8088, workers: int = 10): - """ - Run the FastAPI server with the given configuration. - - Args: - config_path: Path to the YAML configuration file (str or Path object) - host: Host to bind the server to - port: Port to run the server on - workers: Number of worker processes - """ - import uvicorn - app = create_app(config_path) - return uvicorn.run(app, host=host, port=port) - """TODO: to let workers work we need to have something like this: - return uvicorn.run( - "just_agents_web.web:create_app(config_path)", - host=host, - port=port, - workers=workers, - factory=True - ) - """ \ No newline at end of file diff --git a/web/pyproject.toml b/web/pyproject.toml index a345c05..20327bc 100644 --- a/web/pyproject.toml +++ b/web/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] -name = "just_agents_web" -version = "0.4.4" +name = "just-agents-web" +version = "0.4.5" description = "Just Agents - Web. It allows runing openai API for the agent in the browser." authors = [ "Alex Karmazin ", @@ -29,8 +29,8 @@ classifiers = [ ] [tool.poetry.dependencies] python = ">=3.10,<4.0" -"just-agents-core" = ">=0.4.3" -loguru = "^0.7.2" -fastapi = "^0.115.5" -starlette = "^0.41.3" +just-agents-core = ">=0.4.5" +pycomfort = ">=0.0.17" +fastapi = ">=0.115.6" +uvicorn = ">=0.34.0" [tool.poetry.group.dev.dependencies] \ No newline at end of file