Commit graph

11 commits

Author SHA1 Message Date
mountain
89132cb94c feat(cli): accept both bare flags and legacy yes/no for --if-add-* args
Resolves PR #272 review #10/P5. The --if-add-node-id / -node-summary /
-doc-description / -node-text args were store_true, which rejected the
documented yes/no values and left default-on options impossible to disable
from the CLI. They now use nargs='?' + const=True + a yes/no-coercing type:

  --if-add-node-id        -> on
  --if-add-node-id no     -> off   (legacy form still works)
  (omitted)               -> use the IndexConfig default

README updated to the flag usage (noting the legacy `no` off-switch), and
--if-add-node-text is now documented too.

Decisions from the review:
- #7 (api_key semantics): verified FALSE POSITIVE — 0.2.x is a cloud SDK whose
  api_key is a PageIndex cloud key (cloud_api.LegacyCloudAPI + docs.pageindex.ai/sdk),
  matching the new SDK. No change.
- #11 (if_add_doc_description default True): kept intentionally (open mode).

Claude-Session: https://claude.ai/code/session_01Kx5DgKbhK1N8autqXH8SmS
2026-07-08 19:11:52 +08:00
Kylin
c7fe93bb56 feat: add PageIndex SDK with local/cloud dual-mode support (#207) 2026-04-08 20:21:58 +08:00
Kylin
2403be8f27
Integrate LiteLLM for multi-provider LLM support (#168)
* Integrate litellm for multi-provider LLM support

* recover the default config yaml

* Use litellm.acompletion for native async support

* fix tob

* Rename llm_complete/allm_complete to llm_completion/llm_acompletion, remove unused llm_complete_stream

* Pin litellm to version 1.82.0

* resolve comments

* args from cli is used to overrides config.yaml

* Fix get_page_tokens hardcoded model default

Pass opt.model to get_page_tokens so tokenization respects the
configured model instead of always using gpt-4o-2024-11-20.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Remove explicit openai dependency from requirements.txt

openai is no longer directly imported; it comes in as a transitive
dependency of litellm. Pinning it explicitly risks version conflicts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Restore openai==1.101.0 pin in requirements.txt

litellm==1.82.0 and openai-agents have conflicting openai version
requirements, but openai==1.101.0 works at runtime for both.
The pin is necessary to prevent litellm from pulling in openai>=2.x
which would break openai-agents.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Remove explicit openai dependency from requirements.txt

openai is not directly used; it comes in as a transitive dependency
of litellm. No openai-agents in this branch so no pin needed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix an litellm error log

* resolve comments

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 18:47:07 +08:00
Ray
288a4376a1 add output path print 2025-09-02 20:22:17 +08:00
Ray
33ec9aca6e by default add node summary 2025-09-01 14:06:57 +08:00
Ray
4b4ae4d51d fix model 2025-08-28 13:07:15 +08:00
Ray
6d1b505541 fix params 2025-08-28 12:45:39 +08:00
Ray
3c770d833f fix default params 2025-08-27 22:34:04 +08:00
Ray
ad6a926fce add markdown runner 2025-08-26 21:27:40 +08:00
Ray
ad65e3f19c fix option for adding node text 2025-05-30 14:02:38 +08:00
Ray
403a7a4f54 Restructure and update CLI entry point to run_pageindex.py 2025-04-06 21:49:16 +08:00