This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# usage: gemini-lights-repro.py --initial-message "Make a pretty sequence with the lights. Turn them on and off a few times. Pick nice colors." | |
import argparse | |
import asyncio | |
import base64 | |
import json | |
import os | |
import pyaudio | |
import re | |
import shutil |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# installation: | |
# | |
# python3.12 -m venv venv | |
# source venv/bin/activate | |
# | |
# pip install pyaudio websockets | |
# usage: | |
# | |
# export GEMINI_API_KEY=... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
import base64 | |
import json | |
import os | |
import pyaudio | |
import shutil | |
import websockets | |
class AudioStreamer: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Copyright (c) 2024, Daily | |
# | |
# SPDX-License-Identifier: BSD 2-Clause License | |
# | |
import aiohttp | |
import argparse | |
import os |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import aiohttp | |
import asyncio | |
import os | |
import sys | |
from pipecat.frames.frames import EndFrame | |
from pipecat.pipeline.pipeline import Pipeline | |
from pipecat.pipeline.task import PipelineParams, PipelineTask | |
from pipecat.pipeline.runner import PipelineRunner | |
from pipecat.processors.frameworks.rtvi import ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
import aiohttp | |
import os | |
import sys | |
from pipecat.frames.frames import LLMMessagesFrame | |
from pipecat.pipeline.pipeline import Pipeline | |
from pipecat.pipeline.runner import PipelineRunner | |
from pipecat.pipeline.task import PipelineParams, PipelineTask | |
from pipecat.processors.aggregators.llm_response import ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
base_model: meta-llama/Meta-Llama-3-70B | |
# deepspeed: /workspace/axolotl/deepspeed_configs/zero3_bf16.json | |
load_in_8bit: false | |
load_in_4bit: true | |
strict: false | |
datasets: | |
# This will be the path used for the data when it is saved to the Volume in the cloud. | |
- path: data.jsonl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
base_model: meta-llama/Meta-Llama-3-70B | |
deepspeed: /workspace/axolotl/deepspeed_configs/zero3_bf16.json | |
load_in_8bit: true | |
load_in_4bit: false | |
strict: false | |
datasets: | |
# This will be the path used for the data when it is saved to the Volume in the cloud. | |
- path: data.jsonl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
base_model: meta-llama/Meta-Llama-3-70B | |
deepspeed: /workspace/axolotl/deepspeed_configs/zero3_bf16.json | |
load_in_8bit: false | |
load_in_4bit: true | |
strict: false | |
datasets: | |
# This will be the path used for the data when it is saved to the Volume in the cloud. | |
- path: data.jsonl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import json | |
import time | |
import statistics | |
from groq import Groq | |
# Set the Groq API key and the number of inferences to run | |
GROQ_API_KEY = os.environ.get("GROQ_API_KEY") | |
NUM_INFERENCES = 10 |