mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
1ec575ea02
Adds 6 missing demos to the AG2 integration: - auth: V2 runtime onRequest hook gates requests via Bearer token; AG2 default agent backs the authenticated path. - agent-config: Typed tone/expertise/responseLength config forwarded via agent.setState into AG2 ContextVariables; agent reads via a get_current_config tool before each reply. - voice: V2 runtime + TranscriptionServiceOpenAI + sample audio button; guarded for missing OPENAI_API_KEY. - multimodal: Dedicated gpt-4o AG2 ConversableAgent with image + PDF attachment support; sample-attachment buttons inject bundled samples. - byoc-hashbrown: AG2 agent emits hashbrown-shaped JSON for @hashbrownai/react useUiKit + useJsonParser; sales dashboard catalog. - byoc-json-render: AG2 agent emits flat root/elements JSON spec for @json-render/react Renderer; identical sales catalog for parity. Adds @copilotkit/voice, @json-render/core, @json-render/react, openai JS deps; pypdf and openai Python deps. Bundles demo-audio + demo-files public assets and updates manifest features + demos.
Voice demo audio
Drop a small (<100KB) WAV file named sample.wav in this directory. The voice
demo (/demos/voice) fetches it client-side and POSTs to the transcription
endpoint so the flow works without mic permissions.
Expected content: an audio clip speaking the phrase "What is the weather in Tokyo?" — the demo caption advertises that phrase to the user, and the bundled QA checklist + E2E spec assert the transcribed text contains "weather" and/or "Tokyo".
Generate locally, for example:
- macOS:
say -o sample.aiff "What is the weather in Tokyo?" && ffmpeg -i sample.aiff -ar 16000 -ac 1 sample.wav - Linux:
espeak-ng -w sample.wav "What is the weather in Tokyo?" - Windows: PowerShell
System.Speech.Synthesis.SpeechSynthesizer→SetOutputToWaveFile
Target: 16kHz mono, 3-5s duration, <100KB.