Skip to content

Update smolagents client arguments in gradio-client.mdx#205

Open
J0NA5-jpg wants to merge 5 commits intohuggingface:mainfrom
J0NA5-jpg:update-smolagents-client-arguments
Open

Update smolagents client arguments in gradio-client.mdx#205
J0NA5-jpg wants to merge 5 commits intohuggingface:mainfrom
J0NA5-jpg:update-smolagents-client-arguments

Conversation

@J0NA5-jpg
Copy link

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.

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'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant