Update streamlit_app.py

This commit is contained in:
Vincent Zhao 2024-05-07 21:38:51 +08:00 committed by GitHub
parent 7c0de17074
commit b1d9af1744
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -19,8 +19,8 @@ dashscope.api_key = os.getenv("DASHSCOPE_API_KEY") # get api key from environme
st.set_page_config(layout="wide", page_title='TestGenius') st.set_page_config(layout="wide", page_title='TestGenius')
default_title = 'New Chat' default_title = 'New Chat'
default_messages = [('user', 'Hello'), default_messages = [('user', 'What capabilities do you offer?'),
('assistant', 'Hello, how can I help you?') ('assistant', 'I excel at transforming uploaded images and texts into precise, multilingual test cases, streamlining the work of Business Analysts with efficiency and accuracy.')
] ]
conversations = [{ conversations = [{
@ -101,7 +101,7 @@ def respond_nonStream(prompt, instruction):
messages = [ messages = [
{'role': 'system', 'content': instruction}, {'role': 'system', 'content': instruction},
{'role': 'user', 'content': prompt}] {'role': 'user', 'content': prompt}]
response = Generation.call(model="qwen-turbo", response = Generation.call(model="qwen-max",
messages=messages, messages=messages,
result_format='message', # 设置输出为'message'格式 result_format='message', # 设置输出为'message'格式
temperature=1, temperature=1,
@ -176,7 +176,7 @@ if prompt:
您输入了中文的功能描述 您输入了中文的功能描述
| 用例编号 | 测试步骤 | 预期结果 | | 用例编号 | 测试步骤 | 预期结果 |
| -------- | ------------------------------------------------------ | ---------------- | | -------- | ------------------------------------------------------ | ---------------- |
| 1 | 1. 输入正确的用户名和密码<br>2. 点击登录按钮 | 系统跳转到首页 | | 1 | 1. 输入正确的用户名和密码 2. 点击登录按钮 | 系统跳转到首页 |
# 示例2 # 示例2
user: Clicking the registration button submits the data. user: Clicking the registration button submits the data.