Fix: Update twdesk toolsets for desksdkgo v1 + add sparse fieldset support#329
Merged
Conversation
…pport Patches all twdesk tools to compile against the v1 desksdkgo API, which introduced two breaking changes: Get methods now require a url.Values parameter, and all model string/bool/int fields changed to pointer types. Adds sparse fieldset support throughout every read operation so the LLM can request only the fields it needs and avoid bloating token counts: - meta.go: add strPtr/intPtr/boolPtr helpers, sparseFieldsSchema(), getParams() (builds url.Values with includes=all + optional fields), and wire fields into paginationOptions() and setPagination() so every list operation automatically honours the parameter - All Get tools: accept an optional "fields" array and pass it to the SDK via getParams(); handlers that previously returned text summaries now return full JSON so sparse fields are meaningful - All List/Search tools: "fields" flows through setPagination to the query string - files.go, messages.go: fix model field assignments to use pointer types
Contributor
|
Instead of giving the full sparse field options to the LLM, maybe keep a verbose flag that enables or disables the entire entity? Like, when verbose is disable we could return the ticket id and title only. |
Contributor
Author
|
This doesn't fix (or make worse) the openai strict mode. I am working on a PR to fix that for Desk right now. |
Contributor
We discussed this, and will go ahead with these changes, monitoring how the LLM behaves with the sparse field options. |
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.
Patches all twdesk tools to compile against the v1 desksdkgo API, which introduced two breaking changes: Get methods now require a url.Values parameter, and all model string/bool/int fields changed to pointer types.
Adds sparse fieldset support throughout every read operation so the LLM can request only the fields it needs and avoid bloating token counts:
Type of Change
Testing
go test -v ./...)Checklist