reasoning

command
v0.6.6 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Command reasoning asks a reasoning-capable model to think before answering and streams the reasoning and the final answer as separate phases.

It shows the provider-neutral Reasoning knob: a ModelThinkingLevel that each adapter maps to its own native form and clamps to what the model supports. Thinking arrives as EventThinking* events, distinct from the EventText* answer, so a caller can display or hide it. Non-reasoning models ignore the setting.

The API key is read from the provider's environment variable when StreamOptions.APIKey is empty:

DEEPSEEK_API_KEY=sk-... go run ./example/llm/reasoning

Jump to

Keyboard shortcuts

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