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.0b3.tar.gz (21.1 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.0b3-py3-none-any.whl (24.0 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for langchain_gigachat_lc1-0.4.0b3.tar.gz
Algorithm Hash digest
SHA256 eabc3d3eaf1dcdba4a1810425f21fab90ebdc1b8e3f3d6f016c6bdb4eb7efec7
MD5 704f6f2082f63c747f7d6267f185f2af
BLAKE2b-256 555572534e27808c2d6b4f7dfe36e00c321160fcda2eb43ede81d87155fe71c7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for langchain_gigachat_lc1-0.4.0b3-py3-none-any.whl
Algorithm Hash digest
SHA256 766ea5fb9070c3948c6ef7e4d8a8836665d0d5e1c1ccee089a50493bf4683304
MD5 75bf67f22e94452b404f1548a3883a6b
BLAKE2b-256 6349c2d1b380ac7d5d1f4714427208a23cfb250a621a827b295d6ba896eec6bd

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