agentscope.web.gradio.studio module

run web ui

fn_choice(data: EventData, uid: str) None[source]

Handle a selection event from the chatbot interface.

get_chat(uid: str) list[list][source]

Retrieve chat messages for a given user ID.

import_function_from_path(module_path: str, function_name: str, module_name: str | None = None) Callable[source]

Import a function from the given module path.

init_uid_list() list[source]

Initialize an empty list for storing user IDs.

reset_glb_var(uid: str) None[source]

Reset global variables for a given user ID.

run_app() None[source]

Entry point for the web UI application.

send_audio(audio_term: str, uid: str) None[source]

Convert audio input to text and send as a chat message.

send_image(image_term: str, uid: str) None[source]

Send an image as a chat message.

send_message(msg: str, uid: str) str[source]

Send a generic message to the player.