-
Notifications
You must be signed in to change notification settings - Fork 27.4k
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
Add streaming, various fixes #30838
Merged
Merged
Add streaming, various fixes #30838
Changes from 1 commit
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
fed6c74
Fix tool pushing with new inputs
aymeric-roucher 050ad94
Improve cod eprompt
aymeric-roucher ca47a4a
Implement streaming run in react agent
aymeric-roucher ad87b0d
Fix tuples in for loop in python interpreter
aymeric-roucher db8afe9
Change return to yield
aymeric-roucher 0ef1aa2
Remove risky imports, leave option for additional imports
aymeric-roucher d6165a5
Allow additional import directly upon agent init
aymeric-roucher c2b5af6
Add support in interpreter for classes and exceptions
aymeric-roucher c6772f8
Add a few edge cases in interpreter
aymeric-roucher 81af6d5
Fix interpreter edge case
aymeric-roucher 38e52d2
Document the additional_authorized_imports
aymeric-roucher 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 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 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 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 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 |
---|---|---|
|
@@ -185,7 +185,7 @@ def save(self, output_dir): | |
"tool_class": full_name, | ||
"description": self.description, | ||
"name": self.name, | ||
"inputs": str(self.inputs), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This fixes a bad behaviour where the "inputs" key in the config json would be changed from dict to string, which then prevented from reading them correctly when using |
||
"inputs": self.inputs, | ||
"output_type": str(self.output_type), | ||
} | ||
with open(config_file, "w", encoding="utf-8") as f: | ||
|
@@ -315,7 +315,7 @@ def from_hub( | |
if tool_class.output_type != custom_tool["output_type"]: | ||
tool_class.output_type = custom_tool["output_type"] | ||
|
||
return tool_class(model_repo_id, token=token, **kwargs) | ||
return tool_class(**kwargs) | ||
|
||
def push_to_hub( | ||
self, | ||
|
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.
Why only hard code llama3, shouldn't we add the stop token according to model's tokenizer config?
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.
This was because of a specific Meta-Llamaa-3 issue in our inference API, since this model is one of the rare ones with more than one stop tokens!
For my own reference, here is a link to our internal slack message about it.
But it seems this problem has been solved in the 70B and in the 8B. So normally we can remove this custom code.