Update smolagents client arguments in gradio-client.mdx#205
Open
J0NA5-jpg wants to merge 5 commits intohuggingface:mainfrom
Open
Update smolagents client arguments in gradio-client.mdx#205J0NA5-jpg wants to merge 5 commits intohuggingface:mainfrom
J0NA5-jpg wants to merge 5 commits intohuggingface:mainfrom
Conversation
Update Hugging Face CLI command references
FutureWarning: Parameter 'structured_output' was not specified. Currently it defaults to False, but in version 1.25, the default will change to True. To suppress this warning, explicitly set structured_output=True (new behavior) or structured_output=False (legacy behavior). See documentation at https://huggingface.co/docs/smolagents/tutorials/tools#structured-output-and-output-schema-support for more details.
Added structured_output argument for latest version of MCPClient initialization
Gradio ChatInterface seems to not have the type argument any longer:
demo = gr.ChatInterface(
fn=lambda message, history: str(agent.run(message)),
...<3 lines>...
description="This is a simple agent that uses MCP tools to answer questions."
)
TypeError: ChatInterface.__init__() got an unexpected keyword argument 'type'
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.
Ran into following warning during MCPClient initialization:
FutureWarning: Parameter 'structured_output' was not specified. Currently it defaults to False, but in version 1.25, the default will change to True. To suppress this warning, explicitly set structured_output=True (new behavior) or structured_output=False (legacy behavior). See documentation at https://huggingface.co/docs/smolagents/tutorials/tools#structured-output-and-output-schema-support for more details.
and following error in the chat interface initialization:
demo = gr.ChatInterface(
fn=lambda message, history: str(agent.run(message)),
...<3 lines>...
description="This is a simple agent that uses MCP tools to answer questions."
)
TypeError: ChatInterface.init() got an unexpected keyword argument 'type'
Updated MCPClient() and gr.ChatInterface() accordingly.