Skip to content

Commit a94b6d6

Browse files
committed
Add new model 'gpt-4o-mini' of OpenAI
1 parent 5e5618b commit a94b6d6

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<h1 align="center">RAG-GPT</h1>
33
Quickly launch an intelligent customer service system with Flask, LLM, RAG, including frontend, backend, and admin console.
44
<br/>
5-
<a href="https://demo.rentsoft.cn/" target="_blank"> Live Demo </a>
5+
<a href="https://langchain-bot.open-sora.ai/" target="_blank"> Live Demo </a>
66
<br/>
77
<img style="display: block; margin: auto; width: 70%;" src="./doc/rag_overview.jpg">
88
</div>
@@ -82,7 +82,7 @@ The variables in .env
8282
```shell
8383
LLM_NAME="OpenAI"
8484
OPENAI_API_KEY="xxxx"
85-
GPT_MODEL_NAME="gpt-3.5-turbo"
85+
GPT_MODEL_NAME="gpt-4o-mini"
8686
MIN_RELEVANCE_SCORE=0.4
8787
BOT_TOPIC="xxxx"
8888
URL_PREFIX="http://127.0.0.1:7000/"
@@ -96,7 +96,7 @@ USE_GPT4O=0
9696

9797
- Don't modify **`LLM_NAME`**
9898
- Modify the **`OPENAI_API_KEY`** with your own key. Please log in to the [OpenAI website](https://platform.openai.com/api-keys) to view your API Key.
99-
- Update the **`GPT_MODEL_NAME`** setting, replacing `gpt-3.5-turbo` with `gpt-4-turbo` or `gpt-4o` if you want to use GPT-4.
99+
- Update the **`GPT_MODEL_NAME`** setting, replacing `gpt-4o-mini` with `gpt-4-turbo` or `gpt-4o` if you want to use GPT-4.
100100
- Change **`BOT_TOPIC`** to reflect your Bot's name. This is very important, as it will be used in `Prompt Construction`. Please try to use a concise and clear word, such as `OpenIM`, `LangChain`.
101101
- Adjust **`URL_PREFIX`** to match your website's domain. This is mainly for generating accessible URL links for uploaded local files. Such as `http://127.0.0.1:7000/web/download_dir/2024_05_20/d3a01d6a-90cd-4c2a-b926-9cda12466caf/openssl-cookbook.pdf`.
102102
- Set **`USE_LLAMA_PARSE`** to 1 if you want to use `LlamaParse`.

env_of_openai

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
LLM_NAME="OpenAI"
22
OPENAI_API_KEY="xxxx"
3-
GPT_MODEL_NAME="gpt-3.5-turbo"
3+
GPT_MODEL_NAME="gpt-4o-mini"
44
MIN_RELEVANCE_SCORE=0.4
55
BOT_TOPIC="xxxx"
66
URL_PREFIX="http://127.0.0.1:7000/"

server/constant/env_constants.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,11 @@ def check_env_variables():
2121
logger.error(f"OPENAI_API_KEY: '{OPENAI_API_KEY}' is illegal!")
2222
sys.exit(-1)
2323

24-
# GPT_MODEL_NAME: Specific GPT model being used, e.g., 'gpt-3.5-turbo' or 'gpt-4-turbo', or 'gpt-4o'.
24+
# GPT_MODEL_NAME: Specific GPT model being used, e.g., 'gpt-3.5-turbo' or 'gpt-4-turbo' or 'gpt-4o' or 'gpt-4o-mini'.
2525
GPT_MODEL_NAME = os.getenv('GPT_MODEL_NAME')
26-
gpt_model_name_list = ['gpt-3.5-turbo', 'gpt-4-turbo', 'gpt-4o']
26+
gpt_model_name_list = [
27+
'gpt-3.5-turbo', 'gpt-4-turbo', 'gpt-4o', 'gpt-4o-mini'
28+
]
2729
if GPT_MODEL_NAME not in gpt_model_name_list:
2830
logger.error(
2931
f"GPT_MODEL_NAME: '{GPT_MODEL_NAME}' is illegal! Must be in {gpt_model_name_list}"

0 commit comments

Comments
 (0)