DEV Community· Aditya Borgaonkar·· 12 天前AI 評分48
Nebula:為 Stellarium 加入插件,打造 AI 天象館
I built an AI planetarium by adding a plugin to Stellarium
AI 導讀
Nebula 是為開源天象館 Stellarium 製作的 AI 助理插件,可按自然語言指令調整觀測對象、時間和縮放,並提供五站導賞及星空照片辨識。插件以 C++/Qt 編寫,連接 OpenAI 相容端點或 Anthropic,並以 JSON 指令控制 Stellarium。
正文
I wanted to say "show me Mars" to a planetarium and have it fly there. So I built Nebula: an AI assistant plugin for Stellarium, the open-source planetarium.
What it does
- Ask the sky: "show me Vega", "what does the sky look like at 9 pm?" and the view, time and zoom change.
- Guided tours: one click plans a five-stop tour of what's up now, with narration.
- Photo identification: upload a sky photo and get the objects named.
- Voice mode .
Demo, downloads (Windows and Linux) and source: https://nebula.aitklabs.in
How it works
Nebula is a Stellarium plugin written in C++/Qt, copied from the HelloStelModule template. It adds a chat window and talks to any OpenAI-compatible endpoint(or Anthropic).
The key design choice: the model never touches Stellarium directly. I prompt it to reply only with JSON like this:
json
{"say": "Vega is about 25 light-years away.",
"actions": [{"type": "goto", "name": "Vega"},
{"type": "zoom", "fov": 20}]}
來源:DEV Community · dev.to