-
Notifications
You must be signed in to change notification settings - Fork 2
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
HIL (redis) #52
HIL (redis) #52
Conversation
@@ -230,7 +232,7 @@ async def get_vlab_and_project( | |||
|
|||
|
|||
def get_starting_agent( | |||
_: Annotated[None, Depends(get_vlab_and_project)], | |||
# _: Annotated[None, Depends(get_vlab_and_project)], |
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.
I just did this since the token generating service was down at the time of writing this PR.
We should not merge that
@@ -21,7 +21,7 @@ async def stream_agent_response( | |||
) -> AsyncIterator[str]: | |||
"""Redefine fastAPI connections to enable streaming.""" | |||
if isinstance(agents_routine.client, AsyncOpenAI): | |||
connected_agents_routine = AgentsRoutine( | |||
connected_agents_routine = AgentsRoutine( # type: ignore[call-arg] |
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.
I did not implement the logic here. I mean nothing would change really...just did not want to overcomplicate this poc
Similar to Phantasm in terms of idea (besides the approval dashboard), however there is still the issue of the execution hanging. The hanging time is handled with the Also thinking about the future, if we implement the queue mechanism to pick up requests it will block the queue for as long as the user wants, up to the On the plus side this solution is definitely cleaner than ours. I'm pretty sure we could refactor ours big time but it will remain some sort of mess regardless. Also couple of side questions:
Anyway I tried to be super critic, but definitely a great solution I like it. Simple and efficient. Thank you for that ! |
Ah I see that modifying the input is not possible for now. I guess it's the |
Possibly. Honestly, I am not able to say at this point what is going to happen when there are a lot of requests. We can alternatively go for the pub sub model (redis supports it) but I guess there might be other downsides.
Yeh. Very likely. Agree.
Sure. Frontends do everything async so this isn't a problem.
So currently the approvals are basically identified via
Exactly. The frontend would indeed have to be polling the
This POC does not allow for modifications. I guess they are useful and phantasm does support them.
I think the Frontend -> Backend polling is not a problem. Backend -> Redis might be more prone to issues but I am not sure.
:)) Thanks. Again, it was just a suggestion. Happy to change it/not use it |
Closing this one since it is not the approach we decided to go for |
How to test?
First of all, spin up
redis
And then add the following entry to your
.env
I added a
get-now
tool that is the only tool that has thehil: True
.You can then use the
approvals
router and the endpoint to view and decline/approve outstanding requests.