From e9a1fbf268afe487f0892cb3d382ac0d27aa10a3 Mon Sep 17 00:00:00 2001 From: wylerz Date: Mon, 28 Oct 2024 13:36:58 -0600 Subject: [PATCH] fix import error --- .../reference/gen_notebooks/audio_with_weave.md | 9 ++++++++- docs/notebooks/audio_with_weave.ipynb | 16 +++++++++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/docs/docs/reference/gen_notebooks/audio_with_weave.md b/docs/docs/reference/gen_notebooks/audio_with_weave.md index c351bda16e0d..a8c6b45efc1e 100644 --- a/docs/docs/reference/gen_notebooks/audio_with_weave.md +++ b/docs/docs/reference/gen_notebooks/audio_with_weave.md @@ -1,3 +1,6 @@ +--- +title: Log Audio With Weave +--- :::tip[This is a notebook] @@ -9,6 +12,9 @@ ::: + + + # How to use Weave with Audio Data: An OpenAI Example This demo uses the OpenAI chat completions API with GPT 4o Audio Preview to generate audio responses to text prompts and track these in Weave. @@ -39,6 +45,7 @@ Next, load the required API keys for OpenAI and Weave. Here, we use set_env whic ```python # Set environment variables. +from set_env import set_env _ = set_env("OPENAI_API_KEY") _ = set_env("WANDB_API_KEY") @@ -152,7 +159,7 @@ prompt_endpoint_and_log_trace( display(Audio("output.wav", rate=SAMPLE_RATE, autoplay=True)) ``` -# Advanced Usage: Realtime Audio API with Weave #TODO: Record video of weave traces and me chatting with it w/ the terminal output side by side. +# Advanced Usage: Realtime Audio API with Weave
(Advanced) Realtime Audio API with Weave diff --git a/docs/notebooks/audio_with_weave.ipynb b/docs/notebooks/audio_with_weave.ipynb index c192c589e577..a4a3dfa2d04f 100644 --- a/docs/notebooks/audio_with_weave.ipynb +++ b/docs/notebooks/audio_with_weave.ipynb @@ -1,5 +1,18 @@ { "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n", + "\n", + "" + ] + }, { "cell_type": "markdown", "metadata": { @@ -66,6 +79,7 @@ "outputs": [], "source": [ "# Set environment variables.\n", + "from set_env import set_env\n", "\n", "_ = set_env(\"OPENAI_API_KEY\")\n", "_ = set_env(\"WANDB_API_KEY\")" @@ -253,7 +267,7 @@ "id": "P7zY5fho4hOG" }, "source": [ - "# Advanced Usage: Realtime Audio API with Weave #TODO: Record video of weave traces and me chatting with it w/ the terminal output side by side. \n", + "# Advanced Usage: Realtime Audio API with Weave\n", "\n", "
\n", " (Advanced) Realtime Audio API with Weave \n",