Documentation
¶
Overview ¶
Command basic sends a single prompt to a model and prints the reply.
It is the smallest possible use of the llm package: resolve a model from the built-in catalog, build a one-message Context with Prompt, and let Complete run the request and return the final assistant message.
The API key is read from the provider's environment variable when StreamOptions.APIKey is empty:
DEEPSEEK_API_KEY=sk-... go run ./example/llm/basic
Click to show internal directories.
Click to hide internal directories.