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

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
File Size Uploaded Provenance Actions
logseq_retriever-0.6.tar.gz 11.3 kB Without provenance Details for logseq_retriever-0.6.tar.gz

Built distribution (wheel)

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

Total release size: 24.2 kB

Release files / logseq_retriever-0.6.tar.gz

Download URL logseq_retriever-0.6.tar.gz
Size 11.3 kB
Tags Source
SHA-256 checksum
How to use checksums
dcedd11b20a2a9a4cc0ade22d0e4c6b46e4785e8ef7958fac0279ee1fb3ea82e
BLAKE2b-256 checksum
How to use checksums
fc607619d10d31393b97dbabaa39c8c890b2ac179f69a712a201bb3d21c5c473
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-py3-none-any.whl

Download URL logseq_retriever-0.6-py3-none-any.whl
Size 12.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ccfb12a91f4b0965155a8f4022d0b6466e15197ad66e7ad2ef76081fc24c8969
BLAKE2b-256 checksum
How to use checksums
14698f5d4966870a670b0150329fa1a3a830042ee45693766b8f4d766571355c
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

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