mirror of
https://github.com/VectifyAI/PageIndex.git
synced 2026-07-24 21:41:04 +02:00
chore: drop redundant model= in demos (IndexConfig default already applies)
This commit is contained in:
parent
7594338ccf
commit
b6ce958735
3 changed files with 3 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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]:
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue