Skip to content

Instantly share code, notes, and snippets.

View PaulGwamanda's full-sized avatar
💭
Leave the world a little better than you found it

Paul Gwamanda PaulGwamanda

💭
Leave the world a little better than you found it
View GitHub Profile
@PaulGwamanda
PaulGwamanda / app.js
Created January 7, 2024 21:50 — forked from bauefikapa/app.js
Example React Client Kapa AI Streaming
import React, { useState, useEffect } from 'react';
const App = () => {
const [relevantSources, setRelevantSources] = useState([]);
const [answer, setAnswer] = useState('');
const [identifiers, setIdentifiers] = useState(null);
const [error, setError] = useState(null);
const [feedback, setFeedback] = useState(null);
const process_stream = async (response) => {