能力标签
PI2LLM
🛠
AI工具

PI2LLM

基于 JavaScript · 开源免费,本地部署,数据完全自主可控
英文名:pi2llm
⭐ 14 Stars 🍴 2 Forks 💻 JavaScript 📄 MIT 🏷 AI 7.5分
7.5AI 综合评分
astrophotographyjavascriptjsonllmpixinsight
✦ AI Skill Hub 推荐

经 AI Skill Hub 精选评估,PI2LLM 获评「推荐使用」。这款AI工具在功能完整性、社区活跃度和易用性方面表现出色,AI 评分 7.5 分,适合有一定技术背景的用户使用。

📚 深度解析

PI2LLM 是一款基于 JavaScript 的开源工具,在 GitHub 上收获 0k+ Star,是astrophotography、javascript、json、llm领域中的优质开源项目。开源工具的最大优势在于代码完全透明,你可以审计每一行代码的安全性,也可以根据自身需求进行二次开发和定制。

**为什么要使用开源工具而非商业 SaaS?**
对于个人开发者和有隐私需求的用户,本地部署的开源工具意味着数据不离本机,不受第三方服务商的数据政策约束。同时,开源工具通常没有使用次数限制和月度费用,一次安装即可长期使用,对于高频使用场景的总拥有成本(TCO)远低于订阅制商业工具。

**安装与环境准备**
PI2LLM 依赖 JavaScript 运行环境。建议通过 pyenv(Python)或 nvm(Node.js)管理 JavaScript 版本,避免全局环境污染。对于新手用户,推荐先创建虚拟环境(python -m venv venv && source venv/bin/activate),再安装依赖,这样即使出现问题也可以随时删除虚拟环境重新开始,不影响系统稳定性。

**社区与维护**
GitHub Issue 和 Discussion 是获取帮助的最快渠道。在提问前建议先检查 Closed Issues(已关闭的问题),大多数常见问题都已有解答。遇到 Bug 时,提供 pip list 的输出、完整错误堆栈和最小可复现示例,能显著提高开发者响应速度。AI Skill Hub 将持续追踪 PI2LLM 的版本更新,及时通知重要功能变化。

📋 工具概览

PI2LLM 是一款基于 JavaScript 开发的开源工具,专注于 astrophotography、javascript、json 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。

GitHub Stars
⭐ 14
开发语言
JavaScript
支持平台
Windows / macOS / Linux
维护状态
轻量级项目,按需更新
开源协议
MIT
AI 综合评分
7.5 分
工具类型
AI工具
Forks
2

📖 中文文档

以下内容由 AI Skill Hub 根据项目信息自动整理,如需查看完整原始文档请访问底部「原始来源」。

PI2LLM 是一款基于 JavaScript 开发的开源工具,专注于 astrophotography、javascript、json 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。

📌 核心特色
  • 开源免费,支持本地部署,数据完全自主可控
  • 活跃的 GitHub 开源社区,持续迭代更新
  • 提供详细文档和使用示例,新手友好
  • 支持自定义配置,灵活适配不同使用环境
  • 可作为基础组件集成进现有技术栈或进行二次开发
🎯 主要使用场景
  • 本地部署运行,保护数据隐私,满足合规要求
  • 自定义集成到现有系统,扩展技术栈能力
  • 作为开源基础组件进行商业化二次开发
以下安装命令基于项目开发语言和类型自动生成,实际以官方 README 为准。
安装命令
# 方式一:npm 全局安装
npm install -g pi2llm

# 方式二:npx 直接运行(无需安装)
npx pi2llm --help

# 方式三:项目依赖安装
npm install pi2llm

# 方式四:从源码运行
git clone https://github.com/scottstirling/pi2llm
cd pi2llm
npm install
npm start
📋 安装步骤说明
  1. 访问 GitHub 仓库页面
  2. 按照 README 文档完成依赖安装
  3. 根据系统环境完成初始化配置
  4. 参考官方示例或文档开始使用
  5. 遇到问题可在 GitHub Issues 中查找解答
以下用法示例由 AI Skill Hub 整理,涵盖最常见的使用场景。
常用命令 / 代码示例
# 命令行使用
pi2llm --help

# 基本用法
pi2llm [options] <input>

# Node.js 代码中使用
const pi2llm = require('pi2llm');

const result = await pi2llm.run(options);
console.log(result);
以下配置示例基于典型使用场景生成,具体参数请参照官方文档调整。
配置示例
# pi2llm 配置说明
# 查看配置选项
pi2llm --config-example > config.yml

# 常见配置项
# output_dir: ./output
# log_level: info
# workers: 4

# 环境变量(覆盖配置文件)
export PI2LLM_CONFIG="/path/to/config.yml"
📑 README 深度解析 真实文档 完整度 74/100 查看 GitHub 原文 →
以下内容由系统直接从 GitHub README 解析整理,保留代码块、表格与列表结构。

LLM Assistant (for PixInsight)

LLM Assistant Banner)

LLM Assistant for PixInsight is a script that integrates a local or cloud-based Large Language Model (LLM) directly into your PixInsight workspace. It acts as an astrophotography processing assistant, aware of a selected image's specific data and metadata, to provide advice on next processing steps, help understand the image data, and generate descriptions of finished work.

Start getting data-driven recommendations tailored to your image, right inside PixInsight.

---

Features in Version 2.0

  • Visual Analysis (New!): If you have access to a vision-enabled LLM (such as Qwen2.5-VL-7B-Instruct locally, or Google Gemini or OpenAI remote APIs), LLM Assistant for PixInsight can now send a snapshot of a selected nonlinear image along with its history and metadata for more thorough analysis.
  • User-configurable, opt-in feature, enabled globally in Settings and optionally per image request on the main chat UI.
  • The selected view dimensions are checked before sending. Visual LLMs currently (Sept. 2025) support maximum image dimensions no greater than 2048 pixels on a side.
  • If the selected view exceeds the configuration option for maximum image dimensions (see the Settings), a copy is dynamically created and resized to fit the maximum supported.
  • The view is copied to a JPG file in the system temp directory, Base64-encoded and included in a JSON POST to the LLM.
  • The temporary JPG is deleted after sending.
  • Save/Load Configuration Profiles: Save and load configuration settings to a .pi2llm.json file.
  • This makes it easy to switch between different LLM providers, version or share configurations.
  • NOTE: API tokens are saved in clear text in the JSON file.
  • Improved Chat Experience:
  • The chat prompt input is now a proper multi-line text box.
  • Initial configuration and default settings reset workflow has been redone to remove obstacles.
  • A bug with stale state change between configuration settings and chat UI has been fixed.
  • Validation of format for URLs input to the configuration.
  • System Prompt Updated:
  • The metadata and history of an image may be incomplete and image view names may be more ad hoc than informative, so the prompt is more aware of discrepancies in data and is told to prioritize the visual of the image itself when in doubt.
  • LLM Response Error Messages:
  • Error message details from the LLM API are displayed to the user better than before. So if a model is not selected or the wrong name given or other vendor-specific errors, any specific details in the error message will be output to the chat UI and console.
  • README Updated with Common LLM API Endpoints:
  • Added Common LLM API Endpoints table to the README.md for reference and will add more info as users request.

Features in version 1.0

  • Context-Aware Analysis: The assistant doesn't give generic advice. It analyzes a profile of any selected image, including:
  • Live Processing History: Understands the steps just taken in the current session.
  • Astrometric Data: Knows what objects are in the image and at what image scale.
  • Image Properties: Dimensions, color space, file path, and more.
  • FITS Header: Any available FITS keyword data.
  • Interactive Chat UI: A modal (as required for PixInsight Scripts) dialog supporting conversation with an LLM Assistant.
  • Expert Recommendations: Asks the LLM to suggest the next logical processing steps based on a selected image's current state.
  • Image Description Generation: Select a finished image and ask the assistant to write a detailed description of the astronomical target and the processing workflow used to create it.
  • Highly Configurable: Easily configure connection to any OpenAI-compatible API.

Here is a screenshot of the main chat UI, showing the image selection dropdown, the chat history, and the input box. Screenshot of LLM Assistant main dialog

Here is a screenshot of the main chat UI with image analysis enabled, showing the image selection dropdown, per-image opt-in checkbox, chat history, and prompt input. Screenshot of LLM Assistant main dialog

---

Key Features of the Chat Window

New Chat: Button resets the conversation and clears history. Settings: Opens the configuration dialog at any time. * Export History: Saves the current conversation to a .txt or .json file. Screenshot of Export Chat History

---

Requirements

1. PixInsight: Version 1.8.9 or later is recommended. 2. An LLM Server (Local or Cloud): You must have access to an LLM that provides an OpenAI-compatible API endpoint. This is a flexible requirement that can be met in several ways: Local Servers (Recommended for privacy and no cost): LM Studio: An easy-to-use desktop app for running local models and serving an API endpoint locally. llama.cpp: A high-performance engine with an OpenAI-compatible server option for more advanced users. Cloud Services (For powerful, cutting-edge models): Cloudflare AI Gateway: A fantastic service to connect to models from Meta (Llama 3), Google, Qwen and more, which offers 10,000 "neurons" (around 40,000 tokens) free per day. Google Gemini AI: Use Google's latest Gemini models via their OpenAI-compatible endpoint. * Currently, any other service that offers an OpenAI-compatible API or Cloudflare Gateway-compatible API. 3. An LLM Model: A capable chat or instruction-tuned model. Models such as Llama 3.2 Instruct, Mixtral, Qwen 3, Gemini Flash and Pro, OpenAI, Claude and variants of Mistral are excellent choices, able to identify astronomical targets by celestial coordinates and knowledgeable to various degrees about PixInsight and astrophotography processing.

---

Installation

  1. Download the Script: Download the main branch of this repository as a .zip file and extract it to a memorable location.
  2. Open PixInsight.
  3. Go to the main menu and select Script > Feature Scripts....
  4. In the Feature Scripts dialog, click the "Add" button.
  5. Navigate to the location where you extracted the repository and select the pi2llm folder (the folder that contains pi2llm-main.js and the lib sub-folder).
  6. Click "Done".

The LLM Assistant should appear under the Script > Utilities menu as LLM Assistant.

---

How to Use the LLM Assistant

Once configured, using the assistant is a simple interactive process. You may begin chatting to the LLM directly through the input text area, using Ctrl+Enter as a keyboard shortcut to Send, or use the Send button.

1. Open one or more images in your PixInsight workspace. For best results, use images that have been plate-solved with astrometric data and have been saved with processing history and/or XISF or FITS headers. 2. Go to Script > Utilities > LLM Assistant to launch the main tool. 3. The chat window will appear. See the Configuration section ^ if needed. 4. Select a Target Image: Use the dropdown menu at the top left of the window to choose an open image to work on. 5. Analyze: Click the "Analyze Selected Image" button. The script will gather details about the image and its processing history and send the details to the LLM and, if opted in, a copy of the image as a JPG is sent after being resized to fit the configured maximum dimensions for the LLM API. 6. Chat The first response from the LLM will appear. You can now have a conversation: Ask for recommendations: "What should I do next?" Ask for clarification: "Explain what DynamicBackgroundExtraction does." * Ask for a description: "Please write a description for this image for AstroBin."

Here is a screenshot showing the data sent to the LLM at the top, and part of the response from Alibaba's Qwen LLM model Qwen3-4b-2507 running locally on LMStudio 3.24. Screenshot of Qwen 4b LLM Response Note that the Qwen 4b model loves to use emojis in its responses, but here incorrectly describes the target as being in Cassiopeia rather than Lacerta. Your mileage may vary with the smaller LLM models accuracy. and all LLMs are liable to "hallucinate" to fill in gaps.

Here is a response from Gemini Flash 2.0 explaining how UnsharpMask and Convolution work in response to a follow up question about that. Screenshot of Gemini Flash 2.0 LLM Response

Configuration

Before using the assistant, configure it to connect to a live LLM API endpoint, local or remote.

  1. Go to Script > Utilities > LLM Assistant
  2. Click the Settings button to open the configuration dialog.

Here is a screenshot of the configuration dialog, showing the defaults. Screenshot of the Configuration Dialog

3. LLM URL: Enter the full URL of an LLM's chat completions API endpoint. For LM Studio, this is http://127.0.0.1:1234/v1/chat/completions. For a Cloudflare AI Gateway, it will look like https://gateway.ai.cloudflare.com/v1/${ACCOUNT_ID_STRING}/${API_GATEWAY}/workers-ai/${MODEL_PATH} where the model is specified in the URL. For a Google AI API, the URL will look like https://generativelanguage.googleapis.com/v1beta/openai/chat/completions and the model is specified as a separate configuration value. 4. API Key: For local servers, you can typically leave the default "no-key". For cloud services, enter your API token for your account's authentication. 5. Model: This field is often required by cloud services to specify which model to use, though some vendors put the model name in the URL. It can be left blank for local LLM servers. For a Cloudflare AI Gateway, an example might be @cf/meta/llama-4-scout-17b-16e-instruct. For Google AI, an example might be gemini-2.0-flash. For local servers like llama.cpp where you only load one model, this field can often be left blank. 6. Temperature: Controls the "creativity" and randomness of the LLM's responses. The default is a good starting point and anywhere from 0.8 to 1.2 is normal. 7. Max Tokens: Limits the length of the LLM's responses. The maximum tokens supported vary by LLM model and vendor. Chat history counts toward the max token count. 8. Enable Visual Analysis: Option to enable or disable sending image data to the LLM. Default is disabled. 9. Vision max pixels: Set to the maximum supported by the visual LLM, which is referenced if needed to resize the LLM's copy of a selected image. The maximum supported varies by vendor and model. See your vendor's documentation, but safe bets are 1024 for local models and 2048 for remote vendor APIs. 10. System Prompt: A default system prompt is provided and can be customized to change the assistant's behavior. 11. Click "OK" to save the settings.

Settings Dialog: Load Profile, Save Profile and Reset to Defaults

  • The Load Profile... button lets configuration settings be loaded from a local JSON file.
  • The Save Profile... button lets configuration settings can be saved to a local file in JSON format.
  • The Reset to Defaults button resets configuration values to defaults.

---

Common LLM API Endpoints

To configure LLM Assistant, get the "Chat Completions Endpoint" for an LLM provider. Here is a list of common endpoints for popular local and remote services.

Vendor / ToolChat Completions EndpointNotes
**Local Servers***These run on your own computer.*
LM Studiohttp://127.0.0.1:1234/v1/chat/completionsLM Studio server default.<br>Port may vary if changed in settings.
Ollamahttp://127.0.0.1:11434/v1/chat/completionsollama default openAI-compatible endpoint.
llama.cpphttp://127.0.0.1:8080/v1/chat/completionsDefault for llama-server.<br>Port is configurable.
**Cloud Services***These are remote services and require an API Key.*
OpenAIhttps://api.openai.com/v1/chat/completionsFor models like GPT-4o, GPT-4 Turbo.<br>Requires a paid API key.
Google AIhttps://generativelanguage.googleapis.com/v1beta/openai/chat/completionsRequires a Google account and API key.
Anthropichttps://api.anthropic.com/v1/messagesRequires an Anthropic account and API key.<br>The specific model must also be configured.
**API Routers***These services provide access to multiple models.*
OpenRouter.aihttps://openrouter.ai/api/v1/chat/completionsAccess many models (GPT, Claude, Llama, etc.)<br>with one API key.
Cloudflare AIhttps://gateway.ai.cloudflare.com/v1/{ACCOUNT_ID}/{GATEWAY}/workers-ai/{MODEL}Requires a Cloudflare account.<br>The model is part of the URL.
Meta Llama(Varies by host)Meta does not host a public API.<br>Access via local servers or routers like OpenRouter.

---

🎯 aiskill88 AI 点评 A 级 2026-05-28

AI集成天文摄影工具,自动化处理

📚 实用指南(长尾问题)
适合谁
  • 需要 pi2llm 解决具体问题的开发者与运营人员
最佳实践
  • 本地部署优先选 GGUF 量化模型,节省显存并保持响应速度
常见错误
  • API key 直接提交到 git 仓库(请用 .env 并加入 .gitignore)
  • 显存不足直接 OOM — 优先降低 context 或换更小的量化模型
部署方案
  • 本地部署:CPU 8GB 起,GPU 推荐 16GB+ 显存
  • 云端托管:可放在 Vercel / Railway / Fly.io 等 PaaS 平台
相关搜索
pi2llm 中文教程pi2llm 安装报错怎么办pi2llm 与同类工具对比pi2llm 最佳实践pi2llm 适合谁用

⚡ 核心功能

👥 适合谁
  • 需要 pi2llm 解决具体问题的开发者与运营人员
⭐ 最佳实践
  • 本地部署优先选 GGUF 量化模型,节省显存并保持响应速度
⚠️ 常见错误
  • API key 直接提交到 git 仓库(请用 .env 并加入 .gitignore)
  • 显存不足直接 OOM — 优先降低 context 或换更小的量化模型

👥 适合人群

AI 技术爱好者研究人员和学生开发者和工程师技术创业者

🎯 使用场景

  • 本地部署运行,保护数据隐私,满足合规要求
  • 自定义集成到现有系统,扩展技术栈能力
  • 作为开源基础组件进行商业化二次开发

⚖️ 优点与不足

✅ 优点
  • +MIT 协议,可免费商用
  • +完全开源免费,无授权费用
  • +本地部署,数据完全自主可控
  • +开发者社区支持,遇问题可查可问
⚠️ 不足
  • 安装和初始配置可能需要一定技术基础
  • 功能完整性通常不如成熟商业产品
  • 技术支持主要依赖开源社区,响应速度不稳定
⚠️ 使用须知

AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。

建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。

📄 License 说明

✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。

🔗 相关工具推荐

📰 相关 AI 新闻
🍿 AI 圈相关吃瓜
🗺️ 相关解决方案
🧩 你可能还需要
基于当前 Skill 的能力图谱,自动补全的工具组合

❓ 常见问题 FAQ

pi2llm 是一款JavaScript开发的AI辅助工具。开源AI工具:LLM AI integration for PixInsight。⭐14 · JavaScript 主要应用场景包括:天文摄影AI处理。
💡 AI Skill Hub 点评

AI Skill Hub 点评:PI2LLM 的核心功能完整,质量良好。对于AI 技术爱好者来说,这是一个值得纳入个人工具库的选择。建议先在非生产环境试用,再逐步推广。

📚 深入学习 PI2LLM
查看分步骤安装教程和完整使用指南,快速上手这款工具
🌐 原始信息
原始名称 pi2llm
原始描述 开源AI工具:LLM AI integration for PixInsight。⭐14 · JavaScript
Topics astrophotographyjavascriptjsonllmpixinsight
GitHub https://github.com/scottstirling/pi2llm
License MIT
语言 JavaScript
🔗 原始来源
🐙 GitHub 仓库  https://github.com/scottstirling/pi2llm 🌐 官方网站  https://scottstirling.github.io/pi2llm/

收录时间:2026-05-28 · 更新时间:2026-05-30 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。