Skip to main content

Langchain Logseq

Collection of Langchain utilities for working with Logseq files.


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 langchain-logseq 0.3.2

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

Source distribution (sdist)

Source distribution for langchain-logseq 0.3.2
File Size Uploaded Provenance Actions
langchain_logseq-0.3.2.tar.gz 13.6 kB Without provenance Details for langchain_logseq-0.3.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for langchain-logseq 0.3.2
File Interpreter ABI Platform Actions
langchain_logseq-0.3.2-py3-none-any.whl Python 3 none any Details for langchain_logseq-0.3.2-py3-none-any.whl

Total release size: 31.2 kB

Release files / langchain_logseq-0.3.2.tar.gz

Download URL langchain_logseq-0.3.2.tar.gz
Size 13.6 kB
Tags Source
SHA-256 checksum
How to use checksums
bb739af15a6370bdc0f56a2d121dbb48a83e81f51f0911ba092d7faa8d20423f
BLAKE2b-256 checksum
How to use checksums
5657adcb81c7645b51739492a587ab91c21aa947d6e879f93fd55d2327d5fa2c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.10

Release files / langchain_logseq-0.3.2-py3-none-any.whl

Download URL langchain_logseq-0.3.2-py3-none-any.whl
Size 17.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
543c7392bd57535218ac495c2185ec28224fea24758f2f5f5df7aacd0fb0848a
BLAKE2b-256 checksum
How to use checksums
daed7947a7eed3e5a478ce0cd9a7d9baad991b45d28b8c9952508acf45278d2e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.10

Security for langchain-logseq 0.3.2

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