Skip to main content

A new package that processes user queries about event schedules, such as FOSDEM 2026, and returns structured information like session times, locations, and descriptions. It uses an LLM to interpret na

Project description

schedule-llm-query

PyPI version License: MIT Downloads LinkedIn

A Python package for processing natural language queries about event schedules (e.g., FOSDEM 2026) and extracting structured information like session times, locations, and descriptions using an LLM.


📌 Overview

This package interprets user queries (e.g., "What talks are on Sunday afternoon?") and extracts structured schedule data using pattern matching. The LLM is guided by a system prompt to format responses in a predefined structure, ensuring consistent and reliable output for applications.


🚀 Installation

pip install schedule-llm-query

🔧 Usage

Basic Usage (Default LLM: ChatLLM7)

from schedule_llm_query import schedule_llm_query

response = schedule_llm_query(
    user_input="What talks are on Sunday afternoon?",
    api_key="your_llm7_api_key"  # Optional (falls back to env var LLM7_API_KEY)
)
print(response)

Custom LLM Integration

You can replace the default ChatLLM7 with any LangChain-compatible LLM (e.g., OpenAI, Anthropic, Google).

Example: Using OpenAI

from langchain_openai import ChatOpenAI
from schedule_llm_query import schedule_llm_query

llm = ChatOpenAI()
response = schedule_llm_query(
    user_input="Show me all Python talks on Saturday",
    llm=llm
)
print(response)

Example: Using Anthropic

from langchain_anthropic import ChatAnthropic
from schedule_llm_query import schedule_llm_query

llm = ChatAnthropic()
response = schedule_llm_query(
    user_input="List all keynote sessions",
    llm=llm
)
print(response)

Example: Using Google Generative AI

from langchain_google_genai import ChatGoogleGenerativeAI
from schedule_llm_query import schedule_llm_query

llm = ChatGoogleGenerativeAI()
response = schedule_llm_query(
    user_input="What are the talks at Hall 1?",
    llm=llm
)
print(response)

🔑 API Key

  • Default LLM: Uses ChatLLM7 (from langchain_llm7).
  • Free Tier: Sufficient for most use cases (rate limits apply).
  • Custom Key: Pass via api_key parameter or LLM7_API_KEY environment variable.
    schedule_llm_query(user_input="...", api_key="your_api_key")
    
  • Get a Key: Register at llm7.io.

📝 Parameters

Parameter Type Description
user_input str The natural language query to process (e.g., "What talks are on Sunday?").
api_key Optional[str] LLM7 API key (optional if using env var or custom LLM).
llm Optional[BaseChatModel] Custom LangChain LLM (e.g., ChatOpenAI). Falls back to ChatLLM7 if None.

🔄 Output Structure

The package returns structured data matching the regex pattern:

[
  {
    "title": "Talk Title",
    "time": "14:00-15:30",
    "location": "Hall 2",
    "description": "Brief description..."
  }
]

📦 Dependencies

  • langchain-core (for LLM integration)
  • langchain_llm7 (default LLM, optional for custom LLM)
  • llmatch (for pattern extraction)

📜 License

MIT


📢 Support & Issues

For bugs/feature requests, open an issue on GitHub.


👤 Author

Eugene Evstafev 📧 hi@euegne.plus 🔗 LinkedIn


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

schedule_llm_query-2025.12.20185642.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

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

schedule_llm_query-2025.12.20185642-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file schedule_llm_query-2025.12.20185642.tar.gz.

File metadata

File hashes

Hashes for schedule_llm_query-2025.12.20185642.tar.gz
Algorithm Hash digest
SHA256 b8d6ecbc86a0e14e54d174c0a949224dc9249315dff76d0452eb32504a390d64
MD5 944a0d90bbbec675036e06328ea9ee83
BLAKE2b-256 924b55b95c8146e2a200987011028e2c4c241bb1157cdac23a5e81a8519967e4

See more details on using hashes here.

File details

Details for the file schedule_llm_query-2025.12.20185642-py3-none-any.whl.

File metadata

File hashes

Hashes for schedule_llm_query-2025.12.20185642-py3-none-any.whl
Algorithm Hash digest
SHA256 01109187b5bd21bbadc95be7ca2d29c0c9d834d0c3068e90f353fcfbbb33364b
MD5 f199c4d0c35a781e02c9808cfa91ccb9
BLAKE2b-256 324aea5cb3340a60e1ccaca6ce688e14d22a7aa4fc3dcdec8459fb4cd90c1ec0

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