Skip to content

add mcp-playground about new agent#618

Closed
mushenL wants to merge 1 commit into
modelscope:mcpfrom
mushenL:mcp_yk0509
Closed

add mcp-playground about new agent#618
mushenL wants to merge 1 commit into
modelscope:mcpfrom
mushenL:mcp_yk0509

Conversation

@mushenL
Copy link
Copy Markdown
Collaborator

@mushenL mushenL commented May 9, 2025

Change Summary

Related issue number

Checklist

  • The pull request title is a good summary of the changes - it will be used in the changelog
  • Unit tests for the changes exist
  • Run pre-commit install and pre-commit run --all-files before git commit, and passed lint check.
  • Some cases need DASHSCOPE_TOKEN_API to pass the Unit Tests, I have at least pass the Unit tests on local
  • Documentation reflects the changes where applicable
  • My PR is ready to review, please add a comment including the phrase "please review" to assign reviewers

prev_chunk_type = "function"
# faca_dic["content"] = faca_dic["content"] + f'\n\n**🎯 结果**\n```\n{chunk_content}\n```'
yield gr.skip(), gr.skip(), gr.update(value=chatbot_value)
# chatbot_value = generate_with_mcp(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

这些代码不需要可以移除

mcp_servers["mcpServers"] = parse_mcp_config(mcp_config, enabled_mcp_servers)
agent_executor = Agent(
mcp=mcp_servers, llm=get_llm, instruction=sys_prompt)
response = agent_executor.run("你好")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

这里的messages应该传入agent_executor.run()中,具体为:

agent_executor.run(
        messages=messages,
        stream=True,
        seed=None,
    )

mcp=mcp_servers, llm=get_llm, instruction=sys_prompt)
response = agent_executor.run("你好")
for chunk in response:
response += chunk
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

unsupported operand for response(generator) and chunk(list)

@suluyana suluyana closed this Jun 28, 2025
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.

4 participants