feat: add PageIndex SDK with local/cloud dual-mode support (#207)

This commit is contained in:
Kylin 2026-04-06 22:51:04 +08:00 committed by GitHub
parent 8f1ed7783b
commit b63fd9779a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
45 changed files with 4225 additions and 274 deletions

View file

@ -0,0 +1,16 @@
from pageindex.backend.cloud import CloudBackend, API_BASE
def test_cloud_backend_init():
backend = CloudBackend(api_key="pi-test")
assert backend._api_key == "pi-test"
assert backend._headers["api_key"] == "pi-test"
def test_api_base_url():
assert "pageindex.ai" in API_BASE
def test_get_retrieve_model_is_none():
backend = CloudBackend(api_key="pi-test")
assert backend.get_agent_tools("col").function_tools == []