-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SYNPY-1544] Synapse Agent OOP Model #1152
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This comment was marked as outdated.
This comment was marked as outdated.
BryanFauble
reviewed
Jan 8, 2025
BryanFauble
reviewed
Jan 8, 2025
BryanFauble
reviewed
Jan 8, 2025
BryanFauble
reviewed
Jan 8, 2025
BryanFauble
reviewed
Jan 8, 2025
BryanFauble
reviewed
Jan 8, 2025
BryanFauble
reviewed
Jan 8, 2025
BryanFauble
reviewed
Jan 8, 2025
BryanFauble
reviewed
Jan 8, 2025
BryanFauble
reviewed
Jan 8, 2025
BryanFauble
reviewed
Jan 8, 2025
BryanFauble
reviewed
Jan 8, 2025
BryanFauble
reviewed
Jan 8, 2025
BryanFauble
reviewed
Jan 8, 2025
BryanFauble
reviewed
Jan 8, 2025
BryanFauble
reviewed
Jan 8, 2025
@BryanFauble Ah yes the agent will need to be registered in Synapse Dev. |
BryanFauble
reviewed
Jan 22, 2025
BryanFauble
reviewed
Jan 22, 2025
BryanFauble
reviewed
Jan 22, 2025
BryanFauble
reviewed
Jan 22, 2025
BryanFauble
reviewed
Jan 22, 2025
BryanFauble
reviewed
Jan 22, 2025
BryanFauble
reviewed
Jan 22, 2025
BryanFauble
reviewed
Jan 22, 2025
BryanFauble
reviewed
Jan 22, 2025
BryanFauble
reviewed
Jan 22, 2025
BryanFauble
reviewed
Jan 22, 2025
BryanFauble
reviewed
Jan 22, 2025
BryanFauble
reviewed
Jan 22, 2025
BryanFauble
approved these changes
Jan 23, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome changes! This all looks good to me.
When all the tests are passing we can move forward on merging the changes.
BryanFauble
reviewed
Jan 24, 2025
tests/integration/synapseclient/models/synchronous/test_agent.py
Outdated
Show resolved
Hide resolved
BWMac
added a commit
that referenced
this pull request
Feb 3, 2025
* [SYNPY-1544] Synapse Agent OOP Model (#1152) * Adds async convenience functions * expose convenience functions * updates convenience functions * updates agent_services * removes rest_get_async exception handling * pre-commit fixes * delete accidentally committed script * adds initial agent implementation * clean up agent * adds missing docstrings * pre-commit * updates agent_services * updates agent.py * Updates alias ID handling * adds syncronous interface * prevent cicular import in storable_entity_components * remove promt sending and receiving from agent_service * adds initial (dirty) async job mixin * pre-commit run * [SYNPY-1544] potential changes to mixin (#1153) * Changes for async mixin * Remove arg * bug fix * generalizes send_job_and_wait_async * removes typing.Self --------- Co-authored-by: bwmac <bwm03570@gmail.com> * cleans up agent logic * adds async job unit tests * updates async job tests * adds agent unit tests * adds integration tests * pre-commit * adds examples to agent.py * removes todos * adds POC script * add to mixins * adds agent docs * updates agent docs * reorganize documentation * updates poc script * clean up * add docstring * removes unused imports * split too long lines * force synapse_client kwarg * updates agent.py * updates synapse_client docstring description * updates asynchronous_job * updates integration tests * pre-commit * agent inherited members * updates docs for inherited members * missing inherited members * updates doc formatting * try team formatting change * updates script description * adds Annotation lazy import * try team formatting change * more formatting changes * address review comments in agent.py * move synchronous docs up a layer * adds syn login * adds warning message to docs * updates docstring examples * updates docstrings * adds error handling for agent.get * async integration tests * fix conditional * disables integration tests * updates docstring for clarity --------- Co-authored-by: BryanFauble <17128019+BryanFauble@users.noreply.github.com> * [SYNPY-1544] Fixes docstring (#1155) * fixes docstring * protocol docstring * fix imports * Removes example setting annotations with Agent class (#1156) * removes annotation example * pre-commit * [SYNPY-1557] Sync a Linked Folder Bug (#1157) * fixes docstring * protocol docstring * fix imports * adds integration test for expected behavior * adds fix * merge weirdness * fix test docstring * [SYNPY-1544] Return the AgentPrompt when calling the prompt function (#1158) * update version v4.7.0 * version v4.7.0 docs * pre-commit --------- Co-authored-by: BryanFauble <17128019+BryanFauble@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
This PR is the implementation of an OOP model for interacting with the new Synapse Agent API endpoints. The design for the model implementation can be found in Confluence.
The core implementation includes (from "bottom to top"):
synapseclient.api.agent_services
:synapseclient.models.AgentPrompt
:AgentSession
class and is not intended to be used directly.AsynchronousCommunicator
Mixin which includes reusable logic for starting an async job, waiting for it to complete, and returning the response.synapseclient.models.AgentSession
:AgentSession
logic is used in theAgent
class, and we will generally recommend that users utilize theAgent
class as the primary interface.synapseclient.models.Agent
:start_session
or implicitly by just callingprompt
) becomes the default for prompting, but examples for conducting more than one session at a time can be found in the POC script and class docstring.Notes:
Experimental
section of the documentation, breaking up each model into it's own markdown script which makes maintaining the docs for OOP models a little easier.