经 AI Skill Hub 精选评估,猫形LLM 获评「推荐使用」。这款AI工具在功能完整性、社区活跃度和易用性方面表现出色,AI 评分 7.5 分,适合有一定技术背景的用户使用。
猫形LLM 是一款基于 Python 开发的开源工具,专注于 AI、LLM、Python 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
猫形LLM 是一款基于 Python 开发的开源工具,专注于 AI、LLM、Python 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
# 方式一:pip 安装(推荐)
pip install cat-llm
# 方式二:虚拟环境安装(推荐生产环境)
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install cat-llm
# 方式三:从源码安装(获取最新功能)
git clone https://github.com/chrissoria/cat-llm
cd cat-llm
pip install -e .
# 验证安装
python -c "import cat_llm; print('安装成功')"
# 命令行使用
cat-llm --help
# 基本用法
cat-llm input_file -o output_file
# Python 代码中调用
import cat_llm
# 示例
result = cat_llm.process("input")
print(result)
# cat-llm 配置文件示例(config.yml) app: name: "cat-llm" debug: false log_level: "INFO" # 运行时指定配置文件 cat-llm --config config.yml # 或通过环境变量配置 export CAT_LLM_API_KEY="your-key" export CAT_LLM_OUTPUT_DIR="./output"
CatLLM: A Reproducible LLM Pipeline for Classifying Open-Ended Text Across Domains
-----
Extracts specific features and attributes from images, returning exact answers to user-defined questions (e.g., counts, colors, presence of objects).
Methodology: Processes each image individually using vision models to extract precise information about specified features. Unlike scoring and classification functions, this returns factual data such as object counts, color identification, or presence/absence of specific elements.
Parameters: - image_description (str): A description of what the model should expect to see - image_input (list): List of image file paths or folder path containing images - features_to_extract (list): List of specific features to extract (e.g., ["number of people", "primary color", "contains text"]) - api_key (str): API key for the LLM service - user_model (str, default="gpt-4o"): Specific vision model to use - creativity (float, default=0): Temperature/randomness setting (0.0-1.0) - to_csv (bool, default=False): Whether to save the output to a CSV file - safety (bool, default=False): Enable safety checks and save results at each API call step - filename (str, default="categorized_data.csv"): Filename for CSV output - save_directory (str, optional): Directory path to save the CSV file - model_source (str, default="OpenAI"): Model provider
Returns: - pandas.DataFrame: DataFrame with image paths and extracted feature values
Example:
import catllm as cat
features = cat.image_features(
image_description='Product photos from e-commerce site',
features_to_extract=['number of items', 'primary color', 'has price tag'],
image_input='/path/to/images/',
user_model="gpt-4o",
api_key="OPENAI_API_KEY"
)
---
All dependencies are declared in pyproject.toml and installed automatically by pip. No manual dependency management is needed.
Core dependencies (installed with any pip install cat-llm or cat-stack):
| Package | Purpose |
|---|---|
pandas | Data manipulation and output DataFrames |
tqdm | Progress bars during classification |
requests | HTTP calls to LLM provider APIs |
regex | JSON extraction from LLM responses |
Optional dependencies (install with extras syntax):
| Extra | Packages | Install |
|---|---|---|
pdf | PyMuPDF | pip install cat-llm[pdf] |
docx | python-docx | pip install cat-llm[docx] |
embeddings | sentence-transformers | pip install cat-llm[embeddings] |
formatter | torch, transformers, accelerate | pip install cat-llm[formatter] |
No provider-specific SDKs are required at runtime. CatLLM communicates with all LLM providers (OpenAI, Anthropic, Google, Mistral, HuggingFace, Perplexity, xAI, Ollama) via their REST APIs using requests directly.
Install the full ecosystem:
pip install cat-llm
Or install only the domain you need (lighter footprint):
pip install cat-survey # survey responses — pulls in cat-stack automatically
pip install cat-vader # social media
pip install cat-ademic # academic papers
pip install cat-pol # political text
pip install cat-cog # cognitive assessment (CERAD scoring)
pip install cat-web # web content classification
pip install cat-stack # general-purpose base only, no domain framing
Optional extras (apply to both cat-llm and cat-stack):
pip install cat-llm[pdf] # PDF support
pip install cat-llm[embeddings] # Embedding-based similarity scores
pip install cat-llm[formatter] # Local JSON formatter fallback
install.packages("cat.llm", repos = c("https://chrissoria.r-universe.dev", "https://cloud.r-project.org"))
library(cat.llm) install_cat_stack() ```
Or install a single domain package for a lighter footprint (e.g. install.packages("cat.survey", repos = ...)).
All core functions — classify(), extract(), explore(), summarize(), plus domain-suffixed aliases like classify_survey() and classify_political() — are available with native R syntax. See the R package README for the full ecosystem overview and per-package documentation.
-----
Install only the domain package you need:
```python
import catademic as cat
results = cat.classify( input_data=["paper1.pdf", "paper2.pdf"], categories=["Empirical", "Theoretical", "Review"], journal_issn="0894-4393", api_key=api_key )
python
import catvader as cat
results = cat.classify( input_data=df['posts'], categories=["Misinformation", "Opinion", "News"], platform="Reddit", api_key=api_key )
python
import catstack as cat
results = cat.classify( input_data=df['text_column'], categories=["Category A", "Category B", "Category C"], description="My text data", api_key=api_key ) ```
-----
This package is designed for building datasets at scale, not one-off queries. While you can categorize individual responses, its primary purpose is batch processing entire text columns, image collections, or PDF corpora into structured research datasets.
All outputs are formatted for immediate statistical analysis and can be exported directly to CSV.
Not to be confused with CAT-LLM for Chinese article‐style transfer (Tao et al. 2024).
result = catllm.prompt_tune( input_data=df['responses'], categories=["Positive", "Negative", "Neutral"], api_key=api_key, sample_size=15, )
Install cat-llm and access every domain through a single import:
```python import catllm
df = pol.fetch_source("social_trump_truth", since="2024-01-01") pol.list_sources() # see all 15 sources ```
Get an API key from your preferred provider:
Most providers require adding a payment method and purchasing credits. Store your key securely and never share it publicly.
Note: The functions documented below are the domain-neutral versions fromcat-stack. They work with any text, image, or PDF data without domain-specific framing. Domain packages (cat-survey,cat-vader,cat-ademic, etc.) accept all the same parameters and add domain-specific ones on top (e.g.,survey_question=,platform=,journal_issn=). See Domain Packages for details.
An R interface is available for users who prefer R over Python. The R ecosystem mirrors the Python one with 8 packages (cat.stack, cat.survey, cat.vader, cat.ademic, cat.cog, cat.pol, cat.web, and the cat.llm meta-package) that wrap the Python code via reticulate.
```r
Each domain package wraps cat-stack's classification engine with domain-tuned prompts and domain-specific parameters. The base classify(), extract(), explore(), summarize(), and prompt_tune() parameters all work — domain packages add parameters on top.
Fully Tested: - OpenAI (GPT-4, GPT-4o, GPT-5, etc.) - Anthropic (Claude Sonnet 4, Claude 3.5 Sonnet, Haiku) - Perplexity (Sonar models) - Google Gemini - Free tier has severe rate limits (5 RPM). Requires Google AI Studio billing account for large-scale use. - Huggingface - Access to Qwen, Llama 4, DeepSeek, and thousands of user-trained models for specific tasks. API routing can occasionally be unstable. - xAI (Grok models) - Mistral (Mistral Large, Pixtral, etc.)
Note: For best results, I recommend starting with OpenAI or Anthropic.
cat-llm 是一个可复现的 LLM Pipeline 工具,专门用于跨领域对开放式文本进行分类与分析。该项目旨在为研究人员提供一套标准化的流程,将非结构化的文本、图像或 PDF 数据高效转化为可用于统计分析的结构化研究数据集。
项目提供强大的 `image_features()` 功能,能够从图像中提取特定的特征和属性。不同于传统的评分或分类函数,该功能通过 Vision 模型���每张图像进行独立处理,能够针对用户定义的特定问题(如物体计数、颜色识别或是否存在特定对象)返回精确的事实性数据,而非模糊的分数。
项目的所有依赖项均已在 `pyproject.toml` 中声明。开发者可以通过 `pip` 进行自动化的依赖管理,无需手动配置复杂的环境。核心依赖包将随 `pip install cat-llm` 或 `cat-stack` 命令一同安装,确保了开发环境的一致性。
用户可以通过多种方式安装:Python 用户可使用 `pip install cat-llm` 安装全量生态,或根据需求安装轻量级的领域包(如 `cat-survey`、`cat-vader` 等)。R 语言用户推荐通过 R-universe 安装 `cat.llm` 元包,并使用 `install_cat_stack()` 配置 Python 后端,从而在 R 环境中原生调用所有核心功能。
cat-llm 专为大规模数据集构建而设计,而非仅用于单次查询。其核心应用场景是批量处理整个文本列、图像集合或 PDF 文档库,并将其转化为结构化的研究数据集。所有输出结果均已针对统计分析进行了格式化处理,支持直接导出为 CSV 文件,极大提升了科研效率。
用户可以通过安装 `cat-llm` 元包来统一管理所有领域模块。通过 `import catllm` 即可访问所有领域功能。配置过程简单直观,支持通过统一的入口进行参数设置,确保了在处理不同领域数据时能够保持一致的配置逻辑。
项目提供了灵活的 API 调用方式。用户可以通过 `pol.fetch_source` 直接获取原始数据而无需 API Key。在进行模型推理时,支持接入 OpenAI、Anthropic、Google 以及 Huggingface 等主流供应商的 API Key。此外,项目提供了 domain-neutral(领域中立)的 API 版本,确保函数在处理各类数据时具有高度的通用性。
项目采用双语言生态设计:Python 用户通过 `cat-stack` 及其领域扩展包进行开发;R 用户则可以通过封装了 Python 代码的 `reticulate` 接口,使用 `cat.stack` 等 R 包实现无缝衔接。各领域包(如 `cat.survey`)在继承基础分类引擎的同时,通过注入领域微调的 Prompts 和特定参数,实现了专业化的任务处理。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
⚠️ GPL 3.0 — 强 Copyleft,衍生作品须开源,含专利保护条款,不可闭源使用。
AI Skill Hub 点评:猫形LLM 的核心功能完整,质量良好。对于AI 技术爱好者来说,这是一个值得纳入个人工具库的选择。建议先在非生产环境试用,再逐步推广。
| 原始名称 | cat-llm |
| 原始描述 | 开源AI工具:placeholder。⭐8 · Python |
| Topics | AILLMPython |
| GitHub | https://github.com/chrissoria/cat-llm |
| License | GPL-3.0 |
| 语言 | Python |
收录时间:2026-05-17 · 更新时间:2026-05-30 · License:GPL-3.0 · AI Skill Hub 不对第三方内容的准确性作法律背书。