Switch from Devlooped.JQ to Devlooped.JQSharp#162
Merged
Conversation
Replace the external jq process spawning with the in-process JQSharp .NET implementation. This eliminates the dependency on a jq binary and uses Jq.Evaluate() for filtering, which is ~140x faster than spawning a process per call. Agent-Logs-Url: https://github.com/devlooped/dotnet-openai/sessions/734e73ba-194e-42c3-ad81-e9b2395dcd89 Co-authored-by: kzu <169707+kzu@users.noreply.github.com>
Agent-Logs-Url: https://github.com/devlooped/dotnet-openai/sessions/734e73ba-194e-42c3-ad81-e9b2395dcd89 Co-authored-by: kzu <169707+kzu@users.noreply.github.com>
Member
🧪 Details on Ubuntu 24.04.4 LTSfrom retest v1.1.0 on .NET 10.0.7 with 💜 by @devlooped |
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.
Replaces the external
jqbinary dependency (Devlooped.JQ) withDevlooped.JQSharp, a pure .NET in-process implementation of the jq filter language.Changes
dotnet-openai.csproj: SwapDevlooped.JQv1.8.1.1 →Devlooped.JQSharpv1.0.1JsonOutput.cs: Replace process-spawning logic withJq.Evaluate():SHA256temp-file workaround for multiline queries, and stdin/stdout piping-rflag equivalent):JsonValueKind.Stringresults unquoted viaGetString() ?? string.Empty, everything else viaGetRawText()JqExceptionreplaces process exit code checks for error reportingEliminates the requirement for
jqto be installed on the host and is ~140× faster per call (no process spawn overhead).