OpenAI function calling tools for Sardis - Payment OS for AI Agents
Project description
sardis-openai
OpenAI function calling tools for Sardis - Payment OS for AI Agents.
Installation
pip install sardis-openai
Quick Start
from openai import OpenAI
from sardis_openai import get_sardis_tools, SardisToolHandler
client = OpenAI()
handler = SardisToolHandler(api_key="sk_sardis_...")
# Get Sardis tool definitions
tools = get_sardis_tools()
# Use with Chat Completions
response = client.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "Pay $25 to OpenAI for API credits"}],
tools=tools,
)
# Handle tool calls
for tool_call in response.choices[0].message.tool_calls:
result = await handler.handle(tool_call)
print(result)
Available Tools
| Tool | Description |
|---|---|
sardis_pay |
Execute payment with policy enforcement |
sardis_check_balance |
Check wallet balance and limits |
sardis_check_policy |
Dry-run policy validation |
sardis_issue_card |
Issue virtual card for agent |
sardis_get_spending_summary |
Get spending analytics |
All tools use strict mode to prevent hallucination.
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sardis_openai-1.0.0.tar.gz
(6.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sardis_openai-1.0.0.tar.gz.
File metadata
- Download URL: sardis_openai-1.0.0.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d702260c06cba50e24d87635a33c87e73b4557638fc0ff0f050b8e1ef240c02d
|
|
| MD5 |
76bfbfbbae98fdfa27eaedc98ad48a44
|
|
| BLAKE2b-256 |
0e4f9e3415f4640ed56c814af5dab94df30d2d1ea2cb523a6b21070efa1f4619
|
File details
Details for the file sardis_openai-1.0.0-py3-none-any.whl.
File metadata
- Download URL: sardis_openai-1.0.0-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b1fd8b57caaa732fd0e017be4c180c993fc4c37317a9aaa3fe21cc49ac020221
|
|
| MD5 |
4a1d8cb3b05cc81d9768f8e37abcd83b
|
|
| BLAKE2b-256 |
92236070b747680976097448e1ffbde3aa324856ee3862d4fc32fc9740e3bcfc
|