Skip to main content

Opper Python client

Project description

Opper Python SDK

Install

pip install opperai

Functions

To call a function you created at https://platform.opper.ai you can use the following code:

from opperai import Client
from opperai.types import ChatPayload, Message

# Use AsyncClient for async operations
client = Client(api_key="your-api-key") 
response = client.functions.chat("your-function-path", 
 ChatPayload(messages=[Message(role="user", content="hello")])
)

print(response)

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

opperai-0.0.5.tar.gz (3.6 kB view hashes)

Uploaded Source

Built Distribution

opperai-0.0.5-py2.py3-none-any.whl (3.2 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page