Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
liujiangning30 committed Apr 11, 2024
1 parent ec00c7d commit 24304ac
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions examples/internlm2_agent_web_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,10 @@ def init_state(self):
action_list = [
ArxivSearch(),
PPT(),
BINGMap(
key='qaTBEmz3VIVotIKfVFLO~B_F0RIwD8ZEljsKEgQopdQ~AmFcljtooPxkBsCRVVQMtIBNS9S-oSmS1MaAsPiBUVN1eds4UeNum4M3a6cYX-kg'
),
GoogleScholar(
api_key='a558de7dee10146326ca86fbaa0736bdd947c9e646cd3f14da5aff177d6b2ff0'
)
BINGMap(key='Your api key' # noqa
),
GoogleScholar(api_key='Your api key' # noqa
)
]
st.session_state['plugin_map'] = {
action.name: action
Expand Down Expand Up @@ -112,7 +110,7 @@ def setup_sidebar(self):
actions=[IPythonInterpreter()])
else:
st.session_state['chatbot']._interpreter_executor = None
st.session_state['chatbot']._protocol._meta_template = meta_prompt
st.session_state['chatbot']._protocol.meta_prompt = meta_prompt
st.session_state['chatbot']._protocol.plugin_prompt = plugin_prompt
st.session_state[
'chatbot']._protocol.interpreter_prompt = da_prompt
Expand Down Expand Up @@ -149,8 +147,8 @@ def initialize_chatbot(self, model, plugin_action):
plugin='<|plugin|>', interpreter='<|interpreter|>'),
belong='assistant',
end='<|action_end|>\n',
), ),
max_turn=7)
)),
max_turn=15)

def render_user(self, prompt: str):
with st.chat_message('user'):
Expand Down

0 comments on commit 24304ac

Please sign in to comment.