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.0.tar.gz (3.8 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.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

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

Hashes for dracula_ai-0.3.0.tar.gz
Algorithm Hash digest
SHA256 5a00676fbcd500fca8aeabbbf80d452a3ba25327902f111dd9a88d0419cdf61d
MD5 6c0f37c836e4e66f86ce2bf3465092d2
BLAKE2b-256 01f9c421a71a0d5110e0956b142c67d1fd26fbe64a8519f0b441c929c2bf8936

See more details on using hashes here.

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

Hashes for dracula_ai-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8e8af94623af1cc5f3dee3f7d0a4ecceb75487d1791a097ec377461ad8683a50
MD5 b26cb3bed5eb7fb5a7a951bfb654a81e
BLAKE2b-256 22ced8a6a00e1be9d2858e5e9cd104f5d1df37e7f2abff0f1e1ca8fda3473267

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