Skip to main content

Partner Simulator

Project description

A very basic chatbot based on openAI to console lonely engineering students... not me though, my girlfriend is wonderful :)

I used the openai API to generate responses. I used Polars to store and manipulate json files so the chatbot has memory of previous responses within the same session.

Install it using pip:

pip install partnersimulator

Set up as:

import partnersimulator as ps

#affection levels are /100
aishwarya = ps.partner(name='aishwarya rai', age=51, gender='female', mood='patient, kind, caring', affection=100)

while True:
    message = input('Talk to me (say "quit" to exit): ')
    if message.lower() in ['quit', 'exit']:
        break
    print(aiswarya.send_message(message))

Some notes:

You can really put anything you want for aishwarya.mood

Aishwarya Rai is a famous Indian actress. The use of her name is completely arbitrary.

When you run the code block above it will automatically generate a .json file with all the messages of the session included. If you change the name or age of your partner a new record is kept.

I hope this is as fun for you to play with as it was for me to build :)

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

partnersimulator-0.0.2.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

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

partnersimulator-0.0.2-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file partnersimulator-0.0.2.tar.gz.

File metadata

  • Download URL: partnersimulator-0.0.2.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for partnersimulator-0.0.2.tar.gz
Algorithm Hash digest
SHA256 a2e068dbd18a888f72e28aefd0b120ef7770783c32fa5ee3549113bf2b4a125c
MD5 724a781648bd4825fccc8fc71de98f0b
BLAKE2b-256 d2f0a24d03d5104e876e159a5517bcb843a0fb6a210ca1442150b41dcee7df62

See more details on using hashes here.

File details

Details for the file partnersimulator-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for partnersimulator-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 048e02886fb52b2b41b7765a3044f6c179e15fc3ce5458f6423fc326b67d6ade
MD5 33fcfcf3c455f7bec367d1c5f5cc484f
BLAKE2b-256 203e7ee9f87d6b5e6b3a788d7145c7683c9cb318c41f95bb1c672dea1319b6b0

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