together-hello-world

Featured

Run inference with Together AI -- chat completions, streaming, and model selection. Use when testing open-source models, comparing model performance, or learning the Together AI API. Trigger: "together hello world, together AI example, run llama".

AI & Automation 2,359 stars 334 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Together AI Hello World ## Overview Run chat completions with open-source models via Together AI's OpenAI-compatible API. Supports Llama, Mixtral, Qwen, and 100+ models. Key endpoints: `/v1/chat/completions`, `/v1/completions`, `/v1/embeddings`, `/v1/images/generations`. ## Instructions ### Step 1: Chat Completions ```python from together import Together client = Together() response = client.chat.completions.create( model="meta-llama/Llama-3.3-70B-Instruct-Turbo", messages=[ {"role": "system", "content": "You are a helpful coding assistant."}, {"role": "user", "content": "Write a Python function to calculate fibonacci numbers"}, ], max_tokens=500, temperature=0.7, top_p=0.9, ) print(response.choices[0].message.content) print(f"Tokens: {response.usage.prompt_tokens} in, {response.usage.completion_tokens} out") ``` ### Step 2: Streaming ```python stream = client.chat.completions.create( model="meta-llama/Llama-3.3-70B-Instruct-Turbo", messages=[{"role": "user", "content": "Explain quantum computing"}], stream=True, max_tokens=200, ) for chunk in stream: if chunk.choices[0].delta.content: print(chunk.choices[0].delta.content, end="", flush=True) ``` ### Step 3: Image Generation ```python response = client.images.generate( model="black-forest-labs/FLUX.1-schnell-Free", prompt="A sunset over mountains, digital art style", width=1024, height=768, n=1, ) print(f"Image URL: {response.da...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
8 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category