Repository navigation
fix: drop the llm.tools copies only when spelled like their schema key, and cover the orphan and native cases - #295
Merged
Conversation
… definitions Two cases for the llm.tools name and description drop: a description at an index with no schema stays, and the copies still go when a native gen_ai.tool.definitions is already on the span.
… its schema key The copy key is now the schema key as written with .tool.json_schema stripped, as the sink does, rather than rebuilt from the parsed index. llm.tools.01.tool.json_schema takes llm.tools.01.tool.name with it and leaves llm.tools.1.tool.name alone.
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.
This follows up #294 with two changes.
Copy keys follow the schema key as written. A copy key is now the schema key as written with
.tool.json_schemastripped. Before, it was rebuilt from the parsed integer index. This is how the sink (argus-core#771) and the TypeScript SDK (rius-sdk-typescript#259) already do it. A copy is dropped only when it is spelled exactly like its schema key:llm.tools.01.tool.json_schematakesllm.tools.01.tool.namewith it and leavesllm.tools.1.tool.namealone.Tests. Three new cases:
the copy is dropped only when it is spelled like its schema key (above);
a description at an index with no schema is kept;
the copies still go when a native
gen_ai.tool.definitionsis already on the span.ruff format --check,ruff check,mypy: cleanpytest: 3132 passed, 22 skipped, 1 xfailed