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.0.tar.gz
(3.8 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.0.tar.gz.
File metadata
- Download URL: dracula_ai-0.3.0.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a00676fbcd500fca8aeabbbf80d452a3ba25327902f111dd9a88d0419cdf61d
|
|
| MD5 |
6c0f37c836e4e66f86ce2bf3465092d2
|
|
| BLAKE2b-256 |
01f9c421a71a0d5110e0956b142c67d1fd26fbe64a8519f0b441c929c2bf8936
|
File details
Details for the file dracula_ai-0.3.0-py3-none-any.whl.
File metadata
- Download URL: dracula_ai-0.3.0-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.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8e8af94623af1cc5f3dee3f7d0a4ecceb75487d1791a097ec377461ad8683a50
|
|
| MD5 |
b26cb3bed5eb7fb5a7a951bfb654a81e
|
|
| BLAKE2b-256 |
22ced8a6a00e1be9d2858e5e9cd104f5d1df37e7f2abff0f1e1ca8fda3473267
|