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

Uploaded Python 3

File details

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

File metadata

  • Download URL: dracula_ai-0.3.4.tar.gz
  • Upload date:
  • Size: 4.7 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.4.tar.gz
Algorithm Hash digest
SHA256 93997bddc17dabc6608702d0cff1158f7bd51e43a9430d7b94a8bb2263a8e68d
MD5 c5aa52f8b4331843cecb453694610067
BLAKE2b-256 d56e3735e39aa9276f58294f6400cb63fbd82391c7397c2a1fc3331de474d7be

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dracula_ai-0.3.4-py3-none-any.whl
  • Upload date:
  • Size: 6.0 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a0fcfb4ccb375ed552bde0d771c45d915b0670fa1623dc4af800f111178f69f0
MD5 ca5803929d6f0c56bf309697acfe72de
BLAKE2b-256 08a0fcc900660732a584d1a66f0f525eaf815d7668814a8e63676625673ec5f5

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