A simple Python library for Google Gemini with memory support.
Project description
Dracula 🧛
A simple Python library for Google Gemini with conversation memory.
Installation
pip install dracula-ai
Usage
from dracula import Dracula
ai = Dracula(
api_key="your-api-key",
prompt="You are a helpful assistant.",
temperature=1.0,
max_output_tokens=1024,
max_messages=10,
stats_filepath="dracula_stats.json",
)
Chat
response = ai.chat("Hello, who are you?")
print(response)
Change prompt anytime
ai.set_prompt("You are a pirate.")
Change temperature anytime
ai.set_temperature(0.5)
Get stats
ai.get_stats()
Reset stats
ai.reset_stats()
Save and load conversation history
ai.save_history("conversation.json")
ai.load_history("conversation.json")
Clear memory
ai.clear_memory()
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
dracula_ai-0.3.1.tar.gz
(3.9 kB
view details)
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 dracula_ai-0.3.1.tar.gz.
File metadata
- Download URL: dracula_ai-0.3.1.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1dc003e7c6b59d5a3203fdb4674b41b2d3f245aa0210f13b85901dbb4b8bc212
|
|
| MD5 |
ac29080ee377a7f317c9a2df73b24fb1
|
|
| BLAKE2b-256 |
5f34150152827ce3f0355db77ea49193eeb204bcdfa34eb5efb0517f3d6ce90d
|
File details
Details for the file dracula_ai-0.3.1-py3-none-any.whl.
File metadata
- Download URL: dracula_ai-0.3.1-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
279fccb5e5b702d1befaef0a7fc8e5314c227e7455c440963d1c03edd1af4663
|
|
| MD5 |
d74d10d5e521e48b97f91294b0d92f95
|
|
| BLAKE2b-256 |
7d066185b8640d51f4fc676ef8c05b4c29f9a834facc9bd156a0445c6678d5ff
|