用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/UltronCore/claude-skill-vault --skill together-ai命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Validate environment configuration files across local, staging, and production environments. Ensure required secrets, database URLs, API keys, and public variables are properly scoped and set. Use this skill when setting up environments, validating configuration, checking for missing secrets, auditing environment variables, ensuring proper scoping of public vs private vars, or troubleshooting environment issues. Trigger terms include env, environment variables, secrets, configuration, .env file, environment validation, missing variables, config check, NEXT_PUBLIC, env vars, database URL, API keys.
Validate environment configuration files across local, staging, and production environments. Ensure required secrets, database URLs, API keys, and public variables are properly scoped and set. Use this skill when setting up environments, validating configuration, checking for missing secrets, auditing environment variables, ensuring proper scoping of public vs private vars, or troubleshooting environment issues. Trigger terms include env, environment variables, secrets, configuration, .env file, environment validation, missing variables, config check, NEXT_PUBLIC, env vars, database URL, API keys.
Build Raycast extensions using the Raycast API: commands, list views, forms, and preferences. Triggers on: Raycast, @raycast/api, raycast extension, raycast command, showToast, List.Item, Action.
正在显示 SKILL.md
基于 SOC 职业分类
| name | together-ai |
| description | Together AI cloud inference API for open-source LLMs with OpenAI-compatible endpoints |
| version | 1.0.0 |
| tags | ["llm","inference","cloud","api","open-source-models","embeddings"] |
Together AI provides fast, cheap cloud inference for 100+ open-source models (Llama, Mistral, Qwen, DeepSeek, Flux, SDXL) via OpenAI-compatible REST APIs. No model management — just call the API. Pricing is typically 5-10x cheaper than OpenAI for equivalent open-source alternatives. Supports chat completions, embeddings, image generation, and fine-tuning. Drop-in replacement for OpenAI SDK in most cases.
Website: https://www.together.ai Docs: https://docs.together.ai
pip install together
# Or use via the OpenAI SDK (drop-in compatible)
pip install openai
from together import Together
client = Together(api_key="your-api-key") # Or set TOGETHER_API_KEY env var
response = client.chat.completions.create(
model="meta-llama/Llama-3.3-70B-Instruct-Turbo",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Explain RAG in one paragraph."},
],
max_tokens=512,
temperature=0.7,
)
print(response.choices[0].message.content)
from openai import OpenAI
# Point OpenAI client at Together's endpoint
client = OpenAI(
api_key="your-together-api-key",
base_url="https://api.together.xyz/v1",
)
response = client.chat.completions.create(
model="mistralai/Mistral-7B-Instruct-v0.3",
messages=[{"role": "user", "content": "What is the capital of Japan?"}],
)
print(response.choices[0].message.content)
from together import Together
client = Together()
stream = client.chat.completions.create(
model="meta-llama/Llama-3.3-70B-Instruct-Turbo",
messages=[{"role": "user", "content": "Write a haiku about machine learning."}],
stream=True,
max_tokens=200,
)
for chunk in stream:
if chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="", flush=True)
print()
from together import Together
client = Together()
# Together hosts BGE and other embedding models
response = client.embeddings.create(
model="BAAI/bge-large-en-v1.5",
input=[
"Machine learning automates predictive models.",
"Deep learning uses neural networks.",
"The weather is nice today.",
],
)
# Access embeddings
for i, embedding_obj in enumerate(response.data):
print(f"Text {i}: {len(embedding_obj.embedding)} dimensions")
# Use for similarity
import numpy as np
embeddings = np.array([e.embedding for e in response.data])
sim = np.dot(embeddings[0], embeddings[1]) / (
np.linalg.norm(embeddings[0]) * np.linalg.norm(embeddings[1])
)
print(f"Similarity between text 0 and 1: {sim:.3f}")
from together import Together
import json
client = Together()
response = client.chat.completions.create(
model="meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo",
messages=[
{
"role": "user",
"content": """Extract structured data from this text as JSON:
'Alice Smith, 34, is a senior ML engineer at TechCorp in Seattle.
She has 8 years of experience in NLP and computer vision.'
Return: {"name": str, "age": int, "title": str, "company": str,
"location": str, "years_experience": int, "skills": [str]}""",
}
],
response_format={"type": "json_object"},
)
data = json.loads(response.choices[0].message.content)
print(data)
from together import Together
import base64
client = Together()
response = client.images.generate(
prompt="A photorealistic image of a robot learning to paint in a studio",
model="black-forest-labs/FLUX.1-schnell",
width=1024,
height=1024,
steps=4,
n=1,
)
# Get base64 image
image_b64 = response.data[0].b64_json
image_bytes = base64.b64decode(image_b64)
with open("generated_image.png", "wb") as f:
f.write(image_bytes)
print("Image saved.")
from together import Together
client = Together()
# Upload training file (JSONL format, OpenAI compatible)
with open("training_data.jsonl", "rb") as f:
file_response = client.files.upload(file=("training_data.jsonl", f))
file_id = file_response.id
print(f"Uploaded file: {file_id}")
# Start fine-tuning job
ft_job = client.fine_tuning.create(
training_file=file_id,
model="meta-llama/Meta-Llama-3.1-8B-Instruct-Reference",
n_epochs=3,
learning_rate=1e-5,
suffix="my-custom-model",
)
print(f"Fine-tune job: {ft_job.id}, status: {ft_job.status}")
# Check status
job = client.fine_tuning.retrieve(ft_job.id)
print(f"Status: {job.status}, model: {job.output_name}")
import asyncio
from together import AsyncTogether
async def process_batch(texts: list[str]) -> list[str]:
client = AsyncTogether()
tasks = [
client.chat.completions.create(
model="meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo",
messages=[{"role": "user", "content": f"Summarize in one sentence: {text}"}],
max_tokens=100,
)
for text in texts
]
responses = await asyncio.gather(*tasks)
return [r.choices[0].message.content for r in responses]
texts = [
"Long article about climate change...",
"Report on quarterly earnings...",
"Research paper on transformer architectures...",
]
summaries = asyncio.run(process_batch(texts))
for text, summary in zip(texts, summaries):
print(f"Original: {text[:40]}...")
print(f"Summary: {summary}\n")
{"messages": [...]} per line in OpenAI format; validate before uploadlitellm-proxy — unified proxy that includes Together AI as a provideropenrouter-litellm — alternative multi-provider routervllm-serving — self-hosted alternative for full controlollama-integration — local alternative for privacy-sensitive use casespeft-fine-tuning — understanding LoRA fine-tuning (Together uses this internally)tool: together-ai
category: llm-inference
tier: platform
interface: python-sdk, rest-api
platform: cloud
stars: N/A (commercial platform)