From b6c0e891d34fbde4845b63c60dc5bbae6a466d00 Mon Sep 17 00:00:00 2001 From: Haoran Pan <167847254+TPLin22@users.noreply.github.com> Date: Wed, 11 Jun 2025 15:45:22 +0800 Subject: [PATCH] docs: update llm setting guidance and "REASONING_THINK_RM" description (#943) * update llm setting guidance and "REASONING_THINK_RM" description * remove deprecated backend in readme --- README.md | 39 +++++++------------------ docs/installation_and_configuration.rst | 6 ++++ 2 files changed, 17 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 3abe0857..1c2b24e1 100644 --- a/README.md +++ b/README.md @@ -151,41 +151,24 @@ Ensure the current user can run Docker commands **without using sudo**. You can - json_mode - embedding query -- For example: If you are using the `OpenAI API`, you have to configure your GPT model in the `.env` file like this. - ```bash - cat << EOF > .env - OPENAI_API_KEY= - # EMBEDDING_MODEL=text-embedding-3-small - CHAT_MODEL=gpt-4-turbo - EOF - ``` -- However, not every API services support these features by default. For example: `AZURE OpenAI`, you have to configure your GPT model in the `.env` file like this. - ```bash - cat << EOF > .env - USE_AZURE=True - EMBEDDING_OPENAI_API_KEY= - EMBEDDING_AZURE_API_BASE= - EMBEDDING_AZURE_API_VERSION= - EMBEDDING_MODEL=text-embedding-3-small - CHAT_OPENAI_API_KEY= - CHAT_AZURE_API_BASE= - CHAT_AZURE_API_VERSION= - CHAT_MODEL= - EOF - ``` + You can set your Chat Model and Embedding Model in the following ways: -- We now support LiteLLM as a backend for integration with multiple LLM providers. If you use LiteLLM Backend to use models, you can configure as follows: +- **Using LiteLLM (Recommended)**: We now support LiteLLM as a backend for integration with multiple LLM providers. You can configure as follows: ```bash cat << EOF > .env BACKEND=rdagent.oai.backend.LiteLLMAPIBackend - # It can be modified to any model supported by LiteLLM. - CHAT_MODEL=gpt-4o + # Set to any model supported by LiteLLM. + CHAT_MODEL=gpt-4o EMBEDDING_MODEL=text-embedding-3-small - # The backend api_key fully follow the convention of litellm. + # Then configure the environment variables required by your chosen model in the convention of LiteLLM here. OPENAI_API_KEY= ``` - -- For more configuration information, please refer to the [documentation](https://rdagent.readthedocs.io/en/latest/installation_and_configuration.html). + Notice: If you are using reasoning models that include thought processes in their responses (such as \ tags), you need to set the following environment variable: + ```bash + REASONING_THINK_RM=True + ``` + +- You can also use a deprecated backend if you only use `OpenAI API` or `Azure OpenAI` directly. For this deprecated setting and more configuration information, please refer to the [documentation](https://rdagent.readthedocs.io/en/latest/installation_and_configuration.html). ### 🚀 Run the Application diff --git a/docs/installation_and_configuration.rst b/docs/installation_and_configuration.rst index 532f8ceb..84218df8 100644 --- a/docs/installation_and_configuration.rst +++ b/docs/installation_and_configuration.rst @@ -51,6 +51,12 @@ For example, if you are using a DeepSeek model, you need to set as follows: CHAT_MODEL=deepseek/deepseek-chat DEEPSEEK_API_KEY= +Besides, when you are using reasoning models, the response might include the thought process. For this case, you need to set the following environment variable: + + .. code-block:: Properties + + REASONING_THINK_RM=True + For more details on LiteLLM requirements, refer to the `official LiteLLM documentation `_.