Files

1 line
1.7 KiB
JSON

{"repo": "camtang26/glm-4.5-cli", "files": {"GLM-4.5-SETUP.md": {"c042803beda7296ed6a99e524722f8e2a10d016d": {"t": 1785674185.0535097, "n": 1461, "h": "da592bcd38f06ff7", "c": "# GLM-4.5 Setup Guide\n\n## Quick Start\n\nGLM-4.5 works with this CLI through OpenAI compatibility. Just set these environment variables:\n\n```bash\nexport OPENAI_API_KEY=your_glm_api_key\nexport OPENAI_BASE_URL=https://api.z.ai/api/paas/v4\nexport OPENAI_MODEL=glm-4.5\nexport GLM_THINKING_MODE=enabled # Enable GLM's unique thinking feature\n```\n\nOr add them to your `.env` file:\n\n```env\nOPENAI_API_KEY=your_glm_api_key\nOPENAI_BASE_URL=https://api.z.ai/api/paas/v4\nOPENAI_MODEL=glm-4.5\nGLM_THINKING_MODE=enabled\n```\n\n## Using the CLI\n\n```bash\n# Basic usage\necho \"Your prompt\" | node bundle/gemini.js\n\n# Example with thinking mode\necho \"Solve this step by step: What's 15% of 80?\" | node bundle/gemini.js\n```\n\n## Thinking Mode\n\nGLM-4.5's thinking mode shows the model's reasoning process, improving output quality. Control it with:\n\n- `GLM_THINKING_MODE=enabled` (default) - Shows model's thinking\n- `GLM_THINKING_MODE=disabled` - Hides thinking, just shows final answer\n\n## Alternative Endpoints\n\nGLM-4.5 is available through multiple providers:\n\n```bash\n# Z.ai (International)\nexport OPENAI_BASE_URL=https://api.z.ai/api/paas/v4\n\n# Zhipu AI (China)\nexport OPENAI_BASE_URL=https://open.bigmodel.cn/api/paas/v4\n\n# OpenRouter\nexport OPENAI_BASE_URL=https://openrouter.ai/api/v1\n```\n\n## Models\n\n- `glm-4.5` - Full model (355B parameters)\n- `glm-4.5-air` - Faster, lighter model (106B parameters)\n\nThat's it! GLM-4.5 works seamlessly with the existing CLI infrastructure."}}}}