Skill

Index and Query GigaChat Files

Covers GigaChat SDK file storage, multimodal inputs, and text embeddings - uploading documents/images and building embeddings retrieval.


91
Spark score
out of 100
Updated last month
Version 1.0.0

Add to Favorites

Why it matters

Leverage GigaChat's SDK to store, index, and retrieve information from files and multimodal inputs, enabling advanced querying and summarization capabilities.

Outcomes

What it gets done

01

Store and manage files within GigaChat.

02

Create embeddings for multimodal inputs.

03

Index data for efficient retrieval.

04

Query and summarize indexed information.

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/gigachat-sdk-files-embeddings | bash

Overview

GigaChat Files & Embeddings

Covers file storage, multimodal inputs, and text embeddings in the official gigachat Python SDK - uploading and listing files, working with file IDs in single-modality requests, fetching generated assets, and building retrieval with embeddings. Use it when uploading documents or images, downloading generated assets, or building an embeddings-based retrieval system directly on the gigachat package. Use gigachat-sdk-chat for pure text generation, and langchain-gigachat if the task is a LangChain RAG pipeline.

What it does

GigaChat SDK Files and Embeddings covers the two storage-adjacent capabilities of the official gigachat Python SDK: the file API - upload, listing, download, and delete, including supported file types and practical size limits - and text embeddings, including model choice and batching guidance. It also documents multimodal workflows, which depend on referencing files by the ID returned from an earlier upload rather than sending raw content inline.

When to use - and when NOT to

Use it when a task uploads documents or images, downloads generated assets (like images or 3D content) back out of GigaChat, or needs embeddings for a retrieval system built directly on the SDK. If the task is pure text generation with no files or embeddings involved, use gigachat-sdk-chat instead. If retrieval is actually being built as a LangChain RAG pipeline rather than directly on the SDK, switch to langchain-gigachat, which wraps these same capabilities in LangChain's abstractions.

Inputs and outputs

The file workflow is upload-first: a file is uploaded, GigaChat returns a file ID, and that ID - not the raw file - is what gets referenced in later requests. A hard constraint applies to multimodal requests: only one modality's worth of files can be attached to a single model request, so images, audio, and documents must never be mixed together in the same call. For generated outputs like images or 3D assets, content is retrieved back through the same files API rather than returned inline. For retrieval workloads, the recommended order is to pick an embeddings model first, then batch embedding requests sensibly rather than sending them one at a time. Two reference files hold the deeper detail: references/files.md for file lifecycle and multimodal notes, and references/embeddings.md for embeddings usage and retrieval notes.

Integrations

This skill is one part of a small GigaChat skill family: gigachat-sdk-chat handles pure chat/text generation, langchain-gigachat wraps files and embeddings (among other things) in LangChain abstractions for chain- or agent-based retrieval, and gigachat-setup covers the credentials and TLS configuration all of them assume is already working. Keeping file-lifecycle guidance and embeddings guidance separate is a deliberate design choice here, since the two have different constraints (one-modality-per-request vs. batching).

Who it's for

Developers working directly against the gigachat SDK (not through LangChain) who need to upload or fetch files, work with multimodal inputs correctly, or build a retrieval system on GigaChat embeddings without guessing at file ID handling or batching behavior.

Source README

GigaChat SDK Files And Embeddings

Use this skill for storage and vector workflows in the official SDK.

What this skill covers

  • file upload, listing, download, delete
  • supported file types and practical size limits
  • multimodal workflows that depend on stored file IDs
  • embeddings requests and model choice
  • batching guidance for embeddings

Workflow

  1. If the task is pure text generation, use gigachat-sdk-chat instead.
  2. For files, upload first and work with returned file IDs.
  3. In one model request, attach files of only one modality. Do not mix images, audio, and documents in the same request.
  4. For generated images or 3D assets, fetch content through the files API.
  5. For retrieval, pick the embeddings model first, then batch requests sensibly.
  6. If the user is actually building LangChain RAG, switch to langchain-gigachat.
  7. Prefer the simplest verified single-file or embeddings pattern before expanding to more complex workflows.

Read these references as needed

  • For file lifecycle and multimodal notes: references/files.md
  • For embeddings usage and retrieval notes: references/embeddings.md

Default output

  • treat one-modality-per-request as a hard constraint
  • use verified single-file or multi-image patterns before suggesting broader multimodal behavior
  • separate file lifecycle guidance from embeddings guidance

FAQ

Common questions

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.