Skip to main content

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


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.5.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dracula_ai-0.3.5-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file dracula_ai-0.3.5.tar.gz.

File metadata

  • Download URL: dracula_ai-0.3.5.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for dracula_ai-0.3.5.tar.gz
Algorithm Hash digest
SHA256 e628752d4ff7783cb6cd7da0c081d8783320e3df19aeb990976fa167baaa1e14
MD5 c18ec7607cfcc2627910e6f041673c17
BLAKE2b-256 85bfd943b2387d52453ba3a844fa6efc46c26c24ea6afa6fdf85fb1a19433154

See more details on using hashes here.

File details

Details for the file dracula_ai-0.3.5-py3-none-any.whl.

File metadata

  • Download URL: dracula_ai-0.3.5-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for dracula_ai-0.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 7a17caa6320fa14de4820d853d131891d1b6516fe88a75965b1c3da4df16f3b6
MD5 a00d8d2a162caba49e064fc663182fa8
BLAKE2b-256 297eee7d8916c0ea79bddfc746d6a62c1e3271ea1afb56b354683252bbde5629

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page