Skip to content

add mcp-playground about new agent #618

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

Open
wants to merge 1 commit into
base: mcp
Choose a base branch
from

Conversation

mushenL
Copy link
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
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
Collaborator

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
Collaborator

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)

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.

3 participants