O-Lang Chatbot Resolver Pack — memory, intent, tone and LLM resolvers
Project description
olang-chatbot-resolvers
O-Lang Chatbot Resolver Pack — memory, intent, tone and LLM resolvers.
Install
pip install olang-chatbot-resolvers
Start
export GROQ_API_KEY=your_key_here
olang-chatbot-resolvers
# ✅ Running at http://localhost:8000
# ✅ Memory: sqlite (zero config)
Upgrade to Postgres in production
pip install olang-chatbot-resolvers[postgres]
export DATABASE_URL=postgresql://user:pass@host/db
olang-chatbot-resolvers
# ✅ Memory: postgres
Resolvers
| Resolver | Action | Input | Output |
|---|---|---|---|
| Memory read | memory_read |
session_id, last_n_turns |
history |
| Memory write | memory_write |
session_id, role, content |
turn_index |
| Intent classifier | intent_classifier |
message, allowed_topics |
intent, topic, is_allowed, confidence |
| Tone analyzer | tone_analyzer |
text, required_tone |
score, violations |
| LLM chat | llm_chat |
system_prompt, history, user_message |
reply, token_usage, model |
Use in your .ol workflow
tools:
- name: memory_read
protocol: http
url: http://localhost:8000
- name: memory_write
protocol: http
url: http://localhost:8000
- name: intent_classifier
protocol: http
url: http://localhost:8000
- name: tone_analyzer
protocol: http
url: http://localhost:8000
- name: llm_chat
protocol: http
url: http://localhost:8000
Environment variables
# Required
GROQ_API_KEY=your_groq_key
# Optional — production storage
DATABASE_URL=postgresql://user:pass@host/db
# Optional — custom SQLite path (dev)
SQLITE_PATH=./my_memory.db
# Optional — server config
RESOLVER_HOST=0.0.0.0
RESOLVER_PORT=8000
# Optional — model overrides
LLM_CHAT_MODEL=llama-3.3-70b-versatile
LLM_CHAT_MAX_TOKENS=1024
INTENT_MODEL=llama-3.1-8b-instant
TONE_MODEL=llama-3.1-8b-instant
LLM models
| Constant | Model | Best for |
|---|---|---|
FAST |
llama-3.1-8b-instant |
Classification, short answers |
SMART |
llama-3.3-70b-versatile |
RAG, chatbots, document reasoning |
MIXTRAL |
mixtral-8x7b-32768 |
Complex synthesis, large context |
Default for llm_chat: llama-3.3-70b-versatile
Running tests
pip install olang-chatbot-resolvers[dev]
pytest tests/ -v
# No API key or database required
Contact
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 olang_chatbot_resolvers-1.0.0.tar.gz.
File metadata
- Download URL: olang_chatbot_resolvers-1.0.0.tar.gz
- Upload date:
- Size: 15.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c3f2111d77d5b6402b47f6024c03cc1c085e59f6ddcad9b92fc17ddf827eaa3
|
|
| MD5 |
bb0bc59258d02cfe417e9bc83742ecd2
|
|
| BLAKE2b-256 |
e84147dad316a907bd8ccea755b3c907b2b996b83ba62de9116b0bc44d9af3e2
|
File details
Details for the file olang_chatbot_resolvers-1.0.0-py3-none-any.whl.
File metadata
- Download URL: olang_chatbot_resolvers-1.0.0-py3-none-any.whl
- Upload date:
- Size: 14.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5257334a439fbc8db02a694710d2eb0d82b9212ee90f60e2be3fd988fd46907c
|
|
| MD5 |
2a2b2b39f1f6ed974088b21209ea916b
|
|
| BLAKE2b-256 |
4c073306d8255342369926fd3b6c84d98b6c6994e5b38af62064c48097fb4470
|