-
Notifications
You must be signed in to change notification settings - Fork 457
feat(openai): added support for tool results, definitions #14204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+689
−143
Merged
Changes from 22 commits
Commits
Show all changes
59 commits
Select commit
Hold shift + click to select a range
a010077
adding tool changes, WIP
maxzhangdd df2fa61
progress on tool defs/results across openai create apis
maxzhangdd ac936e9
Merge branch 'main' into max.zhang/openai-tool-change
maxzhangdd 769f495
remove tool from metadata, add tooldefs constant
maxzhangdd 1434930
add tool results
maxzhangdd 479084e
common method handling tool results/calls
maxzhangdd 42129b0
improved method for chat response
maxzhangdd bb0e294
intial test changes
maxzhangdd 5ddf543
linting
maxzhangdd 51087a0
Merge branch 'main' into max.zhang/openai-tool-change
maxzhangdd f3ec21d
small fixes
maxzhangdd 48de482
getting tests to work
maxzhangdd 79e89b1
getting more tests to pass, WIP
maxzhangdd 36ef061
llmobs tests
maxzhangdd cbc912f
typing fixes
maxzhangdd b26dba7
WIP, typing check
maxzhangdd 6431a88
typing
maxzhangdd a2d88aa
typing
maxzhangdd 7069e86
release note
maxzhangdd 24ec9b6
fix agents failing test case
maxzhangdd 9212ada
litellm tests pass
maxzhangdd 2e85e31
Merge branch 'main' into max.zhang/openai-tool-change
maxzhangdd 15e633d
working on comments
maxzhangdd 9075e8c
typing
maxzhangdd 9b720ed
addressing comments
maxzhangdd 8f84edf
more safety around kwargs.get
maxzhangdd ced6c3e
fix typo
maxzhangdd efe7c2b
typing
maxzhangdd c6ddb6c
Merge branch 'main' into max.zhang/openai-tool-change
maxzhangdd cafdfed
remove unnecessary role check
maxzhangdd 4cb6c27
Update ddtrace/llmobs/_integrations/utils.py
maxzhangdd 0cea89d
Update ddtrace/llmobs/_integrations/utils.py
maxzhangdd aa6f6d9
Update ddtrace/llmobs/_integrations/utils.py
maxzhangdd c17d9aa
Update ddtrace/llmobs/_integrations/utils.py
maxzhangdd 156d242
Update ddtrace/llmobs/_integrations/utils.py
maxzhangdd c9e374b
Update ddtrace/llmobs/_integrations/utils.py
maxzhangdd 029e4a9
delete check that skips when name is falsy
maxzhangdd 49cba72
fix streaming, remove extra tool id accesses for chat tool calls
maxzhangdd f2b22a9
remove extra tool_id and id acceses
maxzhangdd d7b37a1
typing changes
maxzhangdd c369c85
linting
maxzhangdd 1732491
skip tooldef if all fields are emtpy
maxzhangdd 88b576a
skip tooldef if all fields are empty but better
maxzhangdd 4c79847
fix typo
maxzhangdd d1d1704
make function and custom separate vars, move function down
maxzhangdd 84beb55
remove comment
maxzhangdd 0140796
handle custom tools in streaming code
maxzhangdd 6d10c70
custom tool call tests
maxzhangdd 4e09e7d
Merge branch 'main' into max.zhang/openai-tool-change
maxzhangdd eadb0e1
response custom tool calls
maxzhangdd 48325b2
small test tweak
maxzhangdd e07c3f6
prevent None messsage displaying
maxzhangdd 6518b87
fix test case
maxzhangdd 766cf55
Merge branch 'main' into max.zhang/openai-tool-change
maxzhangdd ba98254
Update ddtrace/llmobs/_integrations/utils.py
maxzhangdd a0eacf1
Update ddtrace/llmobs/_integrations/utils.py
maxzhangdd 5d9adc8
move dispatch code above to avoid redefinition
maxzhangdd b843087
Merge branch 'main' into max.zhang/openai-tool-change
maxzhangdd 85e5679
output messages can contain tool results
maxzhangdd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
features: | ||
- | | ||
LLM Observability: Adds support for collecting tool definitions, tool calls and tool results in the OpenAI integration. |
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.