Skip to content

Instantly share code, notes, and snippets.

View willymateo's full-sized avatar

Willy Joao Mateo Espinoza willymateo

View GitHub Profile
@willymateo
willymateo / how-to-use-ReadableStreams.js
Created May 6, 2025 15:53
How to use ReadableStreams
const useReadableStreams = async () => {
const res = await fetch(`http://127.0.0.1:8000/threads/${1234}/messages`, {
method: "POST",
body: JSON.stringify({
"content": "Whats my name?",
"model": "gpt-4.1"
}),
headers: {
"Accept": "application/json",
"Content-Type": "application/json",