Skip to content

Conversation

mcpflow
Copy link

@mcpflow mcpflow commented Apr 24, 2025

…mplementation

@mcpflow mcpflow changed the title feat: add GLM models and about agent example with configuration and i… feat: add GLM series models supports and agent example Apr 24, 2025
@mcpflow
Copy link
Author

mcpflow commented Apr 24, 2025

Supports the GLM text series models to call MCP, including the free model glm-flashx-250414.

Comment on lines +332 to +341
try:
with (
resources.files("mcp_agent.data")
.joinpath("zhipuai_models.json")
.open() as file
):
zhipu_data = json.load(file)
data.extend(zhipu_data)
except Exception as e:
print(f"Warning: Could not load Zhipu AI models: {e}")
Copy link
Contributor

Choose a reason for hiding this comment

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

The code attempts to load Zhipu AI models from a zhipuai_models.json file that isn't included in this PR. Since the file is referenced but missing, this will likely cause the warning to be printed during runtime. Consider either:

  1. Including the zhipuai_models.json file in the PR, or
  2. Modifying the code to use the GLM models already added to artificial_analysis_llm_benchmarks.json instead of attempting to load a separate file

This would provide a more robust implementation that doesn't depend on a missing file.

Suggested change
try:
with (
resources.files("mcp_agent.data")
.joinpath("zhipuai_models.json")
.open() as file
):
zhipu_data = json.load(file)
data.extend(zhipu_data)
except Exception as e:
print(f"Warning: Could not load Zhipu AI models: {e}")
# Zhipu AI models are included in the artificial_analysis_llm_benchmarks.json file
# No need to load them separately

Spotted by Diamond

Is this helpful? React 👍 or 👎 to let us know.

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