Skip to main content

Logseq Retriever

Python library for loading and retrieving Logseq documents.


Components

This section provides an overview of the components provided, listed by type

Retrievers

Retrievers inject context into a conversation. Works in tandem with a Contextualizer and Document Loader.

  • Input:
    • natural-language user-input, usually query-like
    • (optional) chat history
  • Output:
    • list of Documents to provide context for an LLM to answer the user-input

Implementations

  • LogseqJournalDateRangeRetriever
    • retrieve Logseq journal Documents, intended for queries that require context from a date range
    • required to set up:
      • RetrieverContextualizer
      • LogseqJournalLoader
    • examples:
      • "What did I do over Christmas break 2024?"
      • "How did I spend the last Independence Day?"

Contextualizers

Contextualizers serve as the bridge between natural-language input and a downstream component that handles fetching of relevant Documents.

  • Input:
    • natural-language user-input, usually query-like
    • (optional) chat history
  • Output:
    • structured downstream query, based on

In this library, an instance of RetrieverContextualizer is provided directly to Retrievers during the latter's instantiation. To set up the RetrieverContextualizer, provide RetrieverContextualizerProps, which includes:

  • llm - this is the backbone of the contextualizer
  • prompt - instructions provided to the LLM
  • output_schema - (optional) structured schema used to fetch relevant Documents
    • if no schema is provided, a string shall be returned instead
  • other flags and settings

Loaders

Loaders are one type of component that can fetch relevant Documents. Loaders are typically specific to a corresponding Retriever component.

  • Input:
    • each loader specifies its own schema
      • the Contextualizer is usually responsible for creating an instance of the query obj to act upon
  • Output:
    • list[Document]

Implementations

  • LogseqJournalFilesystemLoader
    • loads from the filesystem, where journal files are expected to be present at specified path

Scripts

PGVector

upload_journal

usage: python scripts/upload_journal_to_pgvector.py [-h] [-p PATH] from_date to_date

Metadata

Release files for logseq-retriever 0.6.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for logseq-retriever 0.6.1
File Size Uploaded Provenance Actions
logseq_retriever-0.6.1.tar.gz 11.3 kB Without provenance Details for logseq_retriever-0.6.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for logseq-retriever 0.6.1
File Interpreter ABI Platform Actions
logseq_retriever-0.6.1-py3-none-any.whl Python 3 none any Details for logseq_retriever-0.6.1-py3-none-any.whl

Total release size: 24.2 kB

Release files / logseq_retriever-0.6.1.tar.gz

Download URL logseq_retriever-0.6.1.tar.gz
Size 11.3 kB
Tags Source
SHA-256 checksum
How to use checksums
8b687925c1a688021e00f3c660c2f8bf16fdeb33f5f54d5e24c0f6a472d0b9ca
BLAKE2b-256 checksum
How to use checksums
f3384549b6d151b12ef2399a866941f7aa7819eb45aac360451269c86a63057d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / logseq_retriever-0.6.1-py3-none-any.whl

Download URL logseq_retriever-0.6.1-py3-none-any.whl
Size 12.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2df10e5645b455f579905da06cddd78a6ac6c53c818472dd00b4fb0790a086d1
BLAKE2b-256 checksum
How to use checksums
cfa4ffe4825b941fdb2f618ec7f9680218df61d6cb92319a6080f451b562caa3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for logseq-retriever 0.6.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page