libllm

Expose an HTTP LLM API client for OpenAI-compatible chat completions and embeddings.

1|1|Updated Aug 7, 2025
One-click install
npx skills add https://github.com/copilot-ld/copilot-ld --skill libllm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: libllm
Source: https://github.com/copilot-ld/copilot-ld/tree/main/packages/libllm
Command: npx skills add https://github.com/copilot-ld/copilot-ld --skill libllm

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a dedicated LLM API client that communicates directly with OpenAI-compatible endpoints to perform chat completions and generate embeddings, simplifying integration in AI-powered apps.

Core Features & Use Cases

  • Chat completions and text embeddings via HTTP with support for GitHub Models, Azure OpenAI, and standard OpenAI endpoints.
  • Streaming responses, token counting, and multi-tool parallel call handling to enable complex agent workflows.
  • Use cases include building AI assistants, knowledge-base querying, and vector-based retrieval systems in production services.

Quick Start

Instantiate an LlmApi client with your token and base URLs, then call completion() or embed() to start interacting with your LLM.

Frequently Asked Questions about libllm

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

FAQPage Schema
How do I connect to OpenAI-compatible LLM endpoints via HTTP?

You can connect to OpenAI-compatible LLM endpoints by instantiating an HTTP LLM API client with your token and base URLs to run chat completions and generate embeddings.

Can I use this LLM API client with Azure OpenAI and GitHub Models?

Yes, the LLM API client supports GitHub Models, Azure OpenAI, and standard OpenAI endpoints for chat completions and text embeddings across different AI service providers.

How do I handle streaming responses and token counting for chat completions?

Streaming responses and token counting are built into the chat completions process, allowing you to handle real-time LLM outputs and track context window usage efficiently.

What is the best way to ensure reliable LLM integration in production services?

Reliable LLM integration requires implementing retry logic, proxy support, and robust error handling within your HTTP API client to manage network failures and rate limits.

Do I need multi-tool parallel call handling for complex agent workflows?

Multi-tool parallel call handling enables complex agent workflows by allowing the LLM client to process multiple tool outputs simultaneously during chat completions.

Does this LLM API client support vector-based retrieval and knowledge-base querying?

Yes, the client generates text embeddings via HTTP, enabling vector-based retrieval systems and knowledge-base querying for AI-powered production applications.