@@ -405,15 +405,59 @@ Commands:
405405 agents Return a list of agents
406406 models Return a list of models
407407 tools Return a list of tools
408- download Download a model
408+ download Download a model (for Ollama)
409409 chat Start a chat session
410- complete Complete a prompt
410+ complete Complete a prompt, generate image or speech from text
411411 embedding Generate an embedding
412412 version Print the version of this tool
413413
414414Run "llm <command> --help" for more information on a command.
415415```
416416
417+ ### Prompt Completion
418+
419+ To have the model respond to a prompt, you can use the ` complete ` command. For example, to
420+ have the model respond to the prompt "What is the capital of France?" using the ` claude-3-5-haiku-20241022 `
421+ model, you can use the following command:
422+
423+ ``` bash
424+ llm complete " What is the capital of France?"
425+ ```
426+
427+ The first time you use the command use the `` --model `` flag to specify the model you want to use. Your
428+ choice of model will be remembered for subsequent completions.
429+
430+ ### Explain computer code
431+
432+ To have the model explain a piece of computer code, you can pipe the code into the ` complete ` command.
433+ For example, to have the model explain the code in the file ` example.go ` , you can use the following command:
434+
435+ ``` bash
436+ cat example.go | llm complete
437+ ```
438+
439+ ### Caption an image
440+
441+ To have the model generate a caption for an image, you can use the ` complete ` command with the ` --file `
442+ flag. For example, to have the model generate a caption for the image in the file ` example.jpg ` , you can use
443+ the following command:
444+
445+ ``` bash
446+ llm complete --model gpt-4o --file picture.png " Explain this image"
447+ ```
448+
449+ ### Generate an image
450+
451+ To have the model generate an image from a prompt, you can use the ` complete ` command with the ` --format image `
452+ option. For example, to have the model generate an image from the prompt "A picture of a cat", you can use
453+ the following command:
454+
455+ ``` bash
456+ llm complete --model dall-e-3 --format image " A picture of a cat"
457+ ```
458+
459+ It will write the file in the current working directory.
460+
417461## Contributing & Distribution
418462
419463_ This module is currently in development and subject to change_ . Please do file
0 commit comments