Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yandex_cloud_ml_sdk-0.1.1.tar.gz (55.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yandex_cloud_ml_sdk-0.1.1-py3-none-any.whl (41.9 kB view details)

Uploaded Python 3

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

Hashes for yandex_cloud_ml_sdk-0.1.1.tar.gz
Algorithm Hash digest
SHA256 338903c6993e57eb6c36649c9535adb854cfc8d60f97b18d933c45a733305a02
MD5 11051a409f7dd4f3581b353368ee3745
BLAKE2b-256 72b6cd4716105d5d7735482f18fbfd4a868652e2a8c280d065a019f4828f012d

See more details on using hashes here.

File details

Details for the file yandex_cloud_ml_sdk-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for yandex_cloud_ml_sdk-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6ebb3e10cc46e321fc56c83bc2e02fdc5b437b07cb04fbb58dd2b146cf3c63f2
MD5 9c89ac37e9916f5ec2a2fe60c35d10bf
BLAKE2b-256 e18bcf941b116825c6916bce440768b3278a0a1aabedc874b473ef571118ac2c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page