chore: drop redundant model= in demos (IndexConfig default already applies)

This commit is contained in:
Ray 2026-07-19 07:09:24 +08:00
parent 7594338ccf
commit b6ce958735
3 changed files with 3 additions and 5 deletions

View file

@ -45,7 +45,6 @@ PDF_URL = "https://arxiv.org/pdf/2603.15031"
_EXAMPLES_DIR = Path(__file__).parent
PDF_PATH = _EXAMPLES_DIR / "documents" / "attention-residuals.pdf"
WORKSPACE = _EXAMPLES_DIR / "workspace"
MODEL = "gpt-4o-2024-11-20" # any LiteLLM-supported model
AGENT_SYSTEM_PROMPT = """
You are PageIndex, a document QA assistant.
@ -173,7 +172,7 @@ if __name__ == "__main__":
print("Download complete.\n")
# Setup: self-hosted local client + a collection
client = LocalClient(model=MODEL, storage_path=str(WORKSPACE))
client = LocalClient(storage_path=str(WORKSPACE))
col = client.collection("agentic-demo")
# Step 1: Index PDF and view tree structure

View file

@ -58,7 +58,7 @@ beta_md.write_text(
"potassium, supporting muscle function.\n"
)
client = PageIndexClient(model="gpt-4o-2024-11-20", storage_path=WORKSPACE)
client = PageIndexClient(storage_path=WORKSPACE)
async def stream_and_collect(coro_or_stream) -> list[str]:

View file

@ -22,7 +22,6 @@ _EXAMPLES_DIR = Path(__file__).parent
PDF_URL = "https://arxiv.org/pdf/2603.15031"
PDF_PATH = _EXAMPLES_DIR / "documents" / "attention-residuals.pdf"
WORKSPACE = _EXAMPLES_DIR / "workspace"
MODEL = "gpt-4o-2024-11-20" # any LiteLLM-supported model
# Download PDF if needed
if not PDF_PATH.exists():
@ -36,7 +35,7 @@ if not PDF_PATH.exists():
f.write(chunk)
print("Download complete.\n")
client = LocalClient(model=MODEL, storage_path=str(WORKSPACE))
client = LocalClient(storage_path=str(WORKSPACE))
col = client.collection()
doc_id = col.add(str(PDF_PATH))