Skip to content

Commit

Permalink
docs: fixes to config docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBjare committed Feb 3, 2025
1 parent 19895aa commit 2b11a3c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
12 changes: 5 additions & 7 deletions docs/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ It also supports environment variables for configuration, which take precedence

The CLI also supports a variety of options that can be used to override both configuration values and environment variables.

.. _global-config:

Global config
-------------
Expand Down Expand Up @@ -52,12 +53,11 @@ The ``prompt`` section contains options for the prompt.
The ``env`` section contains environment variables that gptme will fall back to if they are not set in the shell environment. This is useful for setting the default model and API keys for :doc:`providers`.

Environment Variables
------------------------
~~~~~~~~~~~~~~~~~~~~~

Besides the configuration files, gptme supports several environment variables to control its behavior:

Feature Flags
~~~~~~~~~~~~~
.. rubric:: Feature Flags

- ``GPTME_CHECK`` - Enable precommit checks (default: true if ``.pre-commit-config.yaml`` present)
- ``GPTME_COSTS`` - Enable cost reporting for API calls (default: false)
Expand All @@ -66,14 +66,12 @@ Feature Flags
- ``GPTME_PATCH_RECOVERY`` - Return file content in error for non-matching patches (default: false)
- ``GPTME_SUGGEST_LLM`` - Enable LLM-powered prompt completion (default: false)

Tool Configuration
~~~~~~~~~~~~~~~~~~
.. rubric:: Tool Configuration

- ``GPTME_TTS_VOICE`` - Set the voice to use for TTS
- ``GPTME_VOICE_FINISH`` - Wait for TTS speech to finish before exiting (default: false)

Paths
~~~~~
.. rubric:: Paths

- ``GPTME_LOGS_HOME`` - Override the default logs folder location

Expand Down
2 changes: 1 addition & 1 deletion docs/providers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ On first startup, if ``--model`` is not set, and no API keys are set in the conf

You can list the models known to gptme using ``gptme '/models' - '/exit'``

Use the ``[env]`` section in the ``gptme.toml`` :doc:`config` file to store API keys using the same format as the environment variables:
Use the ``[env]`` section in the :ref:`global-config` file to store API keys using the same format as the environment variables:

- ``OPENAI_API_KEY="your-api-key"``
- ``ANTHROPIC_API_KEY="your-api-key"``
Expand Down

0 comments on commit 2b11a3c

Please sign in to comment.