Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计异常

modelslab-chat-generationmodelslab 聊天生成

Agent Skill

modelslab-chat-generation 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

428

周安装

18

GitHub Stars

7

下载量

150
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:modelslab-chat-generation(modelslab 聊天生成)
来源仓库:https://github.com/modelslab/skills
仓库路径:skills/modelslab-chat-generation
安装命令:
npx skills add https://github.com/modelslab/skills --skill modelslab-chat-generation
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/modelslab/skills --skill modelslab-chat-generation

简介

用于查找和筛选相关信息。modelslab-chat-generation 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

  • 适合根据关键词快速定位候选结果。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。
  • 可结合任务场景使用来源线索进行检索。
  • 安装前建议确认权限范围和联网需求。
  • 当前归类为研究检索类,建议二次确认。

SKILL.md

ModelsLab Chat/LLM Generation

Send chat completions to 60+ LLM models through a single OpenAI-compatible endpoint.

When to Use This Skill

  • Chat with AI models (DeepSeek, Llama, Gemini, Qwen, Mistral)
  • Build conversational AI applications
  • Generate text completions with system prompts
  • Use function/tool calling with LLMs
  • Stream responses for real-time output
  • Get structured JSON responses

API Endpoint

Chat Completions: POST https://modelslab.com/api/v7/llm/chat/completions

The endpoint follows the OpenAI chat completions format, making it easy to switch from OpenAI or use the OpenAI SDK.

Quick Start

import requests

def chat(message, api_key, model="meta-llama-3-8B-instruct"):
    """Send a chat completion request.

    Args:
        message: The user message
        api_key: Your ModelsLab API key
        model: LLM model ID (use modelslab models search --feature llmaster to find models)
    """
    response = requests.post(
        "https://modelslab.com/api/v7/llm/chat/completions",
        json={
            "key": api_key,
            "model_id": model,
            "messages": [
                {"role": "user", "content": message}
            ],
            "max_tokens": 200,
            "temperature": 0.7
        }
    )

    data = response.json()

    if "choices" in data:
        return data["choices"][0]["message"]["content"]
    else:
        raise Exception(f"Error: {data.get('message', 'Unknown error')}")

# Usage
reply = chat(
    "Explain quantum computing in simple terms.",
    "your_api_key"
)
print(reply)

With System Prompt

def chat_with_system(system_prompt, message, api_key, model="meta-llama-3-8B-instruct"):
    """Chat with a system prompt for role/behavior control."""
    response = requests.post(
        "https://modelslab.com/api/v7/llm/chat/completions",
        json={
            "key": api_key,
            "model_id": model,
            "messages": [
                {"role": "system", "content": system_prompt},
                {"role": "user", "content": message}
            ],
            "max_tokens": 500,
            "temperature": 0.7
        }
    )

    data = response.json()
    if "choices" in data:
        return data["choices"][0]["message"]["content"]

# Usage
reply = chat_with_system(
    "You are a Python expert. Give concise code examples.",
    "How do I read a CSV file?",
    "your_api_key"
)

Multi-Turn Conversation

def conversation(messages, api_key, model="meta-llama-3-8B-instruct"):
    """Send a multi-turn conversation."""
    response = requests.post(
        "https://modelslab.com/api/v7/llm/chat/completions",
        json={
            "key": api_key,
            "model_id": model,
            "messages": messages,
            "max_tokens": 500,
            "temperature": 0.7
        }
    )
    return response.json()

# Multi-turn example
messages = [
    {"role": "system", "content": "You are a helpful assistant."},
    {"role": "user", "content": "What is Python?"},
    {"role": "assistant", "content": "Python is a high-level programming language..."},
    {"role": "user", "content": "Show me a hello world example."}
]

result = conversation(messages, "your_api_key")
print(result["choices"][0]["message"]["content"])

OpenAI SDK Compatibility

You can use the official OpenAI Python SDK by changing the base URL and API key:

from openai import OpenAI

client = OpenAI(
    base_url="https://modelslab.com/api/v7/llm",
    api_key="your_modelslab_api_key"
)

response = client.chat.completions.create(
    model="meta-llama-3-8B-instruct",
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Hello!"}
    ],
    max_tokens=100,
    temperature=0.7
)

print(response.choices[0].message.content)

cURL Example

curl -X POST "https://modelslab.com/api/v7/llm/chat/completions" \
  -H "Content-Type: application/json" \
  -d '{
    "key": "your_api_key",
    "model_id": "meta-llama-3-8B-instruct",
    "messages": [
      {"role": "user", "content": "Say hello in one sentence."}
    ],
    "max_tokens": 50,
    "temperature": 0.7
  }'

Discovering LLM Models

# Search all chat/LLM models
modelslab models search --feature llmaster

# Search by provider
modelslab models search --search "deepseek"
modelslab models search --search "llama"
modelslab models search --search "gemini"

# Get model details
modelslab models detail --id meta-llama-3-8B-instruct

Popular LLM Model IDs

Meta Llama

  • meta-llama-3-8B-instruct — Llama 3 8B (fast, efficient)
  • meta-llama-Llama-3.3-70B-Instruct-Turbo — Llama 3.3 70B (powerful)
  • meta-llama-Meta-Llama-3.1-405B-Instruct-Turbo — Llama 3.1 405B (largest)

DeepSeek

  • deepseek-ai-DeepSeek-R1-Distill-Llama-70B — DeepSeek R1 (reasoning)
  • deepseek-ai-DeepSeek-V3 — DeepSeek V3 (general purpose)

Google

  • gemini-2.0-flash-001 — Gemini 2.0 Flash (fast)
  • gemini-2.5-pro — Gemini 2.5 Pro (capable)

Qwen

  • Qwen-Qwen2.5-72B-Instruct-Turbo — Qwen 2.5 72B
  • Qwen-Qwen2.5-Coder-32B-Instruct — Qwen 2.5 Coder

Mistral

  • mistralai-Mixtral-8x7B-Instruct-v0.1 — Mixtral 8x7B
  • mistralai-Mistral-Small-24B-Instruct-2501 — Mistral Small

Key Parameters

ParameterTypeRequiredDescription
model_idstringYesLLM model identifier (alias: model)
messagesarrayYesArray of message objects with role and content
temperaturefloatNoSampling temperature (0-2, default varies by model)
max_tokensintegerNoMaximum tokens to generate
top_pfloatNoNucleus sampling (0-1)
top_kintegerNoTop-k sampling
frequency_penaltyfloatNoFrequency penalty (-2 to 2)
presence_penaltyfloatNoPresence penalty (-2 to 2)
streamingbooleanNoEnable streaming responses (alias: stream)
nintegerNoNumber of completions (1-10)
stoparrayNoStop sequences (max 4)
seedintegerNoRandom seed for reproducibility
toolsarrayNoFunction/tool definitions
tool_choicestringNoTool selection strategy
response_formatobjectNo{"type": "json_object"} for JSON mode

Response Format

The response follows the OpenAI chat completions format:

{
  "id": "gen-...",
  "model": "meta-llama-3-8B-instruct",
  "object": "chat.completion",
  "created": 1771658583,
  "choices": [
    {
      "index": 0,
      "finish_reason": "stop",
      "message": {
        "role": "assistant",
        "content": "Hello! How can I help you today?"
      }
    }
  ],
  "usage": {
    "prompt_tokens": 17,
    "completion_tokens": 10,
    "total_tokens": 27
  }
}

Error Handling

def safe_chat(message, api_key, model="meta-llama-3-8B-instruct"):
    """Chat with error handling."""
    try:
        response = requests.post(
            "https://modelslab.com/api/v7/llm/chat/completions",
            json={
                "key": api_key,
                "model_id": model,
                "messages": [{"role": "user", "content": message}],
                "max_tokens": 200
            }
        )
        data = response.json()

        if "choices" in data:
            return data["choices"][0]["message"]["content"]
        elif data.get("status") == "error":
            raise Exception(data.get("message", "Unknown error"))
        else:
            raise Exception(f"Unexpected response: {data}")

    except requests.exceptions.RequestException as e:
        raise Exception(f"Network error: {e}")

try:
    reply = safe_chat("Hello!", "your_api_key")
    print(reply)
except Exception as e:
    print(f"Chat failed: {e}")

Resources

Related Skills

  • modelslab-model-discovery - Find and filter models
  • modelslab-account-management - Manage API keys and billing
  • modelslab-image-generation - Generate images from text

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

31.76%
按下载量换算48

Claude

30.75%
按下载量换算46

Cursor

19.73%
按下载量换算30

Gemini CLI

8.91%
按下载量换算13

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills