Skip to main content

CoCoHub SDK to use components in python code

https://www.conversationalcomponents.com

asciicast

Installation

pip install coco-sdk

With async support

pip install coco-sdk[async]

Usage

import coco
import uuid

session_id = str(uuid.uuid4()) # generate a random session id

# directly calling exchange:
response = coco.exchange("namer_vp3", session_id, user_input="hello") # namer_vp3 is CoCoHub component

# using ConversationalComponent API
comp = coco.ConversationalComponent("namer_vp3")
response = comp(session_id, "hello")

# using ComponentSession API
session_with_component = coco.ComponentSession("namer_vp3") 
response = session_with_component("hello")

Async

import coco.async_api as coco

# directly calling exchange:
response = await coco.exchange("namer_vp3", session_id, user_input="hello") # namer_vp3 is CoCoHub component

# using ConversationalComponent API
comp = coco.ConversationalComponent("namer_vp3")
response = await comp(session_id, "hello")

# using ComponentSession API
session_with_component = coco.ComponentSession("namer_vp3") 
response = await session_with_component("hello")

Metadata

Release files for coco-sdk 0.1.13

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

Source distribution (sdist)

Source distribution for coco-sdk 0.1.13
File Size Uploaded Provenance Actions
coco-sdk-0.1.13.tar.gz 8.0 kB Without provenance Details for coco-sdk-0.1.13.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for coco-sdk 0.1.13
File Interpreter ABI Platform Actions
coco_sdk-0.1.13-py3-none-any.whl Python 3 none any Details for coco_sdk-0.1.13-py3-none-any.whl

Total release size: 18.0 kB

Release files / coco-sdk-0.1.13.tar.gz

Download URL coco-sdk-0.1.13.tar.gz
Size 8.0 kB
Tags Source
SHA-256 checksum
How to use checksums
1333858d113655ec87dcf3323454de0ad5dcf2699d315db72fefe0c7fa2bd597
BLAKE2b-256 checksum
How to use checksums
ab0d20bdd98866c4585f83f8bdea2b65f133b38370bfba85c0c4c8cf336c3f34
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

Release files / coco_sdk-0.1.13-py3-none-any.whl

Download URL coco_sdk-0.1.13-py3-none-any.whl
Size 10.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c0c6ee05fd1ce4617438f816cfde31894c3ff8140b28cd7e5305966f7f914386
BLAKE2b-256 checksum
How to use checksums
1d0b90a7a4522017d3f800dd2040cc02293a81afded0c00e0ae78d4e451ef90c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

Security for coco-sdk 0.1.13

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