Skip to content

Commit

Permalink
Merge pull request #139 from rgbkrk/rgbkrk-tidy
Browse files Browse the repository at this point in the history
Update color-picker.mdx
  • Loading branch information
cvaske authored Mar 1, 2024
2 parents 3d2528d + 58f7391 commit 45cfd2b
Showing 1 changed file with 6 additions and 5 deletions.
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>

0 comments on commit 45cfd2b

Please sign in to comment.