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.2.tar.gz
(7.2 kB
view hashes)
Built Distribution
Close
Hashes for vm_x_ai_sdk-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9563a15596bee7ac7b98a9a39a638c760608ed4d39b6a3d618de5b331e33663e |
|
MD5 | 199aa8907f192d5bec72e6be08f562c1 |
|
BLAKE2b-256 | c19fe26308e38627535d1a72337e1d8f3d837f1608aa4e35b004623697e56ba4 |