Skip to content

Commit

Permalink
fix: camel app AttributeError (#1439)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wendong-Fan authored Jan 12, 2025
1 parent 6bc9c05 commit 21e496f
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 24 deletions.
49 changes: 26 additions & 23 deletions apps/agents/agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,37 +563,40 @@ def change_society(society_name: str) -> Tuple[Dict, Dict, str]:
lambda v: gr.update(visible=v), task_specifier_cb, ts_word_limit_nb
)

def start_chain():
state = cleanup_on_launch(session_state.value)
state, specified_task, task_prompt, chat, progress = (
role_playing_start(
state,
society_dd.value,
assistant_ta.value,
user_ta.value,
original_task_ta.value,
num_messages_sl.value,
task_specifier_cb.value,
ts_word_limit_nb.value,
language_ta.value,
)
)
state, chat, progress = role_playing_chat_init(state)
return (
state,
specified_task,
task_prompt,
chat,
progress,
)

start_bn.click(
cleanup_on_launch,
session_state,
[session_state, chatbot, start_bn],
queue=False,
).then(
role_playing_start,
[
session_state,
society_dd,
assistant_ta,
user_ta,
original_task_ta,
num_messages_sl,
task_specifier_cb,
ts_word_limit_nb,
language_ta,
],
[
fn=start_chain,
outputs=[
session_state,
specified_task_ta,
task_prompt_ta,
chatbot,
progress_sl,
],
queue=False,
).then(
role_playing_chat_init,
session_state,
[session_state, chatbot, progress_sl],
queue=False,
)

blocks.load(
Expand Down
1 change: 0 additions & 1 deletion apps/agents/test/test_agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
)


@pytest.mark.skip(reason="Skipping this test temporarily")
def test_construct_blocks():
blocks = construct_blocks(None)
assert isinstance(blocks, gr.Blocks)
Expand Down

0 comments on commit 21e496f

Please sign in to comment.