chat

command
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

This example calls the real DeepSeek REST and SSE APIs for a multi-turn conversation. It reads DEEPSEEK_API_KEY into an in-memory credential store and DEEPSEEK_MODEL (default: deepseek-chat; deepseek-reasoner also emits reasoning chunks), builds system/user/assistant messages with temperature and length limits, streams reasoning/text/tool-call chunks, and prints usage including cache hits and misses. Run from the repository root with your own key from https://platform.deepseek.com. PowerShell: set $env:DEEPSEEK_API_KEY and optionally $env:DEEPSEEK_MODEL, then run go run ./examples/chat. Linux/macOS: DEEPSEEK_API_KEY="sk-your-key" DEEPSEEK_MODEL="deepseek-reasoner" go run ./examples/chat.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL