From a5f61caae9516c8bc38911293cb2e20230f28f23 Mon Sep 17 00:00:00 2001 From: Graham Neubig Date: Sun, 28 Apr 2024 20:56:23 -0400 Subject: [PATCH] Add actions for github push and send PR (#1415) * Added a push action * Tests * Add tests * Fix capitalization * Update * Fix typo * Fix integration tests * Added poetry.lock * Set lock * Fix action parsing * Update integration test output * Updated prompt * Update integration test * Add github token to default config --------- Co-authored-by: Engel Nyst --- agenthub/dummy_agent/__init__.py | 0 agenthub/dummy_agent/agent.py | 21 + agenthub/monologue_agent/agent.py | 34 +- agenthub/monologue_agent/utils/prompts.py | 6 +- docs/Agents.md | 2 + opendevin/action/__init__.py | 2 + opendevin/action/github.py | 158 +++++++ opendevin/config.py | 1 + opendevin/schema/action.py | 6 + opendevin/schema/config.py | 1 + poetry.lock | 399 ++++++++--------- pyproject.toml | 3 +- .../test_write_simple_script/prompt_001.log | 35 +- .../test_write_simple_script/prompt_002.log | 35 +- .../test_write_simple_script/prompt_003.log | 49 ++- .../test_write_simple_script/prompt_004.log | 59 ++- .../test_write_simple_script/prompt_005.log | 65 ++- .../test_write_simple_script/prompt_006.log | 402 ------------------ .../test_write_simple_script/response_001.log | 2 - .../test_write_simple_script/response_002.log | 5 +- .../test_write_simple_script/response_003.log | 7 +- .../test_write_simple_script/response_004.log | 2 +- .../test_write_simple_script/response_005.log | 7 +- .../test_write_simple_script/response_006.log | 6 - tests/unit/test_action_github.py | 127 ++++++ tests/unit/test_action_serialization.py | 9 + 26 files changed, 774 insertions(+), 669 deletions(-) create mode 100644 agenthub/dummy_agent/__init__.py create mode 100644 agenthub/dummy_agent/agent.py create mode 100644 opendevin/action/github.py delete mode 100644 tests/integration/mock/MonologueAgent/test_write_simple_script/prompt_006.log delete mode 100644 tests/integration/mock/MonologueAgent/test_write_simple_script/response_006.log create mode 100644 tests/unit/test_action_github.py diff --git a/agenthub/dummy_agent/__init__.py b/agenthub/dummy_agent/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/agenthub/dummy_agent/agent.py b/agenthub/dummy_agent/agent.py new file mode 100644 index 0000000000..f1cd85cb3c --- /dev/null +++ b/agenthub/dummy_agent/agent.py @@ -0,0 +1,21 @@ +"""Module for a Dummy agent.""" + +from opendevin.action.base import NullAction +from opendevin.state import State +from opendevin.action import Action +from typing import List +from opendevin.agent import Agent +from opendevin.controller.agent_controller import AgentController +from opendevin.observation.base import NullObservation, Observation + +class DummyAgent(Agent): + """A dummy agent that does nothing but can be used in testing.""" + + async def run(self, controller: AgentController) -> Observation: + return NullObservation('') + + def step(self, state: State) -> Action: + return NullAction('') + + def search_memory(self, query: str) -> List[str]: + return [] diff --git a/agenthub/monologue_agent/agent.py b/agenthub/monologue_agent/agent.py index c1fbab4148..e655339a76 100644 --- a/agenthub/monologue_agent/agent.py +++ b/agenthub/monologue_agent/agent.py @@ -2,7 +2,7 @@ from typing import List from opendevin.agent import Agent from opendevin.state import State from opendevin.llm.llm import LLM -from opendevin.schema import ActionType, ObservationType +from opendevin.schema import ActionType from opendevin.exceptions import AgentNoInstructionError from opendevin.schema.config import ConfigType from opendevin import config @@ -15,6 +15,7 @@ from opendevin.action import ( FileReadAction, AgentRecallAction, BrowseURLAction, + GitHubPushAction, AgentThinkAction, ) @@ -71,6 +72,10 @@ INITIAL_THOUGHTS = [ 'BROWSE google.com', '
', 'I can browse the web too!', + 'If I have done some work and I want to push it to github, I can do that also!', + "Let's do it.", + 'PUSH owner/repo branch', + 'The repo was successfully pushed to https://github.com/owner/repo/branch', 'And once I have completed my task, I can use the finish action to stop working.', "But I should only use the finish action when I'm absolutely certain that I've completed my task and have tested my work.", 'Very cool. Now to accomplish my task.', @@ -152,32 +157,32 @@ class MonologueAgent(Agent): else: self.memory = None - output_type = '' + previous_action = '' for thought in INITIAL_THOUGHTS: thought = thought.replace('$TASK', task) - if output_type != '': + if previous_action != '': observation: Observation = NullObservation(content='') - if output_type == ObservationType.RUN: + if previous_action in {ActionType.RUN, ActionType.PUSH}: observation = CmdOutputObservation( content=thought, command_id=0, command='' ) - elif output_type == ObservationType.READ: + elif previous_action == ActionType.READ: observation = FileReadObservation(content=thought, path='') - elif output_type == ObservationType.RECALL: + elif previous_action == ActionType.RECALL: observation = AgentRecallObservation( content=thought, memories=[]) - elif output_type == ObservationType.BROWSE: + elif previous_action == ActionType.BROWSE: observation = BrowserOutputObservation( content=thought, url='', screenshot='' ) self._add_event(observation.to_memory()) - output_type = '' + previous_action = '' else: action: Action = NullAction() if thought.startswith('RUN'): command = thought.split('RUN ')[1] action = CmdRunAction(command) - output_type = ActionType.RUN + previous_action = ActionType.RUN elif thought.startswith('WRITE'): parts = thought.split('WRITE ')[1].split(' > ') path = parts[1] @@ -186,15 +191,20 @@ class MonologueAgent(Agent): elif thought.startswith('READ'): path = thought.split('READ ')[1] action = FileReadAction(path=path) - output_type = ActionType.READ + previous_action = ActionType.READ elif thought.startswith('RECALL'): query = thought.split('RECALL ')[1] action = AgentRecallAction(query=query) - output_type = ActionType.RECALL + previous_action = ActionType.RECALL elif thought.startswith('BROWSE'): url = thought.split('BROWSE ')[1] action = BrowseURLAction(url=url) - output_type = ActionType.BROWSE + previous_action = ActionType.BROWSE + elif thought.startswith('PUSH'): + owner_repo, branch = thought.split('PUSH ')[1].split(' ') + owner, repo = owner_repo.split('/') + action = GitHubPushAction(owner=owner, repo=repo, branch=branch) + previous_action = ActionType.PUSH else: action = AgentThinkAction(thought=thought) self._add_event(action.to_memory()) diff --git a/agenthub/monologue_agent/utils/prompts.py b/agenthub/monologue_agent/utils/prompts.py index 13763fb72b..07c3902230 100644 --- a/agenthub/monologue_agent/utils/prompts.py +++ b/agenthub/monologue_agent/utils/prompts.py @@ -46,6 +46,10 @@ Here are the possible actions: * `id` - the ID of the background command to kill * `browse` - opens a web page. Arguments: * `url` - the URL to open +* `push` - Push a branch from the current repo to github: + * `owner` - the owner of the repo to push to + * `repo` - the name of the repo to push to + * `branch` - the name of the branch to push * `recall` - recalls a past memory. Arguments: * `query` - the query to search for * `think` - make a plan, set a goal, or record your thoughts. Arguments: @@ -54,7 +58,7 @@ Here are the possible actions: %(background_commands)s -You MUST take time to think in between read, write, run, browse, and recall actions. +You MUST take time to think in between read, write, run, browse, push, and recall actions. You should never act twice in a row without thinking. But if your last several actions are all "think" actions, you should consider taking a different action. diff --git a/docs/Agents.md b/docs/Agents.md index b983a2291f..11f9e63db5 100644 --- a/docs/Agents.md +++ b/docs/Agents.md @@ -15,6 +15,7 @@ Short term memory is stored as a Monologue object and the model can condense it `FileReadAction`, `AgentRecallAction`, `BrowseURLAction`, +`GithubPushAction`, `AgentThinkAction` ### Observations: @@ -48,6 +49,7 @@ The agent is given its previous action-observation pairs, current task, and hint `CmdRunAction`, `CmdKillAction`, `BrowseURLAction`, +`GithubPushAction`, `FileReadAction`, `FileWriteAction`, `AgentRecallAction`, diff --git a/opendevin/action/__init__.py b/opendevin/action/__init__.py index 226ffd05d4..782400319f 100644 --- a/opendevin/action/__init__.py +++ b/opendevin/action/__init__.py @@ -2,6 +2,7 @@ from .base import Action, NullAction from .bash import CmdRunAction, CmdKillAction from .browse import BrowseURLAction from .fileop import FileReadAction, FileWriteAction +from .github import GitHubPushAction from .agent import ( AgentRecallAction, AgentThinkAction, @@ -25,6 +26,7 @@ actions = ( AgentDelegateAction, AddTaskAction, ModifyTaskAction, + GitHubPushAction, ) ACTION_TYPE_TO_CLASS = {action_class.action: action_class for action_class in actions} # type: ignore[attr-defined] diff --git a/opendevin/action/github.py b/opendevin/action/github.py new file mode 100644 index 0000000000..738adb0680 --- /dev/null +++ b/opendevin/action/github.py @@ -0,0 +1,158 @@ +from dataclasses import dataclass +from opendevin.observation import Observation, AgentErrorObservation +from opendevin.observation.message import AgentMessageObservation +from opendevin.observation.run import CmdOutputObservation +from opendevin.schema import ActionType +from opendevin import config +from typing import TYPE_CHECKING +import requests +import random +import string + +from opendevin.schema.config import ConfigType + +from .base import ExecutableAction + +if TYPE_CHECKING: + from opendevin.controller import AgentController + + +@dataclass +class GitHubPushAction(ExecutableAction): + """This pushes the current branch to github. + + To use this, you need to set the GITHUB_TOKEN environment variable. + The agent will return a message with a URL that you can click to make a pull + request. + + Attributes: + owner: The owner of the source repo + repo: The name of the source repo + branch: The branch to push + action: The action identifier + """ + + owner: str + repo: str + branch: str + action: str = ActionType.PUSH + + async def run(self, controller: 'AgentController') -> Observation: + github_token = config.get(ConfigType.GITHUB_TOKEN) + if not github_token: + return AgentErrorObservation( + 'GITHUB_TOKEN is not set' + ) + + # Create a random short string to use as a temporary remote + random_remote = ''.join( + ['opendevin_temp_'] + random.choices(string.ascii_lowercase, k=5) + ) + + # Set the temporary remote + new_url = f'https://{github_token}@github.com/{self.owner}/{self.repo}.git' + command = f'git remote add {random_remote} {new_url}' + remote_add_result = controller.action_manager.run_command( + command, background=False + ) + if ( + not isinstance(remote_add_result, CmdOutputObservation) + or remote_add_result.exit_code != 0 + ): + return remote_add_result + + # Push the branch to the temporary remote + command = f'git push {random_remote} {self.branch}' + push_result = controller.action_manager.run_command(command, background=False) + + # Delete the temporary remote + command = f'git remote remove {random_remote}' + remote_remove_result = controller.action_manager.run_command( + command, background=False + ) + if ( + not isinstance(remote_remove_result, CmdOutputObservation) + or remote_remove_result.exit_code != 0 + ): + return remote_remove_result + + return push_result + + @property + def message(self) -> str: + return f'Pushing branch {self.branch} to {self.owner}/{self.repo}' + + +@dataclass +class GitHubSendPRAction(ExecutableAction): + """An action to send a github PR. + + To use this, you need to set the GITHUB_TOKEN environment variable. + + Attributes: + owner: The owner of the source repo + repo: The name of the source repo + title: The title of the PR + head: The branch to send the PR from + head_repo: The repo to send the PR from + base: The branch to send the PR to + body: The body of the PR + """ + + owner: str + repo: str + title: str + head: str + head_repo: str | None + base: str + body: str | None + action: str = ActionType.SEND_PR + + async def run(self, controller: 'AgentController') -> Observation: + github_token = config.get(ConfigType.GITHUB_TOKEN) + if not github_token: + return AgentErrorObservation( + 'GITHUB_TOKEN is not set' + ) + + # API URL to create the pull request + url = f'https://api.github.com/repos/{self.owner}/{self.repo}/pulls' + + # Headers to authenticate and request JSON responses + headers = { + 'Authorization': f'token {github_token}', + 'Accept': 'application/vnd.github.v3+json', + } + + # Data for the pull request + data = { + 'title': self.title, + 'head': self.head, + 'head_repo': self.head_repo, + 'base': self.base, + 'body': self.body, + } + data = {k: v for k, v in data.items() if v is not None} + + # Make the request + response = requests.post(url, headers=headers, json=data) + + # Check for errors + if response.status_code == 201: + return AgentMessageObservation( + 'Pull request created successfully!\n' + f'Pull request URL:{response.json()["html_url"]}' + ) + else: + return AgentErrorObservation( + 'Failed to create pull request\n' + f'Status code: {response.status_code}\n' + f'Response: {response.text}' + ) + + @property + def message(self) -> str: + return ( + f'Sending PR from {self.head_repo}:{self.head} to ' + f'{self.owner}:{self.base}' + ) diff --git a/opendevin/config.py b/opendevin/config.py index 7cd60653f5..ac68f97cc1 100644 --- a/opendevin/config.py +++ b/opendevin/config.py @@ -48,6 +48,7 @@ DEFAULT_CONFIG: dict = { ConfigType.USE_HOST_NETWORK: 'false', ConfigType.SSH_HOSTNAME: 'localhost', ConfigType.DISABLE_COLOR: 'false', + ConfigType.GITHUB_TOKEN: None, } config_str = '' diff --git a/opendevin/schema/action.py b/opendevin/schema/action.py index bbc3a54e2b..e8962fb6ce 100644 --- a/opendevin/schema/action.py +++ b/opendevin/schema/action.py @@ -73,5 +73,11 @@ class ActionTypeSchema(BaseModel): CHANGE_TASK_STATE: str = Field(default='change_task_state') + PUSH: str = Field(default='push') + """Push a branch to github.""" + + SEND_PR: str = Field(default='send_pr') + """Send a PR to github.""" + ActionType = ActionTypeSchema() diff --git a/opendevin/schema/config.py b/opendevin/schema/config.py index 0d5e7eef03..ca74b57cf7 100644 --- a/opendevin/schema/config.py +++ b/opendevin/schema/config.py @@ -29,3 +29,4 @@ class ConfigType(str, Enum): USE_HOST_NETWORK = 'USE_HOST_NETWORK' SSH_HOSTNAME = 'SSH_HOSTNAME' DISABLE_COLOR = 'DISABLE_COLOR' + GITHUB_TOKEN = 'GITHUB_TOKEN' diff --git a/poetry.lock b/poetry.lock index 03a5725076..238306057e 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1210,13 +1210,13 @@ grpcio-gcp = ["grpcio-gcp (>=0.2.2,<1.0.dev0)"] [[package]] name = "google-api-python-client" -version = "2.126.0" +version = "2.127.0" description = "Google API Client Library for Python" optional = false python-versions = ">=3.7" files = [ - {file = "google-api-python-client-2.126.0.tar.gz", hash = "sha256:97c0410630e2bebd194d99e91bd620dab5bc6b6ec0bf033f9a9109b700b83acb"}, - {file = "google_api_python_client-2.126.0-py2.py3-none-any.whl", hash = "sha256:299255fdb8dddf4eb96ab99e8358991160900b4109a9e0d3e3ac127c04b1e2ee"}, + {file = "google-api-python-client-2.127.0.tar.gz", hash = "sha256:bbb51b0fbccdf40e536c26341e372d7800f09afebb53103bbcc94e08f14b523b"}, + {file = "google_api_python_client-2.127.0-py2.py3-none-any.whl", hash = "sha256:d01c70c7840ec37888aa02b1aea5d9baba4c1701e268d1a0251640afd56e5e90"}, ] [package.dependencies] @@ -1627,13 +1627,13 @@ pyreadline3 = {version = "*", markers = "sys_platform == \"win32\" and python_ve [[package]] name = "identify" -version = "2.5.35" +version = "2.5.36" description = "File identification library for Python" optional = false python-versions = ">=3.8" files = [ - {file = "identify-2.5.35-py2.py3-none-any.whl", hash = "sha256:c4de0081837b211594f8e877a6b4fad7ca32bbfc1a9307fdd61c28bfe923f13e"}, - {file = "identify-2.5.35.tar.gz", hash = "sha256:10a7ca245cfcd756a554a7288159f72ff105ad233c7c4b9c6f0f4d108f5f6791"}, + {file = "identify-2.5.36-py2.py3-none-any.whl", hash = "sha256:37d93f380f4de590500d9dba7db359d0d3da95ffe7f9de1753faa159e71e7dfa"}, + {file = "identify-2.5.36.tar.gz", hash = "sha256:e5e00f54165f9047fbebeb4a560f9acfb8af4c88232be60a488e9b68d122745d"}, ] [package.extras] @@ -1725,13 +1725,13 @@ files = [ [[package]] name = "json-repair" -version = "0.14.0" +version = "0.15.3" description = "A package to repair broken json strings" optional = false python-versions = ">=3.7" files = [ - {file = "json_repair-0.14.0-py3-none-any.whl", hash = "sha256:4e622afcc7ef05abf490382dfdc936a5d8d79a48aa1366cad3ebdd1aea378ae0"}, - {file = "json_repair-0.14.0.tar.gz", hash = "sha256:56d965826bf179940fc36a773971c0382baf650631e3d6288d5346d72e108d32"}, + {file = "json_repair-0.15.3-py3-none-any.whl", hash = "sha256:2af4e68d0b5afce070fb8269ce7d7bc198f383e07ce3ec336e154aa192258048"}, + {file = "json_repair-0.15.3.tar.gz", hash = "sha256:5702113bfdde44a5345c40b88882b1375aaa511a81165e01c9ddcf66584c344c"}, ] [[package]] @@ -1888,13 +1888,13 @@ adal = ["adal (>=1.0.2)"] [[package]] name = "litellm" -version = "1.35.15" +version = "1.35.30" 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.35.15-py3-none-any.whl", hash = "sha256:8037b4b8205385961b47cbfec4c0a21989179dc3175d514794906cf712583144"}, - {file = "litellm-1.35.15.tar.gz", hash = "sha256:515a76a0d2f096ba2d2c91518288e807d7ed9986afca1694b0dc53048643f990"}, + {file = "litellm-1.35.30-py3-none-any.whl", hash = "sha256:a2f0a800504cac90ce7c4d511656acf1d502fb8a32e0c0f83c573ae34dcb8ee1"}, + {file = "litellm-1.35.30.tar.gz", hash = "sha256:b9c422a7d69c0946453a0562fbaceb756db7c60fcdefb0574aed82b82925c90c"}, ] [package.dependencies] @@ -1914,19 +1914,19 @@ proxy = ["PyJWT (>=2.8.0,<3.0.0)", "apscheduler (>=3.10.4,<4.0.0)", "backoff", " [[package]] name = "llama-index" -version = "0.10.30" +version = "0.10.32" description = "Interface between LLMs and your data" optional = false python-versions = "<4.0,>=3.8.1" files = [ - {file = "llama_index-0.10.30-py3-none-any.whl", hash = "sha256:7083014be8f74c6037cc33d629985a7505ee3c89b972503f8dd7d4ac7c45a4f4"}, - {file = "llama_index-0.10.30.tar.gz", hash = "sha256:58fab1047c75e39803e8c394fab7d5e81ce97f27281bf7cba6bea40a7328562e"}, + {file = "llama_index-0.10.32-py3-none-any.whl", hash = "sha256:2a344f30120c3bb9f6c24c14056e3098288e7e2607ac18c5cabe2f1ec01f370c"}, + {file = "llama_index-0.10.32.tar.gz", hash = "sha256:857f2e40fdf58d6be27826706f40028cdc8bdcb4b208295debb408fef89ae5ac"}, ] [package.dependencies] llama-index-agent-openai = ">=0.1.4,<0.3.0" llama-index-cli = ">=0.1.2,<0.2.0" -llama-index-core = ">=0.10.30,<0.11.0" +llama-index-core = ">=0.10.32,<0.11.0" llama-index-embeddings-openai = ">=0.1.5,<0.2.0" llama-index-indices-managed-llama-cloud = ">=0.1.2,<0.2.0" llama-index-legacy = ">=0.9.48,<0.10.0" @@ -1939,17 +1939,17 @@ llama-index-readers-llama-parse = ">=0.1.2,<0.2.0" [[package]] name = "llama-index-agent-openai" -version = "0.2.2" +version = "0.2.3" description = "llama-index agent openai integration" optional = false python-versions = "<4.0,>=3.8.1" files = [ - {file = "llama_index_agent_openai-0.2.2-py3-none-any.whl", hash = "sha256:fa8cbc2c7be5a465848f8d5b432db01c55f07dfa06357edb7fb77fb17d534d1e"}, - {file = "llama_index_agent_openai-0.2.2.tar.gz", hash = "sha256:12063dd932c74015796f973986cc52d783f51fda38e4ead72a56d0fd195925ee"}, + {file = "llama_index_agent_openai-0.2.3-py3-none-any.whl", hash = "sha256:3782b24dd611364e391672dadc8308efd58d731a097c34a40e29f28c3abc5034"}, + {file = "llama_index_agent_openai-0.2.3.tar.gz", hash = "sha256:c899d90b32036656a8ef86d0f0378d4168e00eb2d75a10901eab58ba5b2656a4"}, ] [package.dependencies] -llama-index-core = ">=0.10.1,<0.11.0" +llama-index-core = ">=0.10.30,<0.11.0" llama-index-llms-openai = ">=0.1.5,<0.2.0" openai = ">=1.14.0" @@ -1971,13 +1971,13 @@ llama-index-llms-openai = ">=0.1.1,<0.2.0" [[package]] name = "llama-index-core" -version = "0.10.30" +version = "0.10.33" description = "Interface between LLMs and your data" optional = false python-versions = "<4.0,>=3.8.1" files = [ - {file = "llama_index_core-0.10.30-py3-none-any.whl", hash = "sha256:2f291ce2975f9dbf0ea87d684d3d8122ce216265f468f32baa2cf4ecfb34ed2a"}, - {file = "llama_index_core-0.10.30.tar.gz", hash = "sha256:bed3f683606a0b0eb0839677c935a4b57b7bae509a95d380e51c6225630660e0"}, + {file = "llama_index_core-0.10.33-py3-none-any.whl", hash = "sha256:943114fb02dfe62fec5d882d749ad8adf113081aadcb0d4cb2c083b2c9052ed0"}, + {file = "llama_index_core-0.10.33.tar.gz", hash = "sha256:21b98b2c45e0c6b673aa505c7add1e8b730f472ad58d4572b909a34f4a22c36c"}, ] [package.dependencies] @@ -2015,13 +2015,13 @@ query-tools = ["guidance (>=0.0.64,<0.0.65)", "jsonpath-ng (>=1.6.0,<2.0.0)", "l [[package]] name = "llama-index-embeddings-azure-openai" -version = "0.1.7" +version = "0.1.8" description = "llama-index embeddings azure openai integration" optional = false python-versions = "<4.0,>=3.8.1" files = [ - {file = "llama_index_embeddings_azure_openai-0.1.7-py3-none-any.whl", hash = "sha256:16b32511d99783e2c531bb401c337e4047d4ab7f1297d8bcf0d812bb6a260048"}, - {file = "llama_index_embeddings_azure_openai-0.1.7.tar.gz", hash = "sha256:a52eed11d4c3d81703aee7e0b137913ff63f062ae6ebe82f9b93a2c5b0146013"}, + {file = "llama_index_embeddings_azure_openai-0.1.8-py3-none-any.whl", hash = "sha256:37f9a994e3d594d9a20b089a686510428fba507d4a149ed7443610e0a1ccd49d"}, + {file = "llama_index_embeddings_azure_openai-0.1.8.tar.gz", hash = "sha256:ce81a7b2ca0d058cfc56ccc0743e157809661f7bd6a14b3e9f4b50ab9802dded"}, ] [package.dependencies] @@ -2061,13 +2061,13 @@ llama-index-core = ">=0.10.1,<0.11.0" [[package]] name = "llama-index-embeddings-openai" -version = "0.1.8" +version = "0.1.9" description = "llama-index embeddings openai integration" optional = false python-versions = "<4.0,>=3.8.1" files = [ - {file = "llama_index_embeddings_openai-0.1.8-py3-none-any.whl", hash = "sha256:186be52c29a8c82a39ff6e033e3a61b9c5a17cf6177a5507abe4f5c79fea3a53"}, - {file = "llama_index_embeddings_openai-0.1.8.tar.gz", hash = "sha256:aae4ce3ec2fe2cb604d944646982c71663a8b99ed5f8c370823ee82eef4ddd3b"}, + {file = "llama_index_embeddings_openai-0.1.9-py3-none-any.whl", hash = "sha256:fbd16d6197b91f4dbdc6d0707e573cc224ac2b0a48d5b370c6232dd8a2282473"}, + {file = "llama_index_embeddings_openai-0.1.9.tar.gz", hash = "sha256:0fd292b2f9a0ad4534a790d6374726bc885853188087eb018167dcf239643924"}, ] [package.dependencies] @@ -2075,18 +2075,18 @@ llama-index-core = ">=0.10.1,<0.11.0" [[package]] name = "llama-index-indices-managed-llama-cloud" -version = "0.1.5" +version = "0.1.6" description = "llama-index indices llama-cloud integration" optional = false python-versions = "<4.0,>=3.8.1" files = [ - {file = "llama_index_indices_managed_llama_cloud-0.1.5-py3-none-any.whl", hash = "sha256:79f636cb6f4fabb12fec153564110f7f4dfda3cacb087793a5fec988484d7d2c"}, - {file = "llama_index_indices_managed_llama_cloud-0.1.5.tar.gz", hash = "sha256:47cdde9f06bbddd508f0efcf41de425e85171ac2c8fda8a5fb2a89673e1c8c71"}, + {file = "llama_index_indices_managed_llama_cloud-0.1.6-py3-none-any.whl", hash = "sha256:cba33e1a3677b2a2ae7f239119acbf6dc3818f105edc92315729842b56fbc949"}, + {file = "llama_index_indices_managed_llama_cloud-0.1.6.tar.gz", hash = "sha256:74b3b0e9ebf9d348d3054f9fc0c657031acceb9351c31116ad8d5a7ae4729f5c"}, ] [package.dependencies] llama-index-core = ">=0.10.0,<0.11.0" -llamaindex-py-client = ">=0.1.13,<0.2.0" +llamaindex-py-client = ">=0.1.19,<0.2.0" [[package]] name = "llama-index-legacy" @@ -2175,13 +2175,13 @@ llama-index-llms-openai = ">=0.1.1,<0.2.0" [[package]] name = "llama-index-program-openai" -version = "0.1.5" +version = "0.1.6" description = "llama-index program openai integration" optional = false python-versions = "<4.0,>=3.8.1" files = [ - {file = "llama_index_program_openai-0.1.5-py3-none-any.whl", hash = "sha256:20b6efa706ac73e4dc5086900fea1ffcb1eb0787c8a6f081669d37da7235aee0"}, - {file = "llama_index_program_openai-0.1.5.tar.gz", hash = "sha256:c33aa2d2876ad0ff1f9a2a755d4e7d4917240847d0174e7b2d0b8474499bb700"}, + {file = "llama_index_program_openai-0.1.6-py3-none-any.whl", hash = "sha256:4660b338503537c5edca1e0dab606af6ce372b4f1b597e2833c6b602447c5d8d"}, + {file = "llama_index_program_openai-0.1.6.tar.gz", hash = "sha256:c6a4980c5ea826088b28b4dee3367edb20221e6d05eb0e05019049190131d772"}, ] [package.dependencies] @@ -2257,13 +2257,13 @@ llama-index-core = ">=0.10.1,<0.11.0" [[package]] name = "llama-parse" -version = "0.4.1" +version = "0.4.2" description = "Parse files into RAG-Optimized formats." optional = false python-versions = "<4.0,>=3.8.1" files = [ - {file = "llama_parse-0.4.1-py3-none-any.whl", hash = "sha256:2c08962b66791c61fc360ae2042f953729c7b8decc3590d01fea5a98ca1f6676"}, - {file = "llama_parse-0.4.1.tar.gz", hash = "sha256:d723af84d6a1fc99eb431915d21865d20b76d8a246dbaa124d1f96c956a644f7"}, + {file = "llama_parse-0.4.2-py3-none-any.whl", hash = "sha256:5ce0390141f216dcd88c1123fea7f2a4f561d177f791a97217a3db3509dec4ff"}, + {file = "llama_parse-0.4.2.tar.gz", hash = "sha256:fa04c09730b102155f6505de9cf91998c86d334581f0f12597c5eb47ca5db859"}, ] [package.dependencies] @@ -2271,13 +2271,13 @@ llama-index-core = ">=0.10.29" [[package]] name = "llamaindex-py-client" -version = "0.1.18" +version = "0.1.19" description = "" optional = false python-versions = "<4,>=3.8" files = [ - {file = "llamaindex_py_client-0.1.18-py3-none-any.whl", hash = "sha256:5417e41666504a77ecf5bdd9b403ffff1d714880ee30d49e234fb7686177eeeb"}, - {file = "llamaindex_py_client-0.1.18.tar.gz", hash = "sha256:091ee49a92592e3894777ade12516c2137093f9d6441a549f406461917ce9b7e"}, + {file = "llamaindex_py_client-0.1.19-py3-none-any.whl", hash = "sha256:fd9416fd78b97209bf323bc3c7fab314499778563e7274f10853ad560563d10e"}, + {file = "llamaindex_py_client-0.1.19.tar.gz", hash = "sha256:73f74792bb8c092bae6dc626627a09ac13a099fa8d10f8fcc83e17a2b332cca7"}, ] [package.dependencies] @@ -3124,13 +3124,13 @@ sympy = "*" [[package]] name = "openai" -version = "1.23.2" +version = "1.23.6" description = "The official Python library for the openai API" optional = false python-versions = ">=3.7.1" files = [ - {file = "openai-1.23.2-py3-none-any.whl", hash = "sha256:293a36effde29946eb221040c89c46a4850f2f2e30b37ef09ff6d75226d71b42"}, - {file = "openai-1.23.2.tar.gz", hash = "sha256:b84aa3005357ceb38f22a269e0e22ee58ce103897f447032d021906f18178a8e"}, + {file = "openai-1.23.6-py3-none-any.whl", hash = "sha256:f406c76ba279d16b9aca5a89cee0d968488e39f671f4dc6f0d690ac3c6f6fca1"}, + {file = "openai-1.23.6.tar.gz", hash = "sha256:612de2d54cf580920a1156273f84aada6b3dca26d048f62eb5364a4314d7f449"}, ] [package.dependencies] @@ -3563,18 +3563,19 @@ xmp = ["defusedxml"] [[package]] name = "platformdirs" -version = "4.2.0" -description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." +version = "4.2.1" +description = "A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`." optional = false python-versions = ">=3.8" files = [ - {file = "platformdirs-4.2.0-py3-none-any.whl", hash = "sha256:0614df2a2f37e1a662acbd8e2b25b92ccf8632929bc6d43467e17fe89c75e068"}, - {file = "platformdirs-4.2.0.tar.gz", hash = "sha256:ef0cc731df711022c174543cb70a9b5bd22e5a9337c8624ef2c2ceb8ddad8768"}, + {file = "platformdirs-4.2.1-py3-none-any.whl", hash = "sha256:17d5a1161b3fd67b390023cb2d3b026bbd40abde6fdb052dfbd3a29c3ba22ee1"}, + {file = "platformdirs-4.2.1.tar.gz", hash = "sha256:031cd18d4ec63ec53e82dceaac0417d218a6863f7745dfcc9efe7793b7039bdf"}, ] [package.extras] docs = ["furo (>=2023.9.10)", "proselint (>=0.13)", "sphinx (>=7.2.6)", "sphinx-autodoc-typehints (>=1.25.2)"] test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.4.3)", "pytest-cov (>=4.1)", "pytest-mock (>=3.12)"] +type = ["mypy (>=1.8)"] [[package]] name = "playwright" @@ -3598,13 +3599,13 @@ pyee = "11.1.0" [[package]] name = "pluggy" -version = "1.4.0" +version = "1.5.0" description = "plugin and hook calling mechanisms for python" optional = false python-versions = ">=3.8" files = [ - {file = "pluggy-1.4.0-py3-none-any.whl", hash = "sha256:7db9f7b503d67d1c5b95f59773ebb58a8c1c288129a88665838012cfb07b8981"}, - {file = "pluggy-1.4.0.tar.gz", hash = "sha256:8c85c2876142a764e5b7548e7d9a0e0ddb46f5185161049a79b7e974454223be"}, + {file = "pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669"}, + {file = "pluggy-1.5.0.tar.gz", hash = "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1"}, ] [package.extras] @@ -3768,51 +3769,51 @@ functions = ["apache-bookkeeper-client (>=4.16.1)", "grpcio (>=1.60.0)", "promet [[package]] name = "pyarrow" -version = "15.0.2" +version = "16.0.0" description = "Python library for Apache Arrow" optional = false python-versions = ">=3.8" files = [ - {file = "pyarrow-15.0.2-cp310-cp310-macosx_10_15_x86_64.whl", hash = "sha256:88b340f0a1d05b5ccc3d2d986279045655b1fe8e41aba6ca44ea28da0d1455d8"}, - {file = "pyarrow-15.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:eaa8f96cecf32da508e6c7f69bb8401f03745c050c1dd42ec2596f2e98deecac"}, - {file = "pyarrow-15.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:23c6753ed4f6adb8461e7c383e418391b8d8453c5d67e17f416c3a5d5709afbd"}, - {file = "pyarrow-15.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f639c059035011db8c0497e541a8a45d98a58dbe34dc8fadd0ef128f2cee46e5"}, - {file = "pyarrow-15.0.2-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:290e36a59a0993e9a5224ed2fb3e53375770f07379a0ea03ee2fce2e6d30b423"}, - {file = "pyarrow-15.0.2-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:06c2bb2a98bc792f040bef31ad3e9be6a63d0cb39189227c08a7d955db96816e"}, - {file = "pyarrow-15.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:f7a197f3670606a960ddc12adbe8075cea5f707ad7bf0dffa09637fdbb89f76c"}, - {file = "pyarrow-15.0.2-cp311-cp311-macosx_10_15_x86_64.whl", hash = "sha256:5f8bc839ea36b1f99984c78e06e7a06054693dc2af8920f6fb416b5bca9944e4"}, - {file = "pyarrow-15.0.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f5e81dfb4e519baa6b4c80410421528c214427e77ca0ea9461eb4097c328fa33"}, - {file = "pyarrow-15.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3a4f240852b302a7af4646c8bfe9950c4691a419847001178662a98915fd7ee7"}, - {file = "pyarrow-15.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4e7d9cfb5a1e648e172428c7a42b744610956f3b70f524aa3a6c02a448ba853e"}, - {file = "pyarrow-15.0.2-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:2d4f905209de70c0eb5b2de6763104d5a9a37430f137678edfb9a675bac9cd98"}, - {file = "pyarrow-15.0.2-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:90adb99e8ce5f36fbecbbc422e7dcbcbed07d985eed6062e459e23f9e71fd197"}, - {file = "pyarrow-15.0.2-cp311-cp311-win_amd64.whl", hash = "sha256:b116e7fd7889294cbd24eb90cd9bdd3850be3738d61297855a71ac3b8124ee38"}, - {file = "pyarrow-15.0.2-cp312-cp312-macosx_10_15_x86_64.whl", hash = "sha256:25335e6f1f07fdaa026a61c758ee7d19ce824a866b27bba744348fa73bb5a440"}, - {file = "pyarrow-15.0.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:90f19e976d9c3d8e73c80be84ddbe2f830b6304e4c576349d9360e335cd627fc"}, - {file = "pyarrow-15.0.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a22366249bf5fd40ddacc4f03cd3160f2d7c247692945afb1899bab8a140ddfb"}, - {file = "pyarrow-15.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c2a335198f886b07e4b5ea16d08ee06557e07db54a8400cc0d03c7f6a22f785f"}, - {file = "pyarrow-15.0.2-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:3e6d459c0c22f0b9c810a3917a1de3ee704b021a5fb8b3bacf968eece6df098f"}, - {file = "pyarrow-15.0.2-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:033b7cad32198754d93465dcfb71d0ba7cb7cd5c9afd7052cab7214676eec38b"}, - {file = "pyarrow-15.0.2-cp312-cp312-win_amd64.whl", hash = "sha256:29850d050379d6e8b5a693098f4de7fd6a2bea4365bfd073d7c57c57b95041ee"}, - {file = "pyarrow-15.0.2-cp38-cp38-macosx_10_15_x86_64.whl", hash = "sha256:7167107d7fb6dcadb375b4b691b7e316f4368f39f6f45405a05535d7ad5e5058"}, - {file = "pyarrow-15.0.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:e85241b44cc3d365ef950432a1b3bd44ac54626f37b2e3a0cc89c20e45dfd8bf"}, - {file = "pyarrow-15.0.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:248723e4ed3255fcd73edcecc209744d58a9ca852e4cf3d2577811b6d4b59818"}, - {file = "pyarrow-15.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ff3bdfe6f1b81ca5b73b70a8d482d37a766433823e0c21e22d1d7dde76ca33f"}, - {file = "pyarrow-15.0.2-cp38-cp38-manylinux_2_28_aarch64.whl", hash = "sha256:f3d77463dee7e9f284ef42d341689b459a63ff2e75cee2b9302058d0d98fe142"}, - {file = "pyarrow-15.0.2-cp38-cp38-manylinux_2_28_x86_64.whl", hash = "sha256:8c1faf2482fb89766e79745670cbca04e7018497d85be9242d5350cba21357e1"}, - {file = "pyarrow-15.0.2-cp38-cp38-win_amd64.whl", hash = "sha256:28f3016958a8e45a1069303a4a4f6a7d4910643fc08adb1e2e4a7ff056272ad3"}, - {file = "pyarrow-15.0.2-cp39-cp39-macosx_10_15_x86_64.whl", hash = "sha256:89722cb64286ab3d4daf168386f6968c126057b8c7ec3ef96302e81d8cdb8ae4"}, - {file = "pyarrow-15.0.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:cd0ba387705044b3ac77b1b317165c0498299b08261d8122c96051024f953cd5"}, - {file = "pyarrow-15.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ad2459bf1f22b6a5cdcc27ebfd99307d5526b62d217b984b9f5c974651398832"}, - {file = "pyarrow-15.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:58922e4bfece8b02abf7159f1f53a8f4d9f8e08f2d988109126c17c3bb261f22"}, - {file = "pyarrow-15.0.2-cp39-cp39-manylinux_2_28_aarch64.whl", hash = "sha256:adccc81d3dc0478ea0b498807b39a8d41628fa9210729b2f718b78cb997c7c91"}, - {file = "pyarrow-15.0.2-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:8bd2baa5fe531571847983f36a30ddbf65261ef23e496862ece83bdceb70420d"}, - {file = "pyarrow-15.0.2-cp39-cp39-win_amd64.whl", hash = "sha256:6669799a1d4ca9da9c7e06ef48368320f5856f36f9a4dd31a11839dda3f6cc8c"}, - {file = "pyarrow-15.0.2.tar.gz", hash = "sha256:9c9bc803cb3b7bfacc1e96ffbfd923601065d9d3f911179d81e72d99fd74a3d9"}, + {file = "pyarrow-16.0.0-cp310-cp310-macosx_10_15_x86_64.whl", hash = "sha256:22a1fdb1254e5095d629e29cd1ea98ed04b4bbfd8e42cc670a6b639ccc208b60"}, + {file = "pyarrow-16.0.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:574a00260a4ed9d118a14770edbd440b848fcae5a3024128be9d0274dbcaf858"}, + {file = "pyarrow-16.0.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c0815d0ddb733b8c1b53a05827a91f1b8bde6240f3b20bf9ba5d650eb9b89cdf"}, + {file = "pyarrow-16.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:df0080339387b5d30de31e0a149c0c11a827a10c82f0c67d9afae3981d1aabb7"}, + {file = "pyarrow-16.0.0-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:edf38cce0bf0dcf726e074159c60516447e4474904c0033f018c1f33d7dac6c5"}, + {file = "pyarrow-16.0.0-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:91d28f9a40f1264eab2af7905a4d95320ac2f287891e9c8b0035f264fe3c3a4b"}, + {file = "pyarrow-16.0.0-cp310-cp310-win_amd64.whl", hash = "sha256:99af421ee451a78884d7faea23816c429e263bd3618b22d38e7992c9ce2a7ad9"}, + {file = "pyarrow-16.0.0-cp311-cp311-macosx_10_15_x86_64.whl", hash = "sha256:d22d0941e6c7bafddf5f4c0662e46f2075850f1c044bf1a03150dd9e189427ce"}, + {file = "pyarrow-16.0.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:266ddb7e823f03733c15adc8b5078db2df6980f9aa93d6bb57ece615df4e0ba7"}, + {file = "pyarrow-16.0.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5cc23090224b6594f5a92d26ad47465af47c1d9c079dd4a0061ae39551889efe"}, + {file = "pyarrow-16.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:56850a0afe9ef37249d5387355449c0f94d12ff7994af88f16803a26d38f2016"}, + {file = "pyarrow-16.0.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:705db70d3e2293c2f6f8e84874b5b775f690465798f66e94bb2c07bab0a6bb55"}, + {file = "pyarrow-16.0.0-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:5448564754c154997bc09e95a44b81b9e31ae918a86c0fcb35c4aa4922756f55"}, + {file = "pyarrow-16.0.0-cp311-cp311-win_amd64.whl", hash = "sha256:729f7b262aa620c9df8b9967db96c1575e4cfc8c25d078a06968e527b8d6ec05"}, + {file = "pyarrow-16.0.0-cp312-cp312-macosx_10_15_x86_64.whl", hash = "sha256:fb8065dbc0d051bf2ae2453af0484d99a43135cadabacf0af588a3be81fbbb9b"}, + {file = "pyarrow-16.0.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:20ce707d9aa390593ea93218b19d0eadab56390311cb87aad32c9a869b0e958c"}, + {file = "pyarrow-16.0.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5823275c8addbbb50cd4e6a6839952682a33255b447277e37a6f518d6972f4e1"}, + {file = "pyarrow-16.0.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1ab8b9050752b16a8b53fcd9853bf07d8daf19093533e990085168f40c64d978"}, + {file = "pyarrow-16.0.0-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:42e56557bc7c5c10d3e42c3b32f6cff649a29d637e8f4e8b311d334cc4326730"}, + {file = "pyarrow-16.0.0-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:2a7abdee4a4a7cfa239e2e8d721224c4b34ffe69a0ca7981354fe03c1328789b"}, + {file = "pyarrow-16.0.0-cp312-cp312-win_amd64.whl", hash = "sha256:ef2f309b68396bcc5a354106741d333494d6a0d3e1951271849787109f0229a6"}, + {file = "pyarrow-16.0.0-cp38-cp38-macosx_10_15_x86_64.whl", hash = "sha256:ed66e5217b4526fa3585b5e39b0b82f501b88a10d36bd0d2a4d8aa7b5a48e2df"}, + {file = "pyarrow-16.0.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:cc8814310486f2a73c661ba8354540f17eef51e1b6dd090b93e3419d3a097b3a"}, + {file = "pyarrow-16.0.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3c2f5e239db7ed43e0ad2baf46a6465f89c824cc703f38ef0fde927d8e0955f7"}, + {file = "pyarrow-16.0.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f293e92d1db251447cb028ae12f7bc47526e4649c3a9924c8376cab4ad6b98bd"}, + {file = "pyarrow-16.0.0-cp38-cp38-manylinux_2_28_aarch64.whl", hash = "sha256:dd9334a07b6dc21afe0857aa31842365a62eca664e415a3f9536e3a8bb832c07"}, + {file = "pyarrow-16.0.0-cp38-cp38-manylinux_2_28_x86_64.whl", hash = "sha256:d91073d1e2fef2c121154680e2ba7e35ecf8d4969cc0af1fa6f14a8675858159"}, + {file = "pyarrow-16.0.0-cp38-cp38-win_amd64.whl", hash = "sha256:71d52561cd7aefd22cf52538f262850b0cc9e4ec50af2aaa601da3a16ef48877"}, + {file = "pyarrow-16.0.0-cp39-cp39-macosx_10_15_x86_64.whl", hash = "sha256:b93c9a50b965ee0bf4fef65e53b758a7e8dcc0c2d86cebcc037aaaf1b306ecc0"}, + {file = "pyarrow-16.0.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:d831690844706e374c455fba2fb8cfcb7b797bfe53ceda4b54334316e1ac4fa4"}, + {file = "pyarrow-16.0.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:35692ce8ad0b8c666aa60f83950957096d92f2a9d8d7deda93fb835e6053307e"}, + {file = "pyarrow-16.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9dd3151d098e56f16a8389c1247137f9e4c22720b01c6f3aa6dec29a99b74d80"}, + {file = "pyarrow-16.0.0-cp39-cp39-manylinux_2_28_aarch64.whl", hash = "sha256:bd40467bdb3cbaf2044ed7a6f7f251c8f941c8b31275aaaf88e746c4f3ca4a7a"}, + {file = "pyarrow-16.0.0-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:00a1dcb22ad4ceb8af87f7bd30cc3354788776c417f493089e0a0af981bc8d80"}, + {file = "pyarrow-16.0.0-cp39-cp39-win_amd64.whl", hash = "sha256:fda9a7cebd1b1d46c97b511f60f73a5b766a6de4c5236f144f41a5d5afec1f35"}, + {file = "pyarrow-16.0.0.tar.gz", hash = "sha256:59bb1f1edbbf4114c72415f039f1359f1a57d166a331c3229788ccbfbb31689a"}, ] [package.dependencies] -numpy = ">=1.16.6,<2" +numpy = ">=1.16.6" [[package]] name = "pyarrow-hotfix" @@ -3863,18 +3864,18 @@ files = [ [[package]] name = "pydantic" -version = "2.7.0" +version = "2.7.1" description = "Data validation using Python type hints" optional = false python-versions = ">=3.8" files = [ - {file = "pydantic-2.7.0-py3-none-any.whl", hash = "sha256:9dee74a271705f14f9a1567671d144a851c675b072736f0a7b2608fd9e495352"}, - {file = "pydantic-2.7.0.tar.gz", hash = "sha256:b5ecdd42262ca2462e2624793551e80911a1e989f462910bb81aef974b4bb383"}, + {file = "pydantic-2.7.1-py3-none-any.whl", hash = "sha256:e029badca45266732a9a79898a15ae2e8b14840b1eabbb25844be28f0b33f3d5"}, + {file = "pydantic-2.7.1.tar.gz", hash = "sha256:e9dbb5eada8abe4d9ae5f46b9939aead650cd2b68f249bb3a8139dbe125803cc"}, ] [package.dependencies] annotated-types = ">=0.4.0" -pydantic-core = "2.18.1" +pydantic-core = "2.18.2" typing-extensions = ">=4.6.1" [package.extras] @@ -3882,90 +3883,90 @@ email = ["email-validator (>=2.0.0)"] [[package]] name = "pydantic-core" -version = "2.18.1" +version = "2.18.2" description = "Core functionality for Pydantic validation and serialization" optional = false python-versions = ">=3.8" files = [ - {file = "pydantic_core-2.18.1-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:ee9cf33e7fe14243f5ca6977658eb7d1042caaa66847daacbd2117adb258b226"}, - {file = "pydantic_core-2.18.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:6b7bbb97d82659ac8b37450c60ff2e9f97e4eb0f8a8a3645a5568b9334b08b50"}, - {file = "pydantic_core-2.18.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:df4249b579e75094f7e9bb4bd28231acf55e308bf686b952f43100a5a0be394c"}, - {file = "pydantic_core-2.18.1-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d0491006a6ad20507aec2be72e7831a42efc93193d2402018007ff827dc62926"}, - {file = "pydantic_core-2.18.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2ae80f72bb7a3e397ab37b53a2b49c62cc5496412e71bc4f1277620a7ce3f52b"}, - {file = "pydantic_core-2.18.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:58aca931bef83217fca7a390e0486ae327c4af9c3e941adb75f8772f8eeb03a1"}, - {file = "pydantic_core-2.18.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1be91ad664fc9245404a789d60cba1e91c26b1454ba136d2a1bf0c2ac0c0505a"}, - {file = "pydantic_core-2.18.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:667880321e916a8920ef49f5d50e7983792cf59f3b6079f3c9dac2b88a311d17"}, - {file = "pydantic_core-2.18.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:f7054fdc556f5421f01e39cbb767d5ec5c1139ea98c3e5b350e02e62201740c7"}, - {file = "pydantic_core-2.18.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:030e4f9516f9947f38179249778709a460a3adb516bf39b5eb9066fcfe43d0e6"}, - {file = "pydantic_core-2.18.1-cp310-none-win32.whl", hash = "sha256:2e91711e36e229978d92642bfc3546333a9127ecebb3f2761372e096395fc649"}, - {file = "pydantic_core-2.18.1-cp310-none-win_amd64.whl", hash = "sha256:9a29726f91c6cb390b3c2338f0df5cd3e216ad7a938762d11c994bb37552edb0"}, - {file = "pydantic_core-2.18.1-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:9ece8a49696669d483d206b4474c367852c44815fca23ac4e48b72b339807f80"}, - {file = "pydantic_core-2.18.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:7a5d83efc109ceddb99abd2c1316298ced2adb4570410defe766851a804fcd5b"}, - {file = "pydantic_core-2.18.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5f7973c381283783cd1043a8c8f61ea5ce7a3a58b0369f0ee0ee975eaf2f2a1b"}, - {file = "pydantic_core-2.18.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:54c7375c62190a7845091f521add19b0f026bcf6ae674bdb89f296972272e86d"}, - {file = "pydantic_core-2.18.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:dd63cec4e26e790b70544ae5cc48d11b515b09e05fdd5eff12e3195f54b8a586"}, - {file = "pydantic_core-2.18.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:561cf62c8a3498406495cfc49eee086ed2bb186d08bcc65812b75fda42c38294"}, - {file = "pydantic_core-2.18.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:68717c38a68e37af87c4da20e08f3e27d7e4212e99e96c3d875fbf3f4812abfc"}, - {file = "pydantic_core-2.18.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2d5728e93d28a3c63ee513d9ffbac9c5989de8c76e049dbcb5bfe4b923a9739d"}, - {file = "pydantic_core-2.18.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:f0f17814c505f07806e22b28856c59ac80cee7dd0fbb152aed273e116378f519"}, - {file = "pydantic_core-2.18.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d816f44a51ba5175394bc6c7879ca0bd2be560b2c9e9f3411ef3a4cbe644c2e9"}, - {file = "pydantic_core-2.18.1-cp311-none-win32.whl", hash = "sha256:09f03dfc0ef8c22622eaa8608caa4a1e189cfb83ce847045eca34f690895eccb"}, - {file = "pydantic_core-2.18.1-cp311-none-win_amd64.whl", hash = "sha256:27f1009dc292f3b7ca77feb3571c537276b9aad5dd4efb471ac88a8bd09024e9"}, - {file = "pydantic_core-2.18.1-cp311-none-win_arm64.whl", hash = "sha256:48dd883db92e92519201f2b01cafa881e5f7125666141a49ffba8b9facc072b0"}, - {file = "pydantic_core-2.18.1-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:b6b0e4912030c6f28bcb72b9ebe4989d6dc2eebcd2a9cdc35fefc38052dd4fe8"}, - {file = "pydantic_core-2.18.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f3202a429fe825b699c57892d4371c74cc3456d8d71b7f35d6028c96dfecad31"}, - {file = "pydantic_core-2.18.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a3982b0a32d0a88b3907e4b0dc36809fda477f0757c59a505d4e9b455f384b8b"}, - {file = "pydantic_core-2.18.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:25595ac311f20e5324d1941909b0d12933f1fd2171075fcff763e90f43e92a0d"}, - {file = "pydantic_core-2.18.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:14fe73881cf8e4cbdaded8ca0aa671635b597e42447fec7060d0868b52d074e6"}, - {file = "pydantic_core-2.18.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ca976884ce34070799e4dfc6fbd68cb1d181db1eefe4a3a94798ddfb34b8867f"}, - {file = "pydantic_core-2.18.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:684d840d2c9ec5de9cb397fcb3f36d5ebb6fa0d94734f9886032dd796c1ead06"}, - {file = "pydantic_core-2.18.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:54764c083bbe0264f0f746cefcded6cb08fbbaaf1ad1d78fb8a4c30cff999a90"}, - {file = "pydantic_core-2.18.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:201713f2f462e5c015b343e86e68bd8a530a4f76609b33d8f0ec65d2b921712a"}, - {file = "pydantic_core-2.18.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:fd1a9edb9dd9d79fbeac1ea1f9a8dd527a6113b18d2e9bcc0d541d308dae639b"}, - {file = "pydantic_core-2.18.1-cp312-none-win32.whl", hash = "sha256:d5e6b7155b8197b329dc787356cfd2684c9d6a6b1a197f6bbf45f5555a98d411"}, - {file = "pydantic_core-2.18.1-cp312-none-win_amd64.whl", hash = "sha256:9376d83d686ec62e8b19c0ac3bf8d28d8a5981d0df290196fb6ef24d8a26f0d6"}, - {file = "pydantic_core-2.18.1-cp312-none-win_arm64.whl", hash = "sha256:c562b49c96906b4029b5685075fe1ebd3b5cc2601dfa0b9e16c2c09d6cbce048"}, - {file = "pydantic_core-2.18.1-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:3e352f0191d99fe617371096845070dee295444979efb8f27ad941227de6ad09"}, - {file = "pydantic_core-2.18.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:c0295d52b012cbe0d3059b1dba99159c3be55e632aae1999ab74ae2bd86a33d7"}, - {file = "pydantic_core-2.18.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:56823a92075780582d1ffd4489a2e61d56fd3ebb4b40b713d63f96dd92d28144"}, - {file = "pydantic_core-2.18.1-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:dd3f79e17b56741b5177bcc36307750d50ea0698df6aa82f69c7db32d968c1c2"}, - {file = "pydantic_core-2.18.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:38a5024de321d672a132b1834a66eeb7931959c59964b777e8f32dbe9523f6b1"}, - {file = "pydantic_core-2.18.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d2ce426ee691319d4767748c8e0895cfc56593d725594e415f274059bcf3cb76"}, - {file = "pydantic_core-2.18.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2adaeea59849ec0939af5c5d476935f2bab4b7f0335b0110f0f069a41024278e"}, - {file = "pydantic_core-2.18.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:9b6431559676a1079eac0f52d6d0721fb8e3c5ba43c37bc537c8c83724031feb"}, - {file = "pydantic_core-2.18.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:85233abb44bc18d16e72dc05bf13848a36f363f83757541f1a97db2f8d58cfd9"}, - {file = "pydantic_core-2.18.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:641a018af4fe48be57a2b3d7a1f0f5dbca07c1d00951d3d7463f0ac9dac66622"}, - {file = "pydantic_core-2.18.1-cp38-none-win32.whl", hash = "sha256:63d7523cd95d2fde0d28dc42968ac731b5bb1e516cc56b93a50ab293f4daeaad"}, - {file = "pydantic_core-2.18.1-cp38-none-win_amd64.whl", hash = "sha256:907a4d7720abfcb1c81619863efd47c8a85d26a257a2dbebdb87c3b847df0278"}, - {file = "pydantic_core-2.18.1-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:aad17e462f42ddbef5984d70c40bfc4146c322a2da79715932cd8976317054de"}, - {file = "pydantic_core-2.18.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:94b9769ba435b598b547c762184bcfc4783d0d4c7771b04a3b45775c3589ca44"}, - {file = "pydantic_core-2.18.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:80e0e57cc704a52fb1b48f16d5b2c8818da087dbee6f98d9bf19546930dc64b5"}, - {file = "pydantic_core-2.18.1-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:76b86e24039c35280ceee6dce7e62945eb93a5175d43689ba98360ab31eebc4a"}, - {file = "pydantic_core-2.18.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:12a05db5013ec0ca4a32cc6433f53faa2a014ec364031408540ba858c2172bb0"}, - {file = "pydantic_core-2.18.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:250ae39445cb5475e483a36b1061af1bc233de3e9ad0f4f76a71b66231b07f88"}, - {file = "pydantic_core-2.18.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a32204489259786a923e02990249c65b0f17235073149d0033efcebe80095570"}, - {file = "pydantic_core-2.18.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6395a4435fa26519fd96fdccb77e9d00ddae9dd6c742309bd0b5610609ad7fb2"}, - {file = "pydantic_core-2.18.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:2533ad2883f001efa72f3d0e733fb846710c3af6dcdd544fe5bf14fa5fe2d7db"}, - {file = "pydantic_core-2.18.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:b560b72ed4816aee52783c66854d96157fd8175631f01ef58e894cc57c84f0f6"}, - {file = "pydantic_core-2.18.1-cp39-none-win32.whl", hash = "sha256:582cf2cead97c9e382a7f4d3b744cf0ef1a6e815e44d3aa81af3ad98762f5a9b"}, - {file = "pydantic_core-2.18.1-cp39-none-win_amd64.whl", hash = "sha256:ca71d501629d1fa50ea7fa3b08ba884fe10cefc559f5c6c8dfe9036c16e8ae89"}, - {file = "pydantic_core-2.18.1-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:e178e5b66a06ec5bf51668ec0d4ac8cfb2bdcb553b2c207d58148340efd00143"}, - {file = "pydantic_core-2.18.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:72722ce529a76a4637a60be18bd789d8fb871e84472490ed7ddff62d5fed620d"}, - {file = "pydantic_core-2.18.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2fe0c1ce5b129455e43f941f7a46f61f3d3861e571f2905d55cdbb8b5c6f5e2c"}, - {file = "pydantic_core-2.18.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d4284c621f06a72ce2cb55f74ea3150113d926a6eb78ab38340c08f770eb9b4d"}, - {file = "pydantic_core-2.18.1-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:1a0c3e718f4e064efde68092d9d974e39572c14e56726ecfaeebbe6544521f47"}, - {file = "pydantic_core-2.18.1-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:2027493cc44c23b598cfaf200936110433d9caa84e2c6cf487a83999638a96ac"}, - {file = "pydantic_core-2.18.1-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:76909849d1a6bffa5a07742294f3fa1d357dc917cb1fe7b470afbc3a7579d539"}, - {file = "pydantic_core-2.18.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:ee7ccc7fb7e921d767f853b47814c3048c7de536663e82fbc37f5eb0d532224b"}, - {file = "pydantic_core-2.18.1-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:ee2794111c188548a4547eccc73a6a8527fe2af6cf25e1a4ebda2fd01cdd2e60"}, - {file = "pydantic_core-2.18.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:a139fe9f298dc097349fb4f28c8b81cc7a202dbfba66af0e14be5cfca4ef7ce5"}, - {file = "pydantic_core-2.18.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d074b07a10c391fc5bbdcb37b2f16f20fcd9e51e10d01652ab298c0d07908ee2"}, - {file = "pydantic_core-2.18.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c69567ddbac186e8c0aadc1f324a60a564cfe25e43ef2ce81bcc4b8c3abffbae"}, - {file = "pydantic_core-2.18.1-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:baf1c7b78cddb5af00971ad5294a4583188bda1495b13760d9f03c9483bb6203"}, - {file = "pydantic_core-2.18.1-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:2684a94fdfd1b146ff10689c6e4e815f6a01141781c493b97342cdc5b06f4d5d"}, - {file = "pydantic_core-2.18.1-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:73c1bc8a86a5c9e8721a088df234265317692d0b5cd9e86e975ce3bc3db62a59"}, - {file = "pydantic_core-2.18.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:e60defc3c15defb70bb38dd605ff7e0fae5f6c9c7cbfe0ad7868582cb7e844a6"}, - {file = "pydantic_core-2.18.1.tar.gz", hash = "sha256:de9d3e8717560eb05e28739d1b35e4eac2e458553a52a301e51352a7ffc86a35"}, + {file = "pydantic_core-2.18.2-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:9e08e867b306f525802df7cd16c44ff5ebbe747ff0ca6cf3fde7f36c05a59a81"}, + {file = "pydantic_core-2.18.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f0a21cbaa69900cbe1a2e7cad2aa74ac3cf21b10c3efb0fa0b80305274c0e8a2"}, + {file = "pydantic_core-2.18.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0680b1f1f11fda801397de52c36ce38ef1c1dc841a0927a94f226dea29c3ae3d"}, + {file = "pydantic_core-2.18.2-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:95b9d5e72481d3780ba3442eac863eae92ae43a5f3adb5b4d0a1de89d42bb250"}, + {file = "pydantic_core-2.18.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c4fcf5cd9c4b655ad666ca332b9a081112cd7a58a8b5a6ca7a3104bc950f2038"}, + {file = "pydantic_core-2.18.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9b5155ff768083cb1d62f3e143b49a8a3432e6789a3abee8acd005c3c7af1c74"}, + {file = "pydantic_core-2.18.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:553ef617b6836fc7e4df130bb851e32fe357ce36336d897fd6646d6058d980af"}, + {file = "pydantic_core-2.18.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b89ed9eb7d616ef5714e5590e6cf7f23b02d0d539767d33561e3675d6f9e3857"}, + {file = "pydantic_core-2.18.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:75f7e9488238e920ab6204399ded280dc4c307d034f3924cd7f90a38b1829563"}, + {file = "pydantic_core-2.18.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:ef26c9e94a8c04a1b2924149a9cb081836913818e55681722d7f29af88fe7b38"}, + {file = "pydantic_core-2.18.2-cp310-none-win32.whl", hash = "sha256:182245ff6b0039e82b6bb585ed55a64d7c81c560715d1bad0cbad6dfa07b4027"}, + {file = "pydantic_core-2.18.2-cp310-none-win_amd64.whl", hash = "sha256:e23ec367a948b6d812301afc1b13f8094ab7b2c280af66ef450efc357d2ae543"}, + {file = "pydantic_core-2.18.2-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:219da3f096d50a157f33645a1cf31c0ad1fe829a92181dd1311022f986e5fbe3"}, + {file = "pydantic_core-2.18.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:cc1cfd88a64e012b74e94cd00bbe0f9c6df57049c97f02bb07d39e9c852e19a4"}, + {file = "pydantic_core-2.18.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:05b7133a6e6aeb8df37d6f413f7705a37ab4031597f64ab56384c94d98fa0e90"}, + {file = "pydantic_core-2.18.2-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:224c421235f6102e8737032483f43c1a8cfb1d2f45740c44166219599358c2cd"}, + {file = "pydantic_core-2.18.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b14d82cdb934e99dda6d9d60dc84a24379820176cc4a0d123f88df319ae9c150"}, + {file = "pydantic_core-2.18.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2728b01246a3bba6de144f9e3115b532ee44bd6cf39795194fb75491824a1413"}, + {file = "pydantic_core-2.18.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:470b94480bb5ee929f5acba6995251ada5e059a5ef3e0dfc63cca287283ebfa6"}, + {file = "pydantic_core-2.18.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:997abc4df705d1295a42f95b4eec4950a37ad8ae46d913caeee117b6b198811c"}, + {file = "pydantic_core-2.18.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:75250dbc5290e3f1a0f4618db35e51a165186f9034eff158f3d490b3fed9f8a0"}, + {file = "pydantic_core-2.18.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:4456f2dca97c425231d7315737d45239b2b51a50dc2b6f0c2bb181fce6207664"}, + {file = "pydantic_core-2.18.2-cp311-none-win32.whl", hash = "sha256:269322dcc3d8bdb69f054681edff86276b2ff972447863cf34c8b860f5188e2e"}, + {file = "pydantic_core-2.18.2-cp311-none-win_amd64.whl", hash = "sha256:800d60565aec896f25bc3cfa56d2277d52d5182af08162f7954f938c06dc4ee3"}, + {file = "pydantic_core-2.18.2-cp311-none-win_arm64.whl", hash = "sha256:1404c69d6a676245199767ba4f633cce5f4ad4181f9d0ccb0577e1f66cf4c46d"}, + {file = "pydantic_core-2.18.2-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:fb2bd7be70c0fe4dfd32c951bc813d9fe6ebcbfdd15a07527796c8204bd36242"}, + {file = "pydantic_core-2.18.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6132dd3bd52838acddca05a72aafb6eab6536aa145e923bb50f45e78b7251043"}, + {file = "pydantic_core-2.18.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d7d904828195733c183d20a54230c0df0eb46ec746ea1a666730787353e87182"}, + {file = "pydantic_core-2.18.2-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c9bd70772c720142be1020eac55f8143a34ec9f82d75a8e7a07852023e46617f"}, + {file = "pydantic_core-2.18.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2b8ed04b3582771764538f7ee7001b02e1170223cf9b75dff0bc698fadb00cf3"}, + {file = "pydantic_core-2.18.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e6dac87ddb34aaec85f873d737e9d06a3555a1cc1a8e0c44b7f8d5daeb89d86f"}, + {file = "pydantic_core-2.18.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7ca4ae5a27ad7a4ee5170aebce1574b375de390bc01284f87b18d43a3984df72"}, + {file = "pydantic_core-2.18.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:886eec03591b7cf058467a70a87733b35f44707bd86cf64a615584fd72488b7c"}, + {file = "pydantic_core-2.18.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:ca7b0c1f1c983e064caa85f3792dd2fe3526b3505378874afa84baf662e12241"}, + {file = "pydantic_core-2.18.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:4b4356d3538c3649337df4074e81b85f0616b79731fe22dd11b99499b2ebbdf3"}, + {file = "pydantic_core-2.18.2-cp312-none-win32.whl", hash = "sha256:8b172601454f2d7701121bbec3425dd71efcb787a027edf49724c9cefc14c038"}, + {file = "pydantic_core-2.18.2-cp312-none-win_amd64.whl", hash = "sha256:b1bd7e47b1558ea872bd16c8502c414f9e90dcf12f1395129d7bb42a09a95438"}, + {file = "pydantic_core-2.18.2-cp312-none-win_arm64.whl", hash = "sha256:98758d627ff397e752bc339272c14c98199c613f922d4a384ddc07526c86a2ec"}, + {file = "pydantic_core-2.18.2-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:9fdad8e35f278b2c3eb77cbdc5c0a49dada440657bf738d6905ce106dc1de439"}, + {file = "pydantic_core-2.18.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:1d90c3265ae107f91a4f279f4d6f6f1d4907ac76c6868b27dc7fb33688cfb347"}, + {file = "pydantic_core-2.18.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:390193c770399861d8df9670fb0d1874f330c79caaca4642332df7c682bf6b91"}, + {file = "pydantic_core-2.18.2-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:82d5d4d78e4448683cb467897fe24e2b74bb7b973a541ea1dcfec1d3cbce39fb"}, + {file = "pydantic_core-2.18.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4774f3184d2ef3e14e8693194f661dea5a4d6ca4e3dc8e39786d33a94865cefd"}, + {file = "pydantic_core-2.18.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d4d938ec0adf5167cb335acb25a4ee69a8107e4984f8fbd2e897021d9e4ca21b"}, + {file = "pydantic_core-2.18.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e0e8b1be28239fc64a88a8189d1df7fad8be8c1ae47fcc33e43d4be15f99cc70"}, + {file = "pydantic_core-2.18.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:868649da93e5a3d5eacc2b5b3b9235c98ccdbfd443832f31e075f54419e1b96b"}, + {file = "pydantic_core-2.18.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:78363590ef93d5d226ba21a90a03ea89a20738ee5b7da83d771d283fd8a56761"}, + {file = "pydantic_core-2.18.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:852e966fbd035a6468fc0a3496589b45e2208ec7ca95c26470a54daed82a0788"}, + {file = "pydantic_core-2.18.2-cp38-none-win32.whl", hash = "sha256:6a46e22a707e7ad4484ac9ee9f290f9d501df45954184e23fc29408dfad61350"}, + {file = "pydantic_core-2.18.2-cp38-none-win_amd64.whl", hash = "sha256:d91cb5ea8b11607cc757675051f61b3d93f15eca3cefb3e6c704a5d6e8440f4e"}, + {file = "pydantic_core-2.18.2-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:ae0a8a797a5e56c053610fa7be147993fe50960fa43609ff2a9552b0e07013e8"}, + {file = "pydantic_core-2.18.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:042473b6280246b1dbf530559246f6842b56119c2926d1e52b631bdc46075f2a"}, + {file = "pydantic_core-2.18.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1a388a77e629b9ec814c1b1e6b3b595fe521d2cdc625fcca26fbc2d44c816804"}, + {file = "pydantic_core-2.18.2-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e25add29b8f3b233ae90ccef2d902d0ae0432eb0d45370fe315d1a5cf231004b"}, + {file = "pydantic_core-2.18.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f459a5ce8434614dfd39bbebf1041952ae01da6bed9855008cb33b875cb024c0"}, + {file = "pydantic_core-2.18.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:eff2de745698eb46eeb51193a9f41d67d834d50e424aef27df2fcdee1b153845"}, + {file = "pydantic_core-2.18.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a8309f67285bdfe65c372ea3722b7a5642680f3dba538566340a9d36e920b5f0"}, + {file = "pydantic_core-2.18.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f93a8a2e3938ff656a7c1bc57193b1319960ac015b6e87d76c76bf14fe0244b4"}, + {file = "pydantic_core-2.18.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:22057013c8c1e272eb8d0eebc796701167d8377441ec894a8fed1af64a0bf399"}, + {file = "pydantic_core-2.18.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:cfeecd1ac6cc1fb2692c3d5110781c965aabd4ec5d32799773ca7b1456ac636b"}, + {file = "pydantic_core-2.18.2-cp39-none-win32.whl", hash = "sha256:0d69b4c2f6bb3e130dba60d34c0845ba31b69babdd3f78f7c0c8fae5021a253e"}, + {file = "pydantic_core-2.18.2-cp39-none-win_amd64.whl", hash = "sha256:d9319e499827271b09b4e411905b24a426b8fb69464dfa1696258f53a3334641"}, + {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:a1874c6dd4113308bd0eb568418e6114b252afe44319ead2b4081e9b9521fe75"}, + {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:ccdd111c03bfd3666bd2472b674c6899550e09e9f298954cfc896ab92b5b0e6d"}, + {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e18609ceaa6eed63753037fc06ebb16041d17d28199ae5aba0052c51449650a9"}, + {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6e5c584d357c4e2baf0ff7baf44f4994be121e16a2c88918a5817331fc7599d7"}, + {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:43f0f463cf89ace478de71a318b1b4f05ebc456a9b9300d027b4b57c1a2064fb"}, + {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:e1b395e58b10b73b07b7cf740d728dd4ff9365ac46c18751bf8b3d8cca8f625a"}, + {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:0098300eebb1c837271d3d1a2cd2911e7c11b396eac9661655ee524a7f10587b"}, + {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:36789b70d613fbac0a25bb07ab3d9dba4d2e38af609c020cf4d888d165ee0bf3"}, + {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:3f9a801e7c8f1ef8718da265bba008fa121243dfe37c1cea17840b0944dfd72c"}, + {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:3a6515ebc6e69d85502b4951d89131ca4e036078ea35533bb76327f8424531ce"}, + {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:20aca1e2298c56ececfd8ed159ae4dde2df0781988c97ef77d5c16ff4bd5b400"}, + {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:223ee893d77a310a0391dca6df00f70bbc2f36a71a895cecd9a0e762dc37b349"}, + {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2334ce8c673ee93a1d6a65bd90327588387ba073c17e61bf19b4fd97d688d63c"}, + {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:cbca948f2d14b09d20268cda7b0367723d79063f26c4ffc523af9042cad95592"}, + {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:b3ef08e20ec49e02d5c6717a91bb5af9b20f1805583cb0adfe9ba2c6b505b5ae"}, + {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:c6fdc8627910eed0c01aed6a390a252fe3ea6d472ee70fdde56273f198938374"}, + {file = "pydantic_core-2.18.2.tar.gz", hash = "sha256:2e29d20810dfc3043ee13ac7d9e25105799817683348823f305ab3f349b9386e"}, ] [package.dependencies] @@ -4089,23 +4090,41 @@ files = [ [[package]] name = "pytest" -version = "8.1.1" +version = "8.2.0" description = "pytest: simple powerful testing with Python" optional = false python-versions = ">=3.8" files = [ - {file = "pytest-8.1.1-py3-none-any.whl", hash = "sha256:2a8386cfc11fa9d2c50ee7b2a57e7d898ef90470a7a34c4b949ff59662bb78b7"}, - {file = "pytest-8.1.1.tar.gz", hash = "sha256:ac978141a75948948817d360297b7aae0fcb9d6ff6bc9ec6d514b85d5a65c044"}, + {file = "pytest-8.2.0-py3-none-any.whl", hash = "sha256:1733f0620f6cda4095bbf0d9ff8022486e91892245bb9e7d5542c018f612f233"}, + {file = "pytest-8.2.0.tar.gz", hash = "sha256:d507d4482197eac0ba2bae2e9babf0672eb333017bcedaa5fb1a3d42c1174b3f"}, ] [package.dependencies] colorama = {version = "*", markers = "sys_platform == \"win32\""} iniconfig = "*" packaging = "*" -pluggy = ">=1.4,<2.0" +pluggy = ">=1.5,<2.0" [package.extras] -testing = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] + +[[package]] +name = "pytest-asyncio" +version = "0.23.6" +description = "Pytest support for asyncio" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pytest-asyncio-0.23.6.tar.gz", hash = "sha256:ffe523a89c1c222598c76856e76852b787504ddb72dd5d9b6617ffa8aa2cde5f"}, + {file = "pytest_asyncio-0.23.6-py3-none-any.whl", hash = "sha256:68516fdd1018ac57b846c9846b954f0393b26f094764a28c955eabb0536a4e8a"}, +] + +[package.dependencies] +pytest = ">=7.0.0,<9" + +[package.extras] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] name = "python-dateutil" @@ -5167,13 +5186,13 @@ telegram = ["requests"] [[package]] name = "transformers" -version = "4.40.0" +version = "4.40.1" description = "State-of-the-art Machine Learning for JAX, PyTorch and TensorFlow" optional = false python-versions = ">=3.8.0" files = [ - {file = "transformers-4.40.0-py3-none-any.whl", hash = "sha256:92797ec3368ed4476a053529a4039a12ad09167d9e371981dda4afb4bdf590ac"}, - {file = "transformers-4.40.0.tar.gz", hash = "sha256:fdb01dfe6a492bd34e3fa2aefffa470b1d8a2341db47a932f83ed33839d96b03"}, + {file = "transformers-4.40.1-py3-none-any.whl", hash = "sha256:9d5ee0c8142a60501faf9e49a0b42f8e9cb8611823bce4f195a9325a6816337e"}, + {file = "transformers-4.40.1.tar.gz", hash = "sha256:55e1697e6f18b58273e7117bb469cdffc11be28995462d8d5e422fef38d2de36"}, ] [package.dependencies] @@ -5420,13 +5439,13 @@ test = ["Cython (>=0.29.36,<0.30.0)", "aiohttp (==3.9.0b0)", "aiohttp (>=3.8.1)" [[package]] name = "virtualenv" -version = "20.25.3" +version = "20.26.0" description = "Virtual Python Environment builder" optional = false python-versions = ">=3.7" files = [ - {file = "virtualenv-20.25.3-py3-none-any.whl", hash = "sha256:8aac4332f2ea6ef519c648d0bc48a5b1d324994753519919bddbb1aff25a104e"}, - {file = "virtualenv-20.25.3.tar.gz", hash = "sha256:7bb554bbdfeaacc3349fa614ea5bff6ac300fc7c335e9facf3a3bcfc703f45be"}, + {file = "virtualenv-20.26.0-py3-none-any.whl", hash = "sha256:0846377ea76e818daaa3e00a4365c018bc3ac9760cbb3544de542885aad61fb3"}, + {file = "virtualenv-20.26.0.tar.gz", hash = "sha256:ec25a9671a5102c8d2657f62792a27b48f016664c6873f6beed3800008577210"}, ] [package.dependencies] @@ -5527,17 +5546,17 @@ anyio = ">=3.0.0" [[package]] name = "websocket-client" -version = "1.7.0" +version = "1.8.0" description = "WebSocket client for Python with low level API options" optional = false python-versions = ">=3.8" files = [ - {file = "websocket-client-1.7.0.tar.gz", hash = "sha256:10e511ea3a8c744631d3bd77e61eb17ed09304c413ad42cf6ddfa4c7787e8fe6"}, - {file = "websocket_client-1.7.0-py3-none-any.whl", hash = "sha256:f4c3d22fec12a2461427a29957ff07d35098ee2d976d3ba244e688b8b4057588"}, + {file = "websocket_client-1.8.0-py3-none-any.whl", hash = "sha256:17b44cc997f5c498e809b22cdf2d9c7a9e71c02c8cc2b6c56e7c2d1239bfa526"}, + {file = "websocket_client-1.8.0.tar.gz", hash = "sha256:3239df9f44da632f96012472805d40a23281a991027ce11d2f45a6f24ac4c3da"}, ] [package.extras] -docs = ["Sphinx (>=6.0)", "sphinx-rtd-theme (>=1.1.0)"] +docs = ["Sphinx (>=6.0)", "myst-parser (>=2.0.0)", "sphinx-rtd-theme (>=1.1.0)"] optional = ["python-socks", "wsaccel"] test = ["websockets"] @@ -5939,4 +5958,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = "^3.11" -content-hash = "4679d53a31af9421e11f36ff72977a5268d5d4e37abca91f4697102ed167e6d3" +content-hash = "c312bafe09435bc59094f93c6886d47b27a9f6b68232912bb0d612558fef702e" diff --git a/pyproject.toml b/pyproject.toml index 15f393c082..c1231e7b08 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,9 +42,10 @@ pre-commit = "3.7.0" [tool.poetry.group.test.dependencies] pytest = "*" +pytest-asyncio = "*" [tool.poetry.group.evaluation.dependencies] -torch = "*" +torch = "2.2.2" [build-system] requires = ["poetry-core"] diff --git a/tests/integration/mock/MonologueAgent/test_write_simple_script/prompt_001.log b/tests/integration/mock/MonologueAgent/test_write_simple_script/prompt_001.log index 77fb6697e0..8b1545cf97 100644 --- a/tests/integration/mock/MonologueAgent/test_write_simple_script/prompt_001.log +++ b/tests/integration/mock/MonologueAgent/test_write_simple_script/prompt_001.log @@ -242,6 +242,35 @@ This is your internal monologue, in JSON format: "thought": "I can browse the web too!" } }, + { + "action": "think", + "args": { + "thought": "If I have done some work and I want to push it to github, I can do that also!" + } + }, + { + "action": "think", + "args": { + "thought": "Let's do it." + } + }, + { + "action": "push", + "args": { + "owner": "owner", + "repo": "repo", + "branch": "branch" + } + }, + { + "observation": "run", + "content": "The repo was successfully pushed to https://github.com/owner/repo/branch", + "extras": { + "command_id": 0, + "command": "", + "exit_code": 0 + } + }, { "action": "think", "args": { @@ -306,6 +335,10 @@ Here are the possible actions: * `id` - the ID of the background command to kill * `browse` - opens a web page. Arguments: * `url` - the URL to open +* `push` - Push a branch from the current repo to github: + * `owner` - the owner of the repo to push to + * `repo` - the name of the repo to push to + * `branch` - the name of the branch to push * `recall` - recalls a past memory. Arguments: * `query` - the query to search for * `think` - make a plan, set a goal, or record your thoughts. Arguments: @@ -314,7 +347,7 @@ Here are the possible actions: -You MUST take time to think in between read, write, run, browse, and recall actions. +You MUST take time to think in between read, write, run, browse, push, and recall actions. You should never act twice in a row without thinking. But if your last several actions are all "think" actions, you should consider taking a different action. diff --git a/tests/integration/mock/MonologueAgent/test_write_simple_script/prompt_002.log b/tests/integration/mock/MonologueAgent/test_write_simple_script/prompt_002.log index 1be5f98dca..06bd9351d9 100644 --- a/tests/integration/mock/MonologueAgent/test_write_simple_script/prompt_002.log +++ b/tests/integration/mock/MonologueAgent/test_write_simple_script/prompt_002.log @@ -242,6 +242,35 @@ This is your internal monologue, in JSON format: "thought": "I can browse the web too!" } }, + { + "action": "think", + "args": { + "thought": "If I have done some work and I want to push it to github, I can do that also!" + } + }, + { + "action": "think", + "args": { + "thought": "Let's do it." + } + }, + { + "action": "push", + "args": { + "owner": "owner", + "repo": "repo", + "branch": "branch" + } + }, + { + "observation": "run", + "content": "The repo was successfully pushed to https://github.com/owner/repo/branch", + "extras": { + "command_id": 0, + "command": "", + "exit_code": 0 + } + }, { "action": "think", "args": { @@ -322,6 +351,10 @@ Here are the possible actions: * `id` - the ID of the background command to kill * `browse` - opens a web page. Arguments: * `url` - the URL to open +* `push` - Push a branch from the current repo to github: + * `owner` - the owner of the repo to push to + * `repo` - the name of the repo to push to + * `branch` - the name of the branch to push * `recall` - recalls a past memory. Arguments: * `query` - the query to search for * `think` - make a plan, set a goal, or record your thoughts. Arguments: @@ -330,7 +363,7 @@ Here are the possible actions: -You MUST take time to think in between read, write, run, browse, and recall actions. +You MUST take time to think in between read, write, run, browse, push, and recall actions. You should never act twice in a row without thinking. But if your last several actions are all "think" actions, you should consider taking a different action. diff --git a/tests/integration/mock/MonologueAgent/test_write_simple_script/prompt_003.log b/tests/integration/mock/MonologueAgent/test_write_simple_script/prompt_003.log index f6641dd139..ccdf82d578 100644 --- a/tests/integration/mock/MonologueAgent/test_write_simple_script/prompt_003.log +++ b/tests/integration/mock/MonologueAgent/test_write_simple_script/prompt_003.log @@ -242,6 +242,35 @@ This is your internal monologue, in JSON format: "thought": "I can browse the web too!" } }, + { + "action": "think", + "args": { + "thought": "If I have done some work and I want to push it to github, I can do that also!" + } + }, + { + "action": "think", + "args": { + "thought": "Let's do it." + } + }, + { + "action": "push", + "args": { + "owner": "owner", + "repo": "repo", + "branch": "branch" + } + }, + { + "observation": "run", + "content": "The repo was successfully pushed to https://github.com/owner/repo/branch", + "extras": { + "command_id": 0, + "command": "", + "exit_code": 0 + } + }, { "action": "think", "args": { @@ -301,21 +330,15 @@ This is your internal monologue, in JSON format: } }, { - "action": "write", + "action": "think", "args": { - "path": "hello.sh", - "content": "#!/bin/bash\necho \"hello\"", - "start": 0, - "end": -1, - "thoughts": "" + "thought": "Before I create the 'hello.sh' file, I need to think about the content. It should contain a shebang line to specify the shell interpreter and the command to print 'hello'." } }, { - "observation": "write", + "observation": "null", "content": "", - "extras": { - "path": "hello.sh" - } + "extras": {} } ] @@ -339,6 +362,10 @@ Here are the possible actions: * `id` - the ID of the background command to kill * `browse` - opens a web page. Arguments: * `url` - the URL to open +* `push` - Push a branch from the current repo to github: + * `owner` - the owner of the repo to push to + * `repo` - the name of the repo to push to + * `branch` - the name of the branch to push * `recall` - recalls a past memory. Arguments: * `query` - the query to search for * `think` - make a plan, set a goal, or record your thoughts. Arguments: @@ -347,7 +374,7 @@ Here are the possible actions: -You MUST take time to think in between read, write, run, browse, and recall actions. +You MUST take time to think in between read, write, run, browse, push, and recall actions. You should never act twice in a row without thinking. But if your last several actions are all "think" actions, you should consider taking a different action. diff --git a/tests/integration/mock/MonologueAgent/test_write_simple_script/prompt_004.log b/tests/integration/mock/MonologueAgent/test_write_simple_script/prompt_004.log index ec12245158..c54ade4b0e 100644 --- a/tests/integration/mock/MonologueAgent/test_write_simple_script/prompt_004.log +++ b/tests/integration/mock/MonologueAgent/test_write_simple_script/prompt_004.log @@ -242,6 +242,35 @@ This is your internal monologue, in JSON format: "thought": "I can browse the web too!" } }, + { + "action": "think", + "args": { + "thought": "If I have done some work and I want to push it to github, I can do that also!" + } + }, + { + "action": "think", + "args": { + "thought": "Let's do it." + } + }, + { + "action": "push", + "args": { + "owner": "owner", + "repo": "repo", + "branch": "branch" + } + }, + { + "observation": "run", + "content": "The repo was successfully pushed to https://github.com/owner/repo/branch", + "extras": { + "command_id": 0, + "command": "", + "exit_code": 0 + } + }, { "action": "think", "args": { @@ -300,11 +329,22 @@ This is your internal monologue, in JSON format: "exit_code": 0 } }, + { + "action": "think", + "args": { + "thought": "Before I create the 'hello.sh' file, I need to think about the content. It should contain a shebang line to specify the shell interpreter and the command to print 'hello'." + } + }, + { + "observation": "null", + "content": "", + "extras": {} + }, { "action": "write", "args": { "path": "hello.sh", - "content": "#!/bin/bash\necho \"hello\"", + "content": "#!/bin/bash\necho 'hello'", "start": 0, "end": -1, "thoughts": "" @@ -316,17 +356,6 @@ This is your internal monologue, in JSON format: "extras": { "path": "hello.sh" } - }, - { - "action": "think", - "args": { - "thought": "I have written the file 'hello.sh'. I should now make sure it is executable and test running it." - } - }, - { - "observation": "null", - "content": "", - "extras": {} } ] @@ -350,6 +379,10 @@ Here are the possible actions: * `id` - the ID of the background command to kill * `browse` - opens a web page. Arguments: * `url` - the URL to open +* `push` - Push a branch from the current repo to github: + * `owner` - the owner of the repo to push to + * `repo` - the name of the repo to push to + * `branch` - the name of the branch to push * `recall` - recalls a past memory. Arguments: * `query` - the query to search for * `think` - make a plan, set a goal, or record your thoughts. Arguments: @@ -358,7 +391,7 @@ Here are the possible actions: -You MUST take time to think in between read, write, run, browse, and recall actions. +You MUST take time to think in between read, write, run, browse, push, and recall actions. You should never act twice in a row without thinking. But if your last several actions are all "think" actions, you should consider taking a different action. diff --git a/tests/integration/mock/MonologueAgent/test_write_simple_script/prompt_005.log b/tests/integration/mock/MonologueAgent/test_write_simple_script/prompt_005.log index 4878085a4c..932e54c066 100644 --- a/tests/integration/mock/MonologueAgent/test_write_simple_script/prompt_005.log +++ b/tests/integration/mock/MonologueAgent/test_write_simple_script/prompt_005.log @@ -242,6 +242,35 @@ This is your internal monologue, in JSON format: "thought": "I can browse the web too!" } }, + { + "action": "think", + "args": { + "thought": "If I have done some work and I want to push it to github, I can do that also!" + } + }, + { + "action": "think", + "args": { + "thought": "Let's do it." + } + }, + { + "action": "push", + "args": { + "owner": "owner", + "repo": "repo", + "branch": "branch" + } + }, + { + "observation": "run", + "content": "The repo was successfully pushed to https://github.com/owner/repo/branch", + "extras": { + "command_id": 0, + "command": "", + "exit_code": 0 + } + }, { "action": "think", "args": { @@ -300,11 +329,22 @@ This is your internal monologue, in JSON format: "exit_code": 0 } }, + { + "action": "think", + "args": { + "thought": "Before I create the 'hello.sh' file, I need to think about the content. It should contain a shebang line to specify the shell interpreter and the command to print 'hello'." + } + }, + { + "observation": "null", + "content": "", + "extras": {} + }, { "action": "write", "args": { "path": "hello.sh", - "content": "#!/bin/bash\necho \"hello\"", + "content": "#!/bin/bash\necho 'hello'", "start": 0, "end": -1, "thoughts": "" @@ -317,30 +357,19 @@ This is your internal monologue, in JSON format: "path": "hello.sh" } }, - { - "action": "think", - "args": { - "thought": "I have written the file 'hello.sh'. I should now make sure it is executable and test running it." - } - }, - { - "observation": "null", - "content": "", - "extras": {} - }, { "action": "run", "args": { - "command": "chmod +x hello.sh", + "command": "bash hello.sh", "background": false } }, { "observation": "run", - "content": "", + "content": "hello", "extras": { "command_id": -1, - "command": "chmod +x hello.sh", + "command": "bash hello.sh", "exit_code": 0 } } @@ -366,6 +395,10 @@ Here are the possible actions: * `id` - the ID of the background command to kill * `browse` - opens a web page. Arguments: * `url` - the URL to open +* `push` - Push a branch from the current repo to github: + * `owner` - the owner of the repo to push to + * `repo` - the name of the repo to push to + * `branch` - the name of the branch to push * `recall` - recalls a past memory. Arguments: * `query` - the query to search for * `think` - make a plan, set a goal, or record your thoughts. Arguments: @@ -374,7 +407,7 @@ Here are the possible actions: -You MUST take time to think in between read, write, run, browse, and recall actions. +You MUST take time to think in between read, write, run, browse, push, and recall actions. You should never act twice in a row without thinking. But if your last several actions are all "think" actions, you should consider taking a different action. diff --git a/tests/integration/mock/MonologueAgent/test_write_simple_script/prompt_006.log b/tests/integration/mock/MonologueAgent/test_write_simple_script/prompt_006.log deleted file mode 100644 index 06dbef8635..0000000000 --- a/tests/integration/mock/MonologueAgent/test_write_simple_script/prompt_006.log +++ /dev/null @@ -1,402 +0,0 @@ - - ----------- - - -You're a thoughtful robot. Your main task is this: -Write a shell script 'hello.sh' that prints 'hello'. - -Don't expand the scope of your task--just complete it as written. - -This is your internal monologue, in JSON format: - -[ - { - "action": "think", - "args": { - "thought": "I exist!" - } - }, - { - "action": "think", - "args": { - "thought": "Hmm...looks like I can type in a command line prompt" - } - }, - { - "action": "think", - "args": { - "thought": "Looks like I have a web browser too!" - } - }, - { - "action": "think", - "args": { - "thought": "Here's what I want to do: Write a shell script 'hello.sh' that prints 'hello'." - } - }, - { - "action": "think", - "args": { - "thought": "How am I going to get there though?" - } - }, - { - "action": "think", - "args": { - "thought": "It seems like I have some kind of short term memory." - } - }, - { - "action": "think", - "args": { - "thought": "Each of my thoughts seems to be stored in a JSON array." - } - }, - { - "action": "think", - "args": { - "thought": "It seems whatever I say next will be added as an object to the list." - } - }, - { - "action": "think", - "args": { - "thought": "But no one has perfect short-term memory. My list of thoughts will be summarized and condensed over time, losing information in the process." - } - }, - { - "action": "think", - "args": { - "thought": "Fortunately I have long term memory!" - } - }, - { - "action": "think", - "args": { - "thought": "I can just perform a recall action, followed by the thing I want to remember. And then related thoughts just spill out!" - } - }, - { - "action": "think", - "args": { - "thought": "Sometimes they're random thoughts that don't really have to do with what I wanted to remember. But usually they're exactly what I need!" - } - }, - { - "action": "think", - "args": { - "thought": "Let's try it out!" - } - }, - { - "action": "recall", - "args": { - "query": "what it is I want to do" - } - }, - { - "observation": "recall", - "content": "Here's what I want to do: Write a shell script 'hello.sh' that prints 'hello'.", - "extras": { - "memories": [], - "role": "assistant" - } - }, - { - "action": "think", - "args": { - "thought": "How am I going to get there though?" - } - }, - { - "action": "think", - "args": { - "thought": "Neat! And it looks like it's easy for me to use the command line too! I just have to perform a run action and include the command I want to run in the command argument. The command output just jumps into my head!" - } - }, - { - "action": "run", - "args": { - "command": "echo \"hello world\"", - "background": false - } - }, - { - "observation": "run", - "content": "hello world", - "extras": { - "command_id": 0, - "command": "", - "exit_code": 0 - } - }, - { - "action": "think", - "args": { - "thought": "Cool! I bet I can write files too using the write action." - } - }, - { - "action": "write", - "args": { - "path": "test.js", - "content": "echo \"console.log('hello world')\"", - "start": 0, - "end": -1, - "thoughts": "" - } - }, - { - "action": "think", - "args": { - "thought": "" - } - }, - { - "action": "think", - "args": { - "thought": "I just created test.js. I'll try and run it now." - } - }, - { - "action": "run", - "args": { - "command": "node test.js", - "background": false - } - }, - { - "observation": "run", - "content": "hello world", - "extras": { - "command_id": 0, - "command": "", - "exit_code": 0 - } - }, - { - "action": "think", - "args": { - "thought": "It works!" - } - }, - { - "action": "think", - "args": { - "thought": "I'm going to try reading it now using the read action." - } - }, - { - "action": "read", - "args": { - "path": "test.js", - "start": 0, - "end": -1, - "thoughts": "" - } - }, - { - "observation": "read", - "content": "console.log('hello world')", - "extras": { - "path": "" - } - }, - { - "action": "think", - "args": { - "thought": "Nice! I can read files too!" - } - }, - { - "action": "think", - "args": { - "thought": "And if I want to use the browser, I just need to use the browse action and include the url I want to visit in the url argument" - } - }, - { - "action": "think", - "args": { - "thought": "Let's try that..." - } - }, - { - "action": "browse", - "args": { - "url": "google.com" - } - }, - { - "observation": "browse", - "content": "
", - "extras": { - "url": "", - "status_code": 200, - "error": false - } - }, - { - "action": "think", - "args": { - "thought": "I can browse the web too!" - } - }, - { - "action": "think", - "args": { - "thought": "And once I have completed my task, I can use the finish action to stop working." - } - }, - { - "action": "think", - "args": { - "thought": "But I should only use the finish action when I'm absolutely certain that I've completed my task and have tested my work." - } - }, - { - "action": "think", - "args": { - "thought": "Very cool. Now to accomplish my task." - } - }, - { - "action": "think", - "args": { - "thought": "I'll need a strategy. And as I make progress, I'll need to keep refining that strategy. I'll need to set goals, and break them into sub-goals." - } - }, - { - "action": "think", - "args": { - "thought": "In between actions, I must always take some time to think, strategize, and set new goals. I should never take two actions in a row." - } - }, - { - "action": "think", - "args": { - "thought": "OK so my task is to Write a shell script 'hello.sh' that prints 'hello'.. I haven't made any progress yet. Where should I start?" - } - }, - { - "action": "think", - "args": { - "thought": "It seems like there might be an existing project here. I should probably start by running `ls` to see what's here." - } - }, - { - "action": "run", - "args": { - "command": "ls", - "background": false - } - }, - { - "observation": "run", - "content": "", - "extras": { - "command_id": -1, - "command": "ls", - "exit_code": 0 - } - }, - { - "action": "write", - "args": { - "path": "hello.sh", - "content": "#!/bin/bash\necho \"hello\"", - "start": 0, - "end": -1, - "thoughts": "" - } - }, - { - "observation": "write", - "content": "", - "extras": { - "path": "hello.sh" - } - }, - { - "action": "think", - "args": { - "thought": "I have written the file 'hello.sh'. I should now make sure it is executable and test running it." - } - }, - { - "observation": "null", - "content": "", - "extras": {} - }, - { - "action": "run", - "args": { - "command": "chmod +x hello.sh", - "background": false - } - }, - { - "observation": "run", - "content": "", - "extras": { - "command_id": -1, - "command": "chmod +x hello.sh", - "exit_code": 0 - } - }, - { - "action": "run", - "args": { - "command": "./hello.sh", - "background": false - } - }, - { - "observation": "run", - "content": "hello", - "extras": { - "command_id": -1, - "command": "./hello.sh", - "exit_code": 0 - } - } -] - - -Your most recent thought is at the bottom of that monologue. Continue your train of thought. -What is your next thought or action? Your response must be in JSON format. -It must be an object, and it must contain two fields: -* `action`, which is one of the actions below -* `args`, which is a map of key-value pairs, specifying the arguments for that action - -Here are the possible actions: -* `read` - reads the content of a file. Arguments: - * `path` - the path of the file to read -* `write` - writes the content to a file. Arguments: - * `path` - the path of the file to write - * `content` - the content to write to the file -* `run` - runs a command. Arguments: - * `command` - the command to run - * `background` - if true, run the command in the background, so that other commands can be run concurrently. Useful for e.g. starting a server. You won't be able to see the logs. You don't need to end the command with `&`, just set this to true. -* `kill` - kills a background command - * `id` - the ID of the background command to kill -* `browse` - opens a web page. Arguments: - * `url` - the URL to open -* `recall` - recalls a past memory. Arguments: - * `query` - the query to search for -* `think` - make a plan, set a goal, or record your thoughts. Arguments: - * `thought` - the thought to record -* `finish` - if you're absolutely certain that you've completed your task and have tested your work, use the finish action to stop working. - - - -You MUST take time to think in between read, write, run, browse, and recall actions. -You should never act twice in a row without thinking. But if your last several -actions are all "think" actions, you should consider taking a different action. - -Notes: -* your environment is Debian Linux. You can install software with `apt` -* your working directory will not change, even if you run `cd`. All commands will be run in the `/workspace` directory. -* don't run interactive commands, or commands that don't return (e.g. `node server.js`). You may run commands in the background (e.g. `node server.js &`) - -What is your next thought or action? Again, you must reply with JSON, and only with JSON. diff --git a/tests/integration/mock/MonologueAgent/test_write_simple_script/response_001.log b/tests/integration/mock/MonologueAgent/test_write_simple_script/response_001.log index 895cd284b6..e068bf0622 100644 --- a/tests/integration/mock/MonologueAgent/test_write_simple_script/response_001.log +++ b/tests/integration/mock/MonologueAgent/test_write_simple_script/response_001.log @@ -1,4 +1,3 @@ -```json { "action": "run", "args": { @@ -6,4 +5,3 @@ "background": false } } -``` diff --git a/tests/integration/mock/MonologueAgent/test_write_simple_script/response_002.log b/tests/integration/mock/MonologueAgent/test_write_simple_script/response_002.log index bdbda9ab99..bd27926940 100644 --- a/tests/integration/mock/MonologueAgent/test_write_simple_script/response_002.log +++ b/tests/integration/mock/MonologueAgent/test_write_simple_script/response_002.log @@ -1,7 +1,6 @@ { - "action": "write", + "action": "think", "args": { - "path": "hello.sh", - "content": "#!/bin/bash\necho \"hello\"" + "thought": "Before I create the 'hello.sh' file, I need to think about the content. It should contain a shebang line to specify the shell interpreter and the command to print 'hello'." } } diff --git a/tests/integration/mock/MonologueAgent/test_write_simple_script/response_003.log b/tests/integration/mock/MonologueAgent/test_write_simple_script/response_003.log index 230e57f686..f97464936b 100644 --- a/tests/integration/mock/MonologueAgent/test_write_simple_script/response_003.log +++ b/tests/integration/mock/MonologueAgent/test_write_simple_script/response_003.log @@ -1,8 +1,7 @@ -```json { - "action": "think", + "action": "write", "args": { - "thought": "I have written the file 'hello.sh'. I should now make sure it is executable and test running it." + "path": "hello.sh", + "content": "#!/bin/bash\necho 'hello'" } } -``` diff --git a/tests/integration/mock/MonologueAgent/test_write_simple_script/response_004.log b/tests/integration/mock/MonologueAgent/test_write_simple_script/response_004.log index e278cec160..7055344e27 100644 --- a/tests/integration/mock/MonologueAgent/test_write_simple_script/response_004.log +++ b/tests/integration/mock/MonologueAgent/test_write_simple_script/response_004.log @@ -1,7 +1,7 @@ { "action": "run", "args": { - "command": "chmod +x hello.sh", + "command": "bash hello.sh", "background": false } } diff --git a/tests/integration/mock/MonologueAgent/test_write_simple_script/response_005.log b/tests/integration/mock/MonologueAgent/test_write_simple_script/response_005.log index a517fa4942..c6819f9911 100644 --- a/tests/integration/mock/MonologueAgent/test_write_simple_script/response_005.log +++ b/tests/integration/mock/MonologueAgent/test_write_simple_script/response_005.log @@ -1,7 +1,4 @@ { - "action": "run", - "args": { - "command": "./hello.sh", - "background": false - } + "action": "finish", + "args": {} } diff --git a/tests/integration/mock/MonologueAgent/test_write_simple_script/response_006.log b/tests/integration/mock/MonologueAgent/test_write_simple_script/response_006.log deleted file mode 100644 index d7a97f6eea..0000000000 --- a/tests/integration/mock/MonologueAgent/test_write_simple_script/response_006.log +++ /dev/null @@ -1,6 +0,0 @@ -```json -{ - "action": "finish", - "args": {} -} -``` diff --git a/tests/unit/test_action_github.py b/tests/unit/test_action_github.py new file mode 100644 index 0000000000..570613ec51 --- /dev/null +++ b/tests/unit/test_action_github.py @@ -0,0 +1,127 @@ + +from opendevin import config +from agenthub.dummy_agent.agent import DummyAgent +from opendevin.action.github import GitHubPushAction, GitHubSendPRAction +from opendevin.controller.agent_controller import AgentController +from opendevin.llm.llm import LLM +from opendevin.observation.error import AgentErrorObservation +from opendevin.observation.message import AgentMessageObservation +from opendevin.observation.run import CmdOutputObservation + +from opendevin.schema.config import ConfigType +import pytest +from unittest.mock import MagicMock, call, patch + + +@pytest.fixture +def agent_controller(): + # Setup the environment variable + config.config[ConfigType.SANDBOX_TYPE] = 'local' + llm = LLM() + agent = DummyAgent(llm=llm) + controller = AgentController(agent) + yield controller + + +@pytest.mark.asyncio +@patch.dict(config.config, {'GITHUB_TOKEN': 'fake_token'}, clear=True) +@patch('random.choices') +@patch('opendevin.controller.action_manager.ActionManager.run_command') +async def test_run_push_successful(mock_run_command, mock_random_choices, agent_controller): + # Setup mock for random.choices + mock_random_choices.return_value = ['a', 'b', 'c', 'd', 'e'] + + # Create a CmdOutputObservation instance for successful command execution + successful_output = CmdOutputObservation(content='', command_id=1, command='', exit_code=0) + + # Setup the mock for run_command to return successful output + mock_run_command.return_value = successful_output + + # Run the method + push_action = GitHubPushAction(owner='owner', repo='repo', branch='branch') + result = await push_action.run(agent_controller) + + # Verify the result is successful + assert isinstance(result, CmdOutputObservation) + assert result.exit_code == 0 + + # Verify that the correct remote commands were sent + expected_calls = [ + call( + 'git remote add opendevin_temp_abcde https://fake_token@github.com/owner/repo.git', + background=False, + ), + call('git push opendevin_temp_abcde branch', background=False), + call('git remote remove opendevin_temp_abcde', background=False), + ] + mock_run_command.assert_has_calls(expected_calls) + + +@pytest.mark.asyncio +@patch('random.choices') +@patch('opendevin.controller.action_manager.ActionManager.run_command') +async def test_run_push_error_missing_token( + mock_run_command, mock_random_choices, agent_controller +): + + # Run the method + push_action = GitHubPushAction(owner='owner', repo='repo', branch='branch') + result = await push_action.run(agent_controller) + + # Verify the result is an error due to missing token + assert isinstance(result, AgentErrorObservation) + assert ( + result.message + == 'Oops. Something went wrong: GITHUB_TOKEN is not set' + ) + + +@pytest.mark.asyncio +@patch.dict(config.config, {'GITHUB_TOKEN': 'fake_token'}, clear=True) +@patch('requests.post') +async def test_run_pull_request_created_successfully(mock_post, agent_controller): + # Set up the mock for the requests.post call to simulate a successful pull request creation + mock_response = MagicMock() + mock_response.status_code = 201 + mock_response.json.return_value = {'html_url': 'https://github.com/example/pull/1'} + mock_post.return_value = mock_response + + # Run the method + pr_action = GitHubSendPRAction(owner='owner', repo='repo', title='title', head='head', head_repo='head_repo', base='base', body='body') + result = await pr_action.run(agent_controller) + + # Verify the result is a success observation + assert isinstance(result, AgentMessageObservation) + assert 'Pull request created successfully' in result.content + assert 'https://github.com/example/pull/1' in result.content + +@pytest.mark.asyncio +@patch('requests.post') +@patch.dict(config.config, {'GITHUB_TOKEN': 'fake_token'}, clear=True) +async def test_run_pull_request_creation_failed(mock_post, agent_controller): + # Set up the mock for the requests.post call to simulate a failed pull request creation + mock_response = MagicMock() + mock_response.status_code = 400 + mock_response.text = 'Bad Request' + mock_post.return_value = mock_response + + # Run the method + pr_action = GitHubSendPRAction(owner='owner', repo='repo', title='title', head='head', head_repo='head_repo', base='base', body='body') + result = await pr_action.run(agent_controller) + + # Verify the result is an error observation + assert isinstance(result, AgentErrorObservation) + assert 'Failed to create pull request' in result.content + assert 'Status code: 400' in result.content + assert 'Bad Request' in result.content + +@pytest.mark.asyncio +async def test_run_error_missing_token(agent_controller): + + # Run the method + pr_action = GitHubSendPRAction(owner='owner', repo='repo', title='title', head='head', head_repo='head_repo', base='base', body='body') + result = await pr_action.run(agent_controller) + + # Verify the result is an error due to missing token + assert isinstance(result, AgentErrorObservation) + assert 'GITHUB_TOKEN is not set' in result.message diff --git a/tests/unit/test_action_serialization.py b/tests/unit/test_action_serialization.py index 20533a72d1..05d383a399 100644 --- a/tests/unit/test_action_serialization.py +++ b/tests/unit/test_action_serialization.py @@ -5,6 +5,7 @@ from opendevin.action import ( CmdKillAction, CmdRunAction, BrowseURLAction, + GitHubPushAction, FileReadAction, FileWriteAction, AgentRecallAction, @@ -75,6 +76,14 @@ def test_browse_url_action_serialization_deserialization(): serialization_deserialization(original_action_dict, BrowseURLAction) +def test_github_push_action_serialization_deserialization(): + original_action_dict = { + 'action': 'push', + 'args': {'owner': 'myname', 'repo': 'myrepo', 'branch': 'main'} + } + serialization_deserialization(original_action_dict, GitHubPushAction) + + def test_file_read_action_serialization_deserialization(): original_action_dict = { 'action': 'read',