首页/ AI 技能 / @skilllib/skill-2014279415562186754
Skill站外收录 @skilllib/skill-2014279415562186754

openrouter-sdk-patterns

提供面向生产环境的 OpenRouter 集成方案,涵盖客户端初始化、异常处理、自动重试与配置管理等核心实践,确保调用稳定可靠,适配 Python 和 Node.js 多语言开发场景。

0.0 (0) 183 次安装 原作者 编程导航
收录于 2026-01-22
软件开发 AI 技能

Skills.MD

# OpenRouter SDK Patterns ## Overview This skill covers proven SDK patterns including client initialization, error handling, retry logic, and configuration management for robust OpenRouter integrations. ## Prerequisites - OpenRouter API key configured - Python 3.8+ or Node.js 18+ - OpenAI SDK installed ## Instructions Follow these steps to implement this skill: 1. **Verify Prerequisites**: Ensure all prerequisites listed above are met 2. **Review the Implementation**: Study the code examples and patterns below 3. **Adapt to Your Environment**: Modify configuration values for your setup 4. **Test the Integration**: Run the verification steps to confirm functionality 5. **Monitor in Production**: Set up appropriate logging and monitoring ## Overview This skill covers proven SDK patterns including client initialization, error handling, retry logic, and configuration management for robust OpenRouter integrations. ## Prerequisites - OpenRouter API key configured - Python 3.8+ or Node.js 18+ - OpenAI SDK installed ## Python with OpenAI SDK ### Basic Setup ```python from openai import OpenAI import os client = OpenAI( base_url="https://openrouter.ai/api/v1", ## Detailed Reference See `{baseDir}/references/implementation.md` for complete implementation guide.

评论 0

还没有评论,来抢沙发。