Public
Edited
Jul 10, 2023
Insert cell
Insert cell
Insert cell
Insert cell
data
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
Insert cell
Insert cell
openai = import("https://esm.sh/openai-edge")
Insert cell
ai = {
if(!openai_api_key) throw new Error('Please set openai api key')
const api = new openai.OpenAIApi(new openai.Configuration({
apiKey: openai_api_key
}))
return api;
}
Insert cell
{
const textarea = Inputs.textarea();
const send = html`<button>Send</button>`;
send.onclick = () => {
};
const el = html`${textarea} ${send}`;
return el;
}
Insert cell
{
const host = html`<div />`;
const { $, render, useEffect, h } = voby;

const App = () => {
const count = $(0);
const incr = () => count((i) => i + 1);
return voby.html`
<form>
<div>${count}</div>
<button onClick=${incr}> + </button>
</form>
`;
};

render(h(App), host);

return host;
}
Insert cell
Insert cell
voby = import("https://esm.sh/voby")
Insert cell
twind = import("https://esm.sh/@twind/core")
Insert cell
twind.install({})
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more