跳到内容

AI Provider for Z.AI

v1.0.0

Huzaifa Al Mesbah · 2026年6月19日 上架

AI Provider for Z.AI (GLM models) for the WordPress AI Client.

正在使用
40+
评分
暂无
累计下载
878
最近更新
2026年8月14日
需要 WordPress 7.0+已测试到 7.1.5PHP 7.4+

This plugin provides Z.AI integration for the WP AI Client SDK. It enables WordPress sites to use Z.AI GLM models for text generation and related AI capabilities.

Features:

  • Text generation with Z.AI GLM models (glm-4.5, glm-4.6, glm-4.7, glm-5, and more)
  • Chat history support
  • Function calling support
  • JSON output support
  • Automatic provider registration

Available models are dynamically discovered from the Z.AI API.

Requirements:

  • PHP 7.4 or higher
  • WP AI Client plugin must be installed and activated
  • Z.AI API key from z.ai

Usage

The provider automatically registers itself on the init hook. Once both plugins are active and your API key is configured, you can start generating text:

Basic Text Generation

$text = AI_Client::prompt( 'Explain quantum computing.' )->using_provider( 'zai' )->generate_text();

With System Instructions

$text = AI_Client::prompt( 'Summarize the history of WordPress.' )->using_provider( 'zai' )->using_system_instruction( 'Be concise and accurate.' )->using_temperature( 0.2 )->using_max_tokens( 500 )->generate_text();

JSON Output

$json = AI_Client::prompt( 'Analyze this topic: WordPress plugins' )->using_provider( 'zai' )->as_json_response( $schema )->generate_text();<h3>External services</h3>

This plugin connects to the Z.AI API to provide AI-powered text generation capabilities within WordPress. Z.AI is a third-party service.

What data is sent and when

  • API key: Your Z.AI API key is sent with every request for authentication.
  • API type auto-detection: When you save or change your API key, the plugin sends one minimal test request (a one-word prompt) to each Z.AI endpoint to determine which API type your key belongs to. This happens only at the moment the key is saved.
  • Model listing: When the plugin checks provider availability or lists available models, it sends a request to the Z.AI API to retrieve the current list of GLM models.
  • Text generation prompts: When your site uses the plugin to generate text, the prompt text (and any system instructions and conversation history) is sent to the Z.AI API for processing.

Communication is sent to the Z.AI API at one or both of the following base URLs (the API-type auto-detection contacts both; all other requests use the detected one):

Data is only sent when the plugin is actively used to generate text or when checking model availability. No data is sent passively or in the background.

Service links

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums