#I'm updating my agent from 0.17 to
1 messages · Page 1 of 1 (latest)
so here's the git init failure: https://v3.dagger.cloud/dagger/traces/ac9fcef7ebe26e07602c607dfaa39c57?span=cc87d1cdd4a794aa
what I'm wondering is how come you're asking the agent to return the output of a tool when it could more easily return the modified workspace and you can call the diff function in code
btw I see that's the same diff from my workspace module. it's possible I passed in git repos in the past and haven't hit that code path
yes, same diff function, and worked earlier - not sure why the agent is hitting this now
i'll try this
is this what you meant? https://github.com/vikram-dagger/fastapi-sample-app/blob/main/.dagger/src/agent/main.py#L86
it still doesn't seem to work, i get a "binding error" - trace at https://v3.dagger.cloud/dagger/traces/97fc8d4ed083e8eb70a8e8b4729edf0a?listen=ef16d5cbc61d6fb0
and the git diff doesn't run in the container, prob because of the binding error
I figured out the binding problem, call needed to be as_workspace.container instead of as_container
nice! what I really meant was more like
work
.env()
.output("after")
.as_workspace()
.diff()
but that works too
which model are you using btw?
in this code
summary = (
work
.env()
.output("summary")
.as_string()
)
when I use print(f"diff: {diff}\n\nsummary: {summary}")
the diff is correctly printed but the summary is printed as an object
<coroutine object Binding.as_string at 0x7f582a961140>
is that expected? i assumed as_string would return a string
oh yeah that makes sense. Since it's a leaf node you'll need to await it
gpt-4o
Nice, I'd recommend trying gpt-4.1 too since it's better but 4o is good too
ah sorry - gpt-4.1
not sure it's better, in one of the runs, its solution to my failing test was to reverse the code changes in the PR so that the test would pass 🙂
luckily that's the only time it did that