Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update color-picker.mdx #139

Merged
merged 1 commit into from
Mar 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions website/docs/examples/color-picker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ import ChatFunctionCall from "@site/src/components/ChatFunctionCall";
import { OutputBlock } from "@site/src/components/cell";
import { ColorPalette } from "@site/src/components/ColorPalette";

Tool and function calls can return rich HTML output into notebooks.
In this example, we expose a function `show_colors` to the model to let it display the color palette it chooses.
The function itself uses the Ipython function `display()` in order to use `_repr_html_()` to create a visual display in the notebook.
This reuses the standard method of displaying rich information in notebooks.
Tool and function calls can `display` rich HTML output into notebooks.

In this example, we expose a function `show_colors` to the model to let it display the color palette it chooses to the user.

The IPython-provided `display()` uses your object's `_repr_html_()` to show HTML in your notebook.

```python cell count=1
from chatlab import Chat, models, system
Expand Down Expand Up @@ -94,4 +95,4 @@ For a neon-themed portfolio site with a dark background, I've curated a palette
8. **#FFFFFF** - Pure white for text and icons to ensure maximum readability against the dark, neon-lit background.

This neon palette is designed to give your portfolio a striking, futuristic look that is both engaging and memorable. The key to using this palette effectively is to balance the bright neon colors with plenty of dark space to avoid overwhelming the viewer and to maintain a clean, professional appearance. Use the neon colors strategically to guide visitors through your portfolio and highlight the most important aspects of your work.
</OutputBlock>
</OutputBlock>
Loading