-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Add require_tool param to function calling LLMs #18654
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
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
3096f9f
adding functionality to require tool calling
adrianlyjak a480059
add anthropic
adrianlyjak b4a4e75
add azure fix
adrianlyjak c3178f5
update bedrock
adrianlyjak 9723fb9
add cohere tests
adrianlyjak 1dd85e7
gemini tests
adrianlyjak 3b0c3ea
test huggingface api
adrianlyjak 53babee
test ibm watsonx
adrianlyjak c5399a6
test litellm
adrianlyjak c603f95
add mistral tests
adrianlyjak 720be16
add oci data science tests
adrianlyjak 381c492
add tests for oci pt 2
adrianlyjak edb097f
test/fix openai
adrianlyjak f6a88cd
implement tool_config for verteex ai
adrianlyjak 63dac3c
test vertex
adrianlyjak aea02db
clarify ollama
adrianlyjak a9181c3
fix gemini imports
adrianlyjak a1297e8
fix formats
adrianlyjak 9cec0ae
fix bedrock test
adrianlyjak c9f1851
Fix issues in gemini structured predict, and nicen up the tests
adrianlyjak 07567d7
tintegration est mistral
adrianlyjak 7740da9
integration test anthropic
adrianlyjak c3e3b52
integration test cohere
adrianlyjak d64f9a6
Add openai integration tests
adrianlyjak 3ef48a4
missed add google genai tool required. Implement it and add unit/inte…
adrianlyjak f9b4bad
Update the one reference to tool_choice
adrianlyjak ca3770d
version bump all of the affected llms
adrianlyjak 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
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
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 |
|---|---|---|
|
|
@@ -27,7 +27,7 @@ dev = [ | |
|
|
||
| [project] | ||
| name = "llama-index-llms-ai21" | ||
| version = "0.4.0" | ||
| version = "0.5.0" | ||
| description = "llama-index llms ai21 integration" | ||
| authors = [{name = "Your Name", email = "[email protected]"}] | ||
| requires-python = ">=3.9,<4.0" | ||
|
|
||
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 |
|---|---|---|
|
|
@@ -27,7 +27,7 @@ dev = [ | |
|
|
||
| [project] | ||
| name = "llama-index-llms-anthropic" | ||
| version = "0.6.19" | ||
| version = "0.7.0" | ||
| description = "llama-index llms anthropic integration" | ||
| authors = [{name = "Your Name", email = "[email protected]"}] | ||
| requires-python = ">=3.9,<4.0" | ||
|
|
||
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
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 |
|---|---|---|
|
|
@@ -26,7 +26,7 @@ dev = [ | |
|
|
||
| [project] | ||
| name = "llama-index-llms-azure-inference" | ||
| version = "0.3.0" | ||
| version = "0.4.0" | ||
| description = "Integration for model supporting Azure AI model inference API in llama-index" | ||
| authors = [{name = "Azure AI model inference group", email = "[email protected]"}] | ||
| requires-python = ">=3.9,<4.0" | ||
|
|
||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we raise an error if its set to True?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@logan-markewich My thinking is that this will frequently get set more by internal library code rather than user code. Like, we'll want to migrate
StructuredLLMto settool_required=True(it's currently settingtool_choice="function_name"or something and hoping for the best from the LLM implementation). Seemed better to have it maybe give a tool response rather than blow up, like it currently isThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
otherwise the alternative is to somehow advertise whether the LLM supports tool_required or not, and checking that before providing it, which seems like a lot of gymnastics for mostly just a few underused LLMs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's fair!