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.5.tar.gz
(7.2 kB
view hashes)
Built Distribution
Close
Hashes for vm_x_ai_sdk-0.1.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea91a715242c6f56111194bcfc632942776d4f884145c42ce94cb1eed48aedfe |
|
MD5 | 97ab199ca1d0a1e710c5a2769c5baa68 |
|
BLAKE2b-256 | b17728b0475a6c0bc1ae69720f57ccb2e6bc61dc47e6da96ddbc5f663eb2dc2f |