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.4.tar.gz
(7.2 kB
view hashes)
Built Distribution
Close
Hashes for vm_x_ai_sdk-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a16b141e16a17a8e87819345d289d96e2a322e9110061caf17936487250c22ef |
|
MD5 | c799477832ccc1d75b54154ff77c854c |
|
BLAKE2b-256 | f5e88782528964220daa4d8f4d23ac1515cb21b1913be19caaa9f2c23f91bfa6 |