call-center
from call_center import Agent
user = "pmeier"
agent = Agent(system_prompt=f"The current user is {user}")
@agent.register
def get_products(user: str):
"""Get the available products for the user
:param user: User to get products for.
"""
return [f"Product{idx}" for idx in {"pmeier": [3, 5, 7, 14]}.get(user, [])]
print(agent.answer("What products are available for me?"))
print(get_products(user))
The available products for you are: Product3, Product5, Product7, and Product14.
['Product3', 'Product5', 'Product7', 'Product14']
@agent.register
def rank_products(products: list[str]):
"""Rank products by revenue.
:param products: List of products to rank.
"""
return sorted(products)
async def answer(prompt):
async for chunk in agent.aanswer_stream(prompt):
print(chunk, end="")
print()
import asyncio
asyncio.run(answer("What are the top three products?"))
print(rank_products(get_products(user))[:3])
The top three products are:
1. Product14
2. Product3
3. Product5
['Product14', 'Product3', 'Product5']
Metadata
Release files for call-center 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| call-center-0.1.0.tar.gz | 7.7 kB | Without provenance | Details for call-center-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| call_center-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for call_center-0.1.0-py3-none-any.whl |
Total release size: 14.3 kB
Release files / call-center-0.1.0.tar.gz
| Download URL | call-center-0.1.0.tar.gz |
|---|---|
| Size | 7.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
395bc82ac5483b4dc4d0d48b370408633bf0a6bdc706dcd152e15c5f8d3a95b2
|
|
BLAKE2b-256 checksum How to use checksums |
8079a8a336a1c3573fc28ecb6e905ecc6acb16cf59e73bbe9c47b7fc4874a8c8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.18
|
Release files / call_center-0.1.0-py3-none-any.whl
| Download URL | call_center-0.1.0-py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a7eb7b058a5d99a2bf592c23a7bce08f2427483b803e17fd5ce504503e308767
|
|
BLAKE2b-256 checksum How to use checksums |
c8df84bbe4b805cfc247f4362251400282a0fe38eefe6c115640c813b15cc25b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.18
|
Security for call-center 0.1.0
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.