Multimodal SDK for working with Yandex Cloud ML services
Project description
Yandex Cloud ML SDK
This Python library provides a simple and efficient SDK for interacting with Yandex Cloud Machine Learning services. It abstracts the complexities of the raw GRPC calls, allowing developers to integrate cloud functionalities seamlessly into their applications.
Features
- Easy-to-use interface for accessing the Yandex Cloud ML services
- Automatic handling of authentication
- Error handling and data validation for robust integration
- Support for asynchronous operations
Installation
You can install the library via pip:
pip install yandex-cloud-ml-sdk
Usage
Here's a basic example of how to use the SDK:
from yandex_cloud_ml_sdk import YCloudML
sdk = YCloudML(folder_id="...", auth="<APIKey/IAMToken/SomethingElse>")
model = sdk.models.completions('yandexgpt')
model = model.configure(temperature=0.5)
result = model.run("foo")
for alternative in result:
print(alternative)
For more usage examples look into examples folder.
Langchain integration
from yandex_cloud_ml_sdk import YCloudML
from langchain_core.messages import AIMessage, HumanMessage
sdk = YCloudML(folder_id="...", auth="<APIKey/IAMToken/SomethingElse>")
model = sdk.models.completions('yandexgpt').langchain()
langchain_result = model.invoke([
HumanMessage(content="hello!"),
AIMessage(content="Hi there human!"),
HumanMessage(content="Meow!"),
])
For more langchain integration examples look into examples/langchain folder.
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
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 yandex_cloud_ml_sdk-0.1.1.tar.gz.
File metadata
- Download URL: yandex_cloud_ml_sdk-0.1.1.tar.gz
- Upload date:
- Size: 55.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.32.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
338903c6993e57eb6c36649c9535adb854cfc8d60f97b18d933c45a733305a02
|
|
| MD5 |
11051a409f7dd4f3581b353368ee3745
|
|
| BLAKE2b-256 |
72b6cd4716105d5d7735482f18fbfd4a868652e2a8c280d065a019f4828f012d
|
File details
Details for the file yandex_cloud_ml_sdk-0.1.1-py3-none-any.whl.
File metadata
- Download URL: yandex_cloud_ml_sdk-0.1.1-py3-none-any.whl
- Upload date:
- Size: 41.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.32.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ebb3e10cc46e321fc56c83bc2e02fdc5b437b07cb04fbb58dd2b146cf3c63f2
|
|
| MD5 |
9c89ac37e9916f5ec2a2fe60c35d10bf
|
|
| BLAKE2b-256 |
e18bcf941b116825c6916bce440768b3278a0a1aabedc874b473ef571118ac2c
|