Sending logs and generated code back to the user #29
richiejp
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
For the assistant plugin (#22) I want to send logs and generated code back to the user. I also want the assistant to see the logs so that it can take appropriate action.
The assistant runs in its own container inside Buildkit. As I explained in previous posts (#28, #27) Ayup runs containers directly in Buildkit. This creates a few problems, the latest of which is how to get source files generated by the assistant container/build into the app container.
I guess one way would be to actually make the assistant part of the build process for the app container. Like as if it were included as a RUN command in a Dockerfile for a code generation step before the main build step. Instead though I have different build processes for the assistant and the app. This isn't necessarily the best way, it's just what fits the best with the current structure of the code.
Doing this I discovered that Buildkit mounts don't work how I thought. In a previous experiment it seemed I could create a mount similar to a Docker volume. In a Docker volume files can be written out back to the host. Not so with a Buildkit bind mount. Instead what I had to do was setup a local export, which is where the files in the container (or "state") are exported to a local directory (other export options include image and tar file)
This could have some performance implications if in the future we want to give contains access to large binary objects (e.g. database, LLM weights). However there are some interesting cache mount options in Buildkit which I already use for caching pip and apt downloads. For things like code and logs I have to copy these via gRPC from the server to the client anyway.
The assistant plugin framework can now collect logs and send generated code back to the user. There are many issues left to iron out, but tomorrow I should be able to start working on the first agent/assistant.
Beta Was this translation helpful? Give feedback.
All reactions