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.0b4.tar.gz (20.6 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.0b4-py3-none-any.whl (23.3 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for langchain_gigachat_lc1-0.4.0b4.tar.gz
Algorithm Hash digest
SHA256 ab113d85533c2437f0b1fb23144bf6570aad1c9c3ab631453c153b03f10969fb
MD5 7f2c31db5a39607732f59ebe5e3a47b3
BLAKE2b-256 f5b9c13d8dd611478d22a218bea7fae63abbdd40a830038b44d7c296d05c971b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for langchain_gigachat_lc1-0.4.0b4-py3-none-any.whl
Algorithm Hash digest
SHA256 40b95e7aa16312e9caf22642e2799e7e369251df987181ebdb31ad19056bb4e6
MD5 0192f69b7cc39b5179aaa85ba5324b0c
BLAKE2b-256 6214dd2511b04dab414b31d1a8b150279d638e379838fb264fb800546440a870

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