Skip to main content

An integration package connecting GigaChat and LangChain

Project description

langchain-gigachat

This is a library integration with GigaChat.

GitHub Release GitHub Actions Workflow Status GitHub License GitHub Downloads (all assets, all releases) GitHub Repo stars GitHub Open Issues

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-0.3.1.tar.gz (21.3 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-0.3.1-py3-none-any.whl (25.3 kB view details)

Uploaded Python 3

File details

Details for the file langchain_gigachat-0.3.1.tar.gz.

File metadata

  • Download URL: langchain_gigachat-0.3.1.tar.gz
  • Upload date:
  • Size: 21.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.7 Darwin/23.6.0

File hashes

Hashes for langchain_gigachat-0.3.1.tar.gz
Algorithm Hash digest
SHA256 a416510b1f72780358c7fe0cceb03a4a5053f0a260e6e1c84f11ad7859e45b38
MD5 a25de827219e8637d4ee0d1c1ab27407
BLAKE2b-256 4c30ef9f01915ae18369e9f05ef362a8a58d7cb4b6414ad2b458f80ca2ab38f7

See more details on using hashes here.

File details

Details for the file langchain_gigachat-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: langchain_gigachat-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 25.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.7 Darwin/23.6.0

File hashes

Hashes for langchain_gigachat-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3ed7329af134248c8cefb7fcc88a1082faa01a82a014941e5ad1d2905dfdefc5
MD5 49b2e1d62174b824f464202a517865bf
BLAKE2b-256 92834c2a9065b473e6011d6f04578b98d0f38a49e70d64f6fd80352e5d70fc72

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