VM-X Python SDK
Project description
VM-X SDK for Python
Description
VM-X AI SDK client for Python
Installation
pip install vm-x-ai-sdk
poetry add vm-x-ai-sdk
Usage
from vmxai import CompletionRequest, OpenAIRequest, RequestMessage, VMXClient, VMXClientOAuth
client = VMXClient(
workspace_id="ws-abc123",
environment_id="env-abv123",
domain="env-abc123.clnt.vm-x.ai",
auth=VMXClientOAuth(
client_id="clientId", client_secret="clientSecret"
),
)
result = client.completion(
CompletionRequest(
provider="openai",
resource="my-resource",
workload="my-workload",
messages=[RequestMessage(role="user", content="hey")],
functions=[],
openai=OpenAIRequest(model="gpt-3.5-turbo"),
),
stream=True,
)
for message in result:
print(message.message)
Change Log
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
vm_x_ai_sdk-0.1.1.tar.gz
(7.2 kB
view hashes)
Built Distribution
Close
Hashes for vm_x_ai_sdk-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73ff32a5b82ab86180a8cedfd2b70a32b8d06e9e66fb1e24e0d6c28580477247 |
|
MD5 | a9bc0522f8f4d8394db1cbc65cfe3d54 |
|
BLAKE2b-256 | 158125e3da0c062d9fad3d0ba428cedd34f13de35a29e144716f17ed6312ff56 |