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
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_keyparameter orLLM7_API_KEYenvironment 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file schedule_llm_query-2025.12.20185642.tar.gz.
File metadata
- Download URL: schedule_llm_query-2025.12.20185642.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b8d6ecbc86a0e14e54d174c0a949224dc9249315dff76d0452eb32504a390d64
|
|
| MD5 |
944a0d90bbbec675036e06328ea9ee83
|
|
| BLAKE2b-256 |
924b55b95c8146e2a200987011028e2c4c241bb1157cdac23a5e81a8519967e4
|
File details
Details for the file schedule_llm_query-2025.12.20185642-py3-none-any.whl.
File metadata
- Download URL: schedule_llm_query-2025.12.20185642-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
01109187b5bd21bbadc95be7ca2d29c0c9d834d0c3068e90f353fcfbbb33364b
|
|
| MD5 |
f199c4d0c35a781e02c9808cfa91ccb9
|
|
| BLAKE2b-256 |
324aea5cb3340a60e1ccaca6ce688e14d22a7aa4fc3dcdec8459fb4cd90c1ec0
|