pinme-llm

仓库创建 2025年4月13日最近提交 2 天前SkillHot 收录 21 天前
▸ 精选理由

为在 PinMe 内安全调用大模型提供完整示例与防泄露策略。

▸ 风险提示

涉及外部 LLM 与潜在数据外泄,注意敏感信息过滤

这个 Skill 做什么

在 PinMe Worker 中接入 OpenRouter 代理的 LLM 与搜索 API 的使用指南。

教你在 PinMe Worker(TypeScript)里正确调用 OpenRouter 代理的 LLM 与搜索 API,覆盖模型调用、chat/completions、streaming 和 OpenRouter web search 场景。适合在 PinMe 项目中要加入 AI 能力但不能把真实 OpenRouter key 放到 Worker 的场景。会给出可直接用的 Worker TS 代码示例和环境变量用法,确保只用 PinMe 项目 key 安全调用。

▸ 展开 SKILL.md 英文原文

Use this skill when a PinMe project (Worker TypeScript) needs to call OpenRouter-backed LLM APIs, including models, chat/completions, streaming, or OpenRouter web search. Guides AI to generate correct Worker TS code.

开发编程LLM集成OpenRouterWorker-TS通用
3.7k
Stars
272
Forks
7
仓库内 Skill
+26
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/glitternetwork/pinme/main/skills/pinme-llm/SKILL.md
或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/glitternetwork/pinme/main/skills/pinme-llm/SKILL.md"
SKILL.MD 节选查看完整文件 ↗
# PinMe Worker OpenRouter API Integration

Guides how to call PinMe platform's OpenRouter proxy APIs in a PinMe Worker (TypeScript). Workers use the PinMe project API key; they never hold the real OpenRouter API key.

## Environment Variables

The following environment variables are automatically injected when the Worker is created — no manual configuration needed:

```typescript
// backend/src/worker.ts
export interface Env {
  DB: D1Database;
  API_KEY: string;       // Project API Key from create_worker
  PROJECT_NAME: string;  // Actual project_name from create_worker; must match API_KEY
  BASE_URL?: string;     // Optional override for PinMe API base URL, defaults to https://pinme.cloud
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有