Skip to content
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

Reboot Agents #30387

Merged
merged 98 commits into from
May 7, 2024
Merged

Reboot Agents #30387

merged 98 commits into from
May 7, 2024

Conversation

aymeric-roucher
Copy link
Contributor

What does this PR do?

Reboot agents in transformers!

cc @LysandreJik

@aymeric-roucher aymeric-roucher marked this pull request as draft April 22, 2024 09:56
@aymeric-roucher aymeric-roucher changed the title Agents Reboot Agents Apr 22, 2024
@aymeric-roucher aymeric-roucher force-pushed the agents branch 2 times, most recently from 60ae172 to 5b859e9 Compare April 24, 2024 17:04
Copy link
Member

@LysandreJik LysandreJik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this is starting to look quite good!

Let's make sure there are disclaimers in the docs about loading remote tools, the python interpreter, and anything else that might be a security risk.

I'll write docs about collections as well.

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@LysandreJik LysandreJik requested a review from ArthurZucker May 3, 2024 09:24
@LysandreJik LysandreJik marked this pull request as ready for review May 3, 2024 09:24
Copy link
Collaborator

@ArthurZucker ArthurZucker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image The colors should IMO be different to clearly mark what the agent is executing. Small plus if the colors of the python code matches the intepretor colors. image

I think I might not have librosa or soundfile.
Return code needs to be supported for easy debug especially here, the errors are not straighforward.

image

the warning of the validation should be better formatted.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can 't we store these on the hub?

@aymeric-roucher aymeric-roucher force-pushed the agents branch 2 times, most recently from d75d85a to cabc614 Compare May 6, 2024 13:22
Copy link
Collaborator

@ArthurZucker ArthurZucker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small nits and good to go!

Comment on lines 23 to 35
class SpeechToTextTool(Tool):
description = "This is a tool that transcribes an audio into text. It returns the transcribed text."
name = "transcriber"

inputs = {"audio": {"type": "audio", "description": "The audio to transcribe"}}
output_type = "text"

def __init__(self, *args, **kwargs):
super().__init__()
self.client = InferenceClient(model="distil-whisper/distil-large-v3")

def forward(self, audio):
return self.client.automatic_speech_recognition(audio).text
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not adressed

aymeric-roucher and others added 7 commits May 6, 2024 18:26
Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
@LysandreJik LysandreJik merged commit 0ba15ce into main May 7, 2024
21 checks passed
@LysandreJik LysandreJik deleted the agents branch May 7, 2024 10:59
@Wladastic
Copy link

You can also check my mini autogpt repo for reevaluating outputs which had low confidence.
This may help with some smaller models against hallucination

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants