Skip to main content

An integration package connecting GigaChat and LangChain

Project description

langchain-gigachat

This is a library integration with GigaChat.

Installation

pip install -U langchain-gigachat

Quickstart

Follow these simple steps to get up and running quickly.

Installation

To install the package use following command:

pip install -U langchain-gigachat

Initialization

To initialize chat model:

from langchain_gigachat.chat_models import GigaChat

giga = GigaChat(credentials="YOUR_AUTHORIZATION_KEY", verify_ssl_certs=False)

To initialize embeddings:

from langchain_gigachat.embeddings import GigaChatEmbeddings

embedding = GigaChatEmbeddings(
    credentials="YOUR_AUTHORIZATION_KEY",
    verify_ssl_certs=False
)

Usage

Use the GigaChat object to generate responses:

print(giga.invoke("Hello, world!"))

Now you can use the GigaChat object with LangChain's standard primitives to create LLM-applications.

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

langchain_gigachat_lc1-0.4.0b2.tar.gz (20.9 kB view details)

Uploaded Source

Built Distribution

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

langchain_gigachat_lc1-0.4.0b2-py3-none-any.whl (23.8 kB view details)

Uploaded Python 3

File details

Details for the file langchain_gigachat_lc1-0.4.0b2.tar.gz.

File metadata

File hashes

Hashes for langchain_gigachat_lc1-0.4.0b2.tar.gz
Algorithm Hash digest
SHA256 a2c4ffa8c8bd8b757bc8937da7c2a3badfb95cc96098daecc3166382e9ae46e8
MD5 a388b825a3109977838cc88e6b8c0980
BLAKE2b-256 de9b3542efa7892c35a74c4d4ce8ab8effdf9e6dc9bd3463cd66e3f305f7e534

See more details on using hashes here.

File details

Details for the file langchain_gigachat_lc1-0.4.0b2-py3-none-any.whl.

File metadata

File hashes

Hashes for langchain_gigachat_lc1-0.4.0b2-py3-none-any.whl
Algorithm Hash digest
SHA256 3ded6264f92b1050b268b2b11983e9d75186e7f8c549763c13b0124ba45e318b
MD5 c01b1d9dc8c69b919e0492d00c4ec870
BLAKE2b-256 78f5f65a64cc6506eb51a77b947572794a3749425561986ad3cb35e4263a4bf4

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