| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 3 个月前 | ||
| 3 个月前 | ||
| 3 个月前 | ||
| 2 天前 | ||
| 3 个月前 | ||
| 3 个月前 | ||
| 3 个月前 | ||
| 2 天前 |
Open Library x Omi
Search books, fetch metadata, and browse subject recommendations from Omi conversations.
This is a standalone no-auth Omi app backed by the public Open Library APIs. It does not require environment variables, OAuth, or an Open Library API key.
Tools
search_books: search books by free-form query, optional author, and optional subject.get_book_details: fetch work metadata by Open Library work ID or edition metadata by ISBN.search_subject: browse notable books for a subject such as fantasy, economics, or machine learning.
Local Development
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
uvicorn main:app --reload --port 8080
Health check:
curl http://localhost:8080/health
Tool manifest:
curl http://localhost:8080/.well-known/omi-tools.json
Search books:
curl -X POST http://localhost:8080/tools/search_books \
-H "Content-Type: application/json" \
-d '{"query":"The Left Hand of Darkness", "limit":3}'
Fetch work details:
curl -X POST http://localhost:8080/tools/get_book_details \
-H "Content-Type: application/json" \
-d '{"work_id":"OL59895W"}'
Browse a subject:
curl -X POST http://localhost:8080/tools/search_subject \
-H "Content-Type: application/json" \
-d '{"subject":"science fiction", "limit":5}'
Deployment
The app is ready for Railway or Heroku-style deployment:
Procfilestarts uvicorn on$PORTrailway.tomldefines the same start command and/healthcheckruntime.txtpins Python 3.11
Notes
Open Library is a public community catalog. Metadata completeness varies by work and edition, so some fields may be missing for less common books.