Zoe LLM / ClickHouse DB helpers
Project description
Craydel Database Wrapper
is a lightweight Python SDK for storing, retrieving, and managing student–counsellor chat data in ClickHouse. It also includes AI-powered conversation summarization to make student profiles easier to understand and hand over between advisors.
Installation
Use the package manager pip to install foobar.
pip install dspy==2.6.27
pip install python-dotenv==1.1.1
google-cloud-aiplatform==1.106.0
pip install clickhouse-connect
Usage
Insert and fetch chats
from craydel_zoe_llm import ChatService, ClickhouseHelper
from datetime import datetime
# Setup database helper + chat service
db = ClickhouseHelper()
chat = ChatService(db)
# Insert a new chat message
chat.insert_chat_message(
session_id="12345",
speaker="Student",
message="I want to study in Canada",
chat_details="Web",
message_id="msg_001",
created_at=datetime.utcnow(),
)
# Retrieve last messages in the session
last_messages = chat.get_last_messages(session_id="12345")
print("Last messages:", last_messages)
Summarize a conversation
from craydel_zoe_llm.services.chat_summarizer import StudentConversationProcessor
summarizer = StudentConversationProcessor()
# Run summarizer for a given session
summarizer.process("12345")
print("✅ Conversation summarized and saved to ClickHouse")
env
CLICKHOUSE_DATABASE=
CLICKHOUSE_HOST=
CLICKHOUSE_USER=
CLICKHOUSE_PASSWORD=
CLICKHOUSE_PORT=8123
GOOGLE_APPLICATION_CREDENTIALS=(google credential json)
VERTEX_MODEL=
VERTEX_PROJECT_ID=
VERTEX_LOCATION=
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
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 craydel_database_wrapper-0.0.1.tar.gz.
File metadata
- Download URL: craydel_database_wrapper-0.0.1.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
657bfd83dd1bddc3a57d48f136c3f145d455ae5196f7c6509980ddc48988cccf
|
|
| MD5 |
3811e91430aabb07b7e4ccc131d9516d
|
|
| BLAKE2b-256 |
bad91e5f0f44ac4322d0c992a04231b15a2de8db6d862530f84261d3e99a2d69
|
File details
Details for the file craydel_database_wrapper-0.0.1-py3-none-any.whl.
File metadata
- Download URL: craydel_database_wrapper-0.0.1-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e273ac9419d8214c3de5036db2c20dd16d65b54601b773cd87906405679d566
|
|
| MD5 |
9cd799ee93a635f564e8bcd987cfa2ca
|
|
| BLAKE2b-256 |
42ecc8140722869d9f7da0387483a593d0fdd99ccae406c11774c34cc4ba0087
|