Repository navigation
Conversation
5 tasks done
This branch has not been deployed
This file contains hidden or 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
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.
NewOpenAIFunctionsAgent(..., agents.WithOutputKey("answer"))declaresansweras its output key, but text completions are always returned underoutput. Consequently, a successful generation throughchains.Run(ctx, agents.NewExecutor(agent), ...)fails withmissing key in output values: answer.Return the final answer under the configured output key, matching
GetOutputKeysand the other agent implementations. Regression tests cover the default and custom keys through bothParseOutputand the public constructor/executor path, using the existing fake LLM without API calls.Validation on Go 1.26.0 / Windows:
go test -race ./agents ./chains ./memory ./prompts ./outputparser ./llms/fake -count=1: agents, memory, prompts, outputparser, and fake pass; six existing recorded OpenAI chains tests report network errors.go veton those six packages passes. Configuredgolangci-lint run ./agents --new-from-rev HEADreports 0 issues;gofmtandgit diff --checkpass for the two changed files. Unfiltered agent lint reports four findings in unchanged files: three formatting findings from this CRLF checkout andQF1012inmrkl_prompt.go.Implemented, tested, and reviewed with AI assistance.
CI note: the current govulncheck job flags the existing
github.com/klauspost/compress@v1.19.2(GO-2026-6865, published November 5),golang.org/x/net@v0.60.0(GO-2026-6860, October 27), and Go 1.26.10 standard library (GO-2026-6859, November 11). This PR leavesgo.mod,go.sum, and the CI workflow unchanged. The exact base CI run passed on October 22, before these advisories were published; that historical pass does not establish a clean scan against today's database.Remote CI on
ca8d862has now passed lint, the full build, ordinary tests, race tests, coverage, and all 77 example builds. Thegovulncheckreport described above is the only failing check.Dependency follow-up: #1575 updates compress and x/net for the two third-party advisories. The existing #1571 Go upgrade covers the standard-library finding. These changes are reviewed separately from this OutputKey fix.