Skip to main content

CoffeeHouse API Wrapper for Python

This is a very simple API Wrapper for the CoffeeHouse API. Using This Library only supports the V1IVA2.0 CoffeeHouse API which is based from this Documentation

Installation

pip install coffeehouse

or

python setup.py build
python setup.py install

Lydia Example

from coffeehouse.lydia import LydiaAI

# Create the CoffeeHouse API instance
api_key = input("API Key: ")

# Create Lydia instance
lydia = LydiaAI(api_key)

# Create a new chat session (Like a conversation)
session = lydia.create_session()
print("Session ID: {0}".format(session.id))
print("Session Available: {0}".format(str(session.available)))
print("Session Language: {0}".format(str(session.language)))
print("Session Expires: {0}".format(str(session.expires)))

# Talk to the bot!
while True:
    output = session.think_thought(input("Input: "))
    print("Output: {0}".format(output))

# In the case you want to save the Session ID to reuse the session
# Use lydia to invoke think_thought instead, for example;
#
# while(True):
#     output = lydia.think_thought(session.id, input("Input: "))
#     print("Output: {0}".format(output))
#
# This is the same effect as above but uses the lydia instance directly.

Metadata

Release files for coffeehouse 2.2.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for coffeehouse 2.2.6
File Size Uploaded Provenance Actions
coffeehouse-2.2.6.tar.gz 4.6 kB Without provenance Details for coffeehouse-2.2.6.tar.gz

Release files / coffeehouse-2.2.6.tar.gz

Download URL coffeehouse-2.2.6.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
0ca94a060fc2b8695706f2468774058bc4e2562a2d193fb75bd359822310d10e
BLAKE2b-256 checksum
How to use checksums
506b397f7d834280ef665f688c934ac913547fd91696fede6ed2f4b73c23d951
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.6.9

Security for coffeehouse 2.2.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page