360 Secure SkillHub
360 安全技能中心

Gpt

这是一款基于bash的GPT API操作助手,核心功能包括生成聊天补全、嵌入、批量请求的API载荷,准备并验证微调JSONL数据,估算API调用成本,以及转换CSV与JSONL格式。典型场景为开发人员调用OpenAI API前的请求准备、成本预估、微调数据处理等。输入支持命令行参数与文件,输出默认是JSON/JSONL到标准输出,也可指定输出文件,需依赖bash 4+环境。

xueyetianya
xueyetianya
热度 60.78
最近更新 2026-05-18 12:23:14
分类:开发依赖:代码执行 / 读写文件应用场景:API 集成 / 数据处理 / 文件转换

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add gpt
Metadata
name
gpt
description
Generate GPT API request payloads. Use when building chat completions, embeddings, fine-tuning data, or estimating API costs.
version
3.4.0
author
BytesAgain
homepage
https://bytesagain.com
source
https://github.com/bytesagain/ai-skills
tags
["gpt","openai","api","chat-completion","embeddings","fine-tuning"]

gpt

GPT API calling assistant. Build chat completion requests, generate embedding payloads, prepare fine-tuning data, estimate costs, batch requests, and convert between formats.

Commands

chat

Build a chat completion request JSON payload from messages.

bash scripts/script.sh chat --system "You are a translator" --user "Translate: hello"
bash scripts/script.sh chat --system "Helper" --user "Hi" --model gpt-4o --temperature 0.7

embed

Generate an embedding API request payload.

bash scripts/script.sh embed --input "Text to embed"
bash scripts/script.sh embed --file texts.txt --model text-embedding-3-small

finetune

Prepare and validate fine-tuning JSONL data from source files.

bash scripts/script.sh finetune --input pairs.csv --output training.jsonl
bash scripts/script.sh finetune --validate training.jsonl

cost

Estimate API costs based on token count and model pricing.

bash scripts/script.sh cost --tokens 5000 --model gpt-4o
bash scripts/script.sh cost --file input.txt --model gpt-4-turbo

batch

Generate multiple API request payloads from a list of inputs.

bash scripts/script.sh batch --file prompts.txt --model gpt-4o --output batch_requests.jsonl

convert

Convert between JSONL and CSV data formats.

bash scripts/script.sh convert --input data.csv --to jsonl --output data.jsonl
bash scripts/script.sh convert --input data.jsonl --to csv --output data.csv

Output

All commands output JSON request bodies or JSONL to stdout by default. Use --output to write to a file. Cost estimates print a breakdown table with per-model pricing.

Requirements

  • bash 4+

Feedback

Report issues or suggestions: https://bytesagain.com/feedback/


Powered by BytesAgain | bytesagain.com