Skip to main content

Tapsage Python Client

This Python client is designed to provide developers with a seamless integration into the Tapsage platform, enabling the efficient management and customization of generative AI-driven chatbots and image generation models.

Features

  • API Integration: Easy access to Tapsage's API endpoints for model selection, configuration, and management.
  • Model Customization: Tools to customize and fine-tune large language models (LLMs) for text and image generation according to specific requirements.
  • Monitoring: Capabilities to monitor the performance and quality of AI models, ensuring optimal functionality.
  • Simplified Deployment: Streamlined processes for transitioning from model development to production.

Installation

To install the Tapsage Python Client, run the following command:

pip install tapsage-client

Usage

Session

Here’s a quick example of how to use the client to interact with Tapsage:

import tapsage

# Initialize the client
tapbot = tapsage.TapSageBot(api_key=TAPSAGE_API_KEY, bot_id=TAPSAGE_BOT_ID)

# Initialize a session
session = tapbot.create_session()
message = tapbot.send_message(session, "Suggest me a list of 5 gifts for a 30 years boy who is tech-fan.")
print(message.content)
message2 = tapbot.send_message(session, "What if he is a book lover?")
print(message2.content)

# Delete a session
tapbot.delete_session(session)

Async

Here’s an example of async operation:

import tapsage

# Initialize the client
tapbot = tapsage.TapSageBot(api_key=TAPSAGE_API_KEY, bot_id=TAPSAGE_BOT_ID)

prompt = "Suggest me a list of 5 gifts for a 30 years boy who is tech-fan."
session = tapbot.create_session()
task = tapbot.send_message_async(session, prompt)

while True:
    task_result = tapbot.retrieve_async_task(session, task)
    if task_result.status == "FINISHED":
        break
    time.sleep(1)
print(task_result.message.content)
print()
tapbot.delete_session(session)

Stream

Here’s an example of stream usage:

import tapsage

# Initialize the client
tapbot = tapsage.TapSageBot(api_key=TAPSAGE_API_KEY, bot_id=TAPSAGE_BOT_ID)

prompt = "Suggest me a list of 5 gifts for a 30 years boy who is tech-fan."
stream = tapbot.stream_messages(
    session, prompt, split_criteria={"line": True}
)
for message in stream:
    print(message.message.content)
tapbot.delete_session(session)

Configuration

Before using the client, ensure you configure it with your API key:

tapbot = tapsage.TapSageBot(api_key=TAPSAGE_API_KEY, bot_id=TAPSAGE_BOT_ID)

Documentation

For more detailed information about the client's methods and additional functionalities, refer to the Tapsage Documentation.

Support

If you encounter any issues or have questions, please contact hello@tapsage.com.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for tapsage-client 0.10.2

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

Source distribution (sdist)

Source distribution for tapsage-client 0.10.2
File Size Uploaded
tapsage_client-0.10.2.tar.gz 17.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tapsage-client 0.10.2
File Interpreter ABI Platform
tapsage_client-0.10.2-py3-none-any.whl Python 3 none any Details

Total release size: 33.9 kB

Release files / tapsage_client-0.10.2.tar.gz

Download URL tapsage_client-0.10.2.tar.gz
Size 17.1 kB
Tags Source
SHA-256 checksum
How to use checksums
70fd7c1a7dc1388659a9cbfa6346980ea476ba0c14e1503f09d1d28c5d72e6bf
BLAKE2b-256 checksum
How to use checksums
1a80722bae5db351f6792a1e5be8ea559160a8a98feb18f94f31c626b77ff19e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.8

Release files / tapsage_client-0.10.2-py3-none-any.whl

Download URL tapsage_client-0.10.2-py3-none-any.whl
Size 16.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f5e6f767c6336a34ce501417fb4b840f6d5ba7bb0289010581d5c0eb534d914a
BLAKE2b-256 checksum
How to use checksums
a361c1c94f22d7a9fc0e77dbd9af0f06a08ab2c5c11786290203469a0f5962d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.8

Release history Release notifications | RSS feed

This release

0.10.2 This release

2 release files

0.10.1

2 release files

0.10.0

2 release files

0.9.0

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.4

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.6.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

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