- Created .env_example for environment variable configuration. - Added .gitignore to exclude sensitive files and directories. - Implemented gigachat_cli.py for command-line interaction with the GigaChat API. - Updated README.md with setup instructions and usage examples. - Included requirements.txt for necessary dependencies.
37 lines
633 B
Markdown
37 lines
633 B
Markdown
# GigaChat CLI Tester
|
|
|
|
Simple command-line helper for sending prompts to the GigaChat API.
|
|
|
|
## Prerequisites
|
|
|
|
- Python 3.9+
|
|
- GigaChat credentials (set `GIGACHAT_CREDENTIALS`). Get them from [GigaChat Studio](https://developers.sber.ru/studio).
|
|
|
|
## Setup
|
|
|
|
```bash
|
|
python -m venv .venv
|
|
.venv\Scripts\activate # PowerShell: .venv\Scripts\Activate.ps1
|
|
pip install -r requirements.txt
|
|
```
|
|
|
|
## Usage
|
|
|
|
Send a single prompt:
|
|
|
|
```bash
|
|
python gigachat_cli.py "Explain how AI works in a few words"
|
|
```
|
|
|
|
Interactive mode:
|
|
|
|
```bash
|
|
python gigachat_cli.py
|
|
```
|
|
|
|
Specify a different model:
|
|
|
|
```bash
|
|
python gigachat_cli.py --model GigaChat-Pro
|
|
```
|