Skip to content

Commit 404164f

Browse files
author
xusenlin
committed
Update streamlit demo
1 parent bc1607a commit 404164f

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

streamlit-demo/.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CHAT_API_BASE = "http://192.168.50.207:7891/v1" # 聊天接口地址
1+
CHAT_API_BASE = "http://192.168.20.59:7891/v1" # 聊天接口地址
22
SQL_CHAT_API_BASE = "http://192.168.0.53:7891/v1" # sql生成模型接口地址(可选)
33
TOOL_CHAT_API_BASE = "http://192.168.20.59:7891/v1" # 调用工具模型接口地址(可选)
44
EMBEDDING_API_BASE = "http://192.168.0.53:7891/v1" # 嵌入模型接口地址(可选)

streamlit-demo/streamlit_gallery/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import dotenv
55
import nltk
66

7-
NLTK_DATA_PATH = os.path.join(Path(__file__).parents[2], "applications/nltk_data")
7+
NLTK_DATA_PATH = os.path.join(Path(__file__).parents[1], "nltk_data")
88
nltk.data.path = [NLTK_DATA_PATH] + nltk.data.path
99

10-
dotenv.load_dotenv(os.path.join(Path(__file__).parents[1], ".env"))
10+
dotenv.load_dotenv(os.path.join(Path(__file__).parents[1], ".env.example"))

streamlit-demo/streamlit_gallery/components/code_interpreter/streamlit_app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,12 @@ def chat_once(message_placeholder, client: OpenAI):
7373
{
7474
"role": "assistant",
7575
"content": full_response,
76-
"function_call": {"name": "interpreter", "arguments": ""},
7776
}
7877
)
7978
st.session_state.messages.append(
8079
{
8180
"role": "function",
81+
"name": "interpreter",
8282
"content": "[Image]" if res_type == "image" else res, # 调用函数返回结果
8383
}
8484
)

0 commit comments

Comments
 (0)