using-llm

List available large language models and send chat completion requests from code.

5.0k|548|Updated May 14, 2025
One-click install
npx skills add https://github.com/dtyq/magic --skill using-llm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-llm
Source: https://github.com/dtyq/magic/tree/main/backend/super-magic/agents/skills/using-llm
Command: npx skills add https://github.com/dtyq/magic --skill using-llm

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

List available large language models and send chat completions programmatically, enabling quick model comparison and integration into code snippets.

Core Features & Use Cases

  • List currently available models for quick discovery.
  • Send chat completion requests in OpenAI-like format from code to test prompts, compare responses, or validate model behavior.
  • Use cases include model benchmarking, visual understanding workflows, and batch inference within automated scripts.

Quick Start

Run a short code snippet to list available models and perform a basic chat request to validate an LLM integration.

Frequently Asked Questions about using-llm

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I call and compare large language models in Python code?

To call and compare large language models in Python, use the `create_openai_sync_client` function from the SDK to programmatically send OpenAI-like chat requests, execute snippets, and compare responses.

How do I list available LLMs for model benchmarking in my code?

You can list available LLMs for model benchmarking by executing a short Python code snippet through the SDK. This allows you to discover supported models and validate LLM integrations before running automated batch inference scripts.

Can I send vision-enabled prompts to LLMs using a Python SDK?

Yes, you can send vision-enabled prompts to LLMs using the Python SDK. By creating an OpenAI sync client, you can execute code snippets that process visual understanding workflows and test multimodal model behavior programmatically.

Does this approach support sending chat completions in an OpenAI-like format from code?

Yes, this approach supports sending chat completions in an OpenAI-like format from code. You create a sync client to execute model calls, enabling you to test prompts, compare responses, and validate model behavior within your development workflow.

What is the best way to run batch inference across multiple models in a script?

The best way to run batch inference across multiple models in a script is to use the Python SDK to create a sync client and execute model calls via code snippets. This enables programmatic LLM discovery and comparison within automated workflows.