Skip to content

Instantly share code, notes, and snippets.

@elijahbenizzy
Created July 5, 2024 06:04
Show Gist options
  • Save elijahbenizzy/5303621273a01d208058be3ccad0e181 to your computer and use it in GitHub Desktop.
Save elijahbenizzy/5303621273a01d208058be3ccad0e181 to your computer and use it in GitHub Desktop.
const response = await fetch(
`/api/v0/streaming_chatbot/response/${props.projectId}/${props.appId}`,
{
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ prompt: currentPrompt })
}
);
const reader = response.body?.getReader();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment