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
# Real-time translator that uses Gladia to transcribe and translate any language to English | |
# It displays the translated text on a Pirate Audio display on a Raspberry Pi Zero 2 W | |
from pathlib import Path | |
from dotenv import load_dotenv | |
from livekit.agents import JobContext, WorkerOptions, cli | |
from livekit.agents.voice import Agent, AgentSession | |
from livekit.plugins import gladia | |
from PIL import Image |
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 logging | |
import os | |
import aiohttp | |
from typing import Annotated | |
from dotenv import load_dotenv | |
from livekit import rtc | |
from livekit.agents import ( | |
AutoSubscribe, | |
JobContext, |
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
from dotenv import load_dotenv | |
from livekit.agents import ( | |
AutoSubscribe, | |
JobContext, | |
JobProcess, | |
WorkerOptions, | |
cli, | |
llm, | |
) | |
from livekit.agents.pipeline import VoicePipelineAgent |
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 logging | |
import os | |
from dotenv import load_dotenv | |
from livekit import rtc, api | |
import sounddevice as sd | |
import numpy as np | |
import signal | |
import queue |
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
response = client.chat.completions.create( | |
model="gpt-4o", | |
messages=[ | |
{ | |
"role": "user", | |
"content": [ | |
{ | |
"type": "text", | |
"text": "what's the capital of the USA?" | |
} |
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
from openai import OpenAI | |
client = OpenAI() | |
client.fine_tuning.jobs.create( | |
training_file="mydata", | |
model="gpt-4o-mini-2024-07-18" | |
) |
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
from openai import OpenAI | |
client = OpenAI() | |
client.files.create( | |
file=open("mydata.jsonl", "rb"), | |
purpose="fine-tune" | |
) | |
client.fine_tuning.jobs.create( | |
training_file="mydata", |
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
{ | |
"messages": [ | |
{ "role": "system", "content": "You are an assistant that identifies uncommon cheeses." }, | |
{ "role": "user", "content": "What is this cheese?" }, | |
{ "role": "user", "content": [ | |
{ | |
"type": "image_url", | |
"image_url": { | |
"url": "<https://upload.wikimedia.org/wikipedia/commons/3/36/Danbo_Cheese.jpg>" | |
} |
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
from __future__ import annotations | |
import logging | |
from livekit import rtc | |
from livekit.agents import ( | |
AutoSubscribe, | |
JobContext, | |
WorkerOptions, | |
cli, | |
llm, | |
) |
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
mutation { | |
fulfillmentOrderReschedule( | |
id: "gid://shopify/FulfillmentOrder/1899851251768", | |
fulfillAt: "2022-01-01" | |
) | |
{ | |
fulfillmentOrder { | |
fulfillAt | |
} | |
userErrors { |
NewerOlder