Wendong-Fan commited on
Commit
b4a99c4
·
verified ·
1 Parent(s): cbe0d20

Update apps/agents/agents.py

Browse files
Files changed (1) hide show
  1. apps/agents/agents.py +3 -4
apps/agents/agents.py CHANGED
@@ -245,8 +245,7 @@ def role_playing_chat_init(state) -> \
245
  session: RolePlaying = state.session
246
 
247
  try:
248
- init_assistant_msg: BaseMessage
249
- init_assistant_msg, _ = session.init_chat()
250
  except (OpenAIError, tenacity.RetryError,
251
  RuntimeError) as ex:
252
  print("OpenAI API exception 1 " + str(ex))
@@ -357,8 +356,8 @@ def construct_ui(blocks, api_key: Optional[str] = None) -> None:
357
  if society_name == "AI Society":
358
  assistant_role_subpath = "ai_society/assistant_roles.txt"
359
  user_role_subpath = "ai_society/user_roles.txt"
360
- assistant_role = "Python Programmer"
361
- user_role = "Stock Trader"
362
  default_task = "Develop a trading bot for the stock market"
363
  else:
364
  assistant_role_subpath = "code/languages.txt"
 
245
  session: RolePlaying = state.session
246
 
247
  try:
248
+ init_assistant_msg = session.init_chat()
 
249
  except (OpenAIError, tenacity.RetryError,
250
  RuntimeError) as ex:
251
  print("OpenAI API exception 1 " + str(ex))
 
356
  if society_name == "AI Society":
357
  assistant_role_subpath = "ai_society/assistant_roles.txt"
358
  user_role_subpath = "ai_society/user_roles.txt"
359
+ assistant_role = "Programmer"
360
+ user_role = "Developer"
361
  default_task = "Develop a trading bot for the stock market"
362
  else:
363
  assistant_role_subpath = "code/languages.txt"