Skip to main content

LangChain & LangGraph extensions that parse LLM prompts into Timbr semantic SQL and execute them.

Project description

Timbr logo description

FOSSA Status FOSSA Status

Python 3.10 Python 3.11 Python 3.12

Timbr LangChain LLM SDK

Timbr LangChain LLM SDK is a Python SDK that extends LangChain and LangGraph with custom agents, chains, and nodes for seamless integration with the Timbr semantic layer. It enables converting natural language prompts into optimized semantic-SQL queries and executing them directly against your data.

Timbr LangGraph pipeline

Dependencies

  • Access to a timbr-server
  • Python 3.10 or newer

Installation

Using pip

python -m pip install langchain-timbr

Install with selected LLM providers

One of: openai, anthropic, google, azure_openai, snowflake, databricks, vertex_ai, bedrock (or 'all')

python -m pip install 'langchain-timbr[<your selected providers, separated by comma w/o space>]'

Using pip from github

pip install git+https://github.com/WPSemantix/langchain-timbr

Documentation

For comprehensive documentation and usage examples, please visit:

Configuration

The SDK uses environment variables for configuration. All configurations are optional - when set, they serve as default values for langchain-timbr provided tools. Below are all available configuration options:

Configuration Options

Timbr Connection Settings

  • TIMBR_URL - The URL of your Timbr server
  • TIMBR_TOKEN - Authentication token for accessing the Timbr server
  • TIMBR_ONTOLOGY - The ontology to use (also accepts ONTOLOGY as an alias)
  • IS_JWT - Whether the token is a JWT token (true/false)
  • JWT_TENANT_ID - Tenant ID for JWT authentication

Cache and Data Processing

  • CACHE_TIMEOUT - Timeout for caching operations in seconds
  • IGNORE_TAGS - Comma-separated list of tags to ignore during processing
  • IGNORE_TAGS_PREFIX - Comma-separated list of tag prefixes to ignore during processing

LLM Configuration

  • LLM_TYPE - The type of LLM provider to use
  • LLM_MODEL - The specific model to use with the LLM provider
  • LLM_API_KEY - API key or client secret for the LLM provider
  • LLM_TEMPERATURE - Temperature setting for LLM responses (controls randomness)
  • LLM_ADDITIONAL_PARAMS - Additional parameters to pass to the LLM
  • LLM_TIMEOUT - Timeout for LLM requests in seconds
  • LLM_TENANT_ID - LLM provider tenant/directory ID (Used for Service Principal authentication)
  • LLM_CLIENT_ID - LLM provider client ID (Used for Service Principal authentication)
  • LLM_CLIENT_SECRET - LLM provider client secret (Used for Service Principal authentication)
  • LLM_ENDPOINT - LLM provider OpenAI endpoint URL
  • LLM_API_VERSION - LLM provider API version
  • LLM_SCOPE - LLM provider authentication scope

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

langchain_timbr-3.3.0.tar.gz (87.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

langchain_timbr-3.3.0-py3-none-any.whl (80.6 kB view details)

Uploaded Python 3

File details

Details for the file langchain_timbr-3.3.0.tar.gz.

File metadata

  • Download URL: langchain_timbr-3.3.0.tar.gz
  • Upload date:
  • Size: 87.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for langchain_timbr-3.3.0.tar.gz
Algorithm Hash digest
SHA256 6a359cafe2c2e4f5b0866be8d02ec56b423a5b607139187bfc0ab9c590caddc4
MD5 ce2f71fdc25935a0d7bc5eb50a97a35a
BLAKE2b-256 20f38fcf7f13b8c232a3bb06c4272b03cf2a666694136335db0c52c2abae3e10

See more details on using hashes here.

File details

Details for the file langchain_timbr-3.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for langchain_timbr-3.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 28e2a083e15aa5ac3d1bf10ff87872fc226ddb161b81fc96ab98b4b170bcab94
MD5 ecf41e9a56c20175c78084856fc04d0f
BLAKE2b-256 1f96770ee9c100f6945e21e9850c93b4aac4d5da3e832a0d2a0b1e31e60789f9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page