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.3.tar.gz (4.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.3-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dracula_ai-0.3.3.tar.gz
  • Upload date:
  • Size: 4.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.3.tar.gz
Algorithm Hash digest
SHA256 cab698c3cd218810b4001da321c30605fa15cc2df4735f247c2394629b81bc43
MD5 077ceda7ffa847d12e227dd022459453
BLAKE2b-256 7a0ae967b89e61a31874de9ad7d8bdbec245a89d3c2a0e2c842e89a8c1caa0e5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dracula_ai-0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 5.4 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c3e50713194e7bbc2d4ed0121f1b8bbcc0689d2a6f4ea5077eb454332f879882
MD5 91b36c8ab3991d10d0ee383a5692603b
BLAKE2b-256 fbcf74414c27a2cbca25f8ba13cb7c4b73608dbc3ae1d6a91f4610d14e5601a4

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