Skip to content

Commit

Permalink
docs: update repeated tabs with chat content tab (#3331)
Browse files Browse the repository at this point in the history
  • Loading branch information
Haleshot authored Jan 3, 2025
1 parent f25bdf6 commit 04b1c83
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion docs/api/inputs/tabs.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ def __():
plt.title("Random Bar Chart")
plt.xlabel("Categories")
plt.ylabel("Values")
def simple_echo_model(messages, config):
return f"You said: {messages[-1].content}"

chat = mo.ui.chat(
simple_echo_model,
prompts=["Hello", "How are you?"],
show_configuration_controls=True
)
None
return

Expand All @@ -25,7 +33,7 @@ def __():
mo.ui.tabs(
{
"📈 Sales": bar,
"📊 Subscriptions": bar,
"📊 Chatbot": chat,
"💻 Settings": mo.ui.text(placeholder="Key"),
}
)
Expand Down

0 comments on commit 04b1c83

Please sign in to comment.