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.2.tar.gz (3.9 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.2-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dracula_ai-0.3.2.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

Hashes for dracula_ai-0.3.2.tar.gz
Algorithm Hash digest
SHA256 93b947361f0d9d065c505c452206e5c5ecf99458c101aab306e32aebd0494688
MD5 f5934cdcce46e94b5fb69a221e9ed259
BLAKE2b-256 504e55d7aa12cbf0f9471bd85a514bcdf506979ddbfaf9d6088a2573243f84be

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dracula_ai-0.3.2-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

Hashes for dracula_ai-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4924ec0cc14300d4f0a03dff8dd9f6b49ec262f3c712a9b9d95eeab72f723180
MD5 a420567b9682ad8d0830a79837ea7715
BLAKE2b-256 15a401d369684b2cd8295fd3834f99ce6fb1f88a6dfdbf1a89156ec05bef335e

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