Skip to content

Instantly share code, notes, and snippets.

View amosgyamfi's full-sized avatar

Amos Gyamfi amosgyamfi

View GitHub Profile
import asyncio
import logging
from uuid import uuid4
from dotenv import load_dotenv
from vision_agents.core.edge.types import User
from vision_agents.core.agents import Agent
from vision_agents.plugins import cartesia, getstream, deepgram, smart_turn, gemini
import asyncio
from uuid import uuid4
from vision_agents.core.edge.types import User
from vision_agents.core import agents
from vision_agents.plugins import openai, getstream
async def start_agent() -> None:
# create an agent to run with Stream's edge, openAI realtime llm
agent = agents.Agent(
import asyncio
import logging
from uuid import uuid4
from dotenv import load_dotenv
from vision_agents.core.edge.types import User
from vision_agents.plugins import getstream, gemini
from vision_agents.core import agents, cli
import io
import json
import re
from typing import Any, Dict, List
import streamlit as st
from google import genai
from google.genai import types
from PIL import Image, ImageDraw, ImageFont
from google import genai
from google.genai import types
from PIL import Image
# Initialize the GenAI client and specify the model
MODEL_ID = "gemini-robotics-er-1.5-preview"
PROMPT = """
Point to no more than 10 items in the image. The label returned
should be an identifying name for the object detected.
//
// ImageGeneratingView.swift
// SwiftUIiOS26
//
// Created by Amos Gyamfi on 29.7.2025.
//
import SwiftUI
struct ImageGeneratingView: View {
import SwiftUI
struct PulsingHearts: View {
let hearts: [(image: String, animation: Animation)] = [
("heartSpring", .bouncy(duration: 1, extraBounce: 0.6)),
("heartSky", .bouncy(duration: 1, extraBounce: 0.4).delay(0.1)),
("heartStrawberry", .bouncy(duration: 1, extraBounce: 0.2).delay(0.2))
]
var body: some View {
from swarm import Swarm, Agent
client = Swarm()
mini_model = "gpt-4o-mini"
# Coordinator function
def transfer_to_agent_b():
return agent_b
from phi.agent import Agent
from phi.model.openai import OpenAIChat
from phi.tools.duckduckgo import DuckDuckGo
from phi.tools.yfinance import YFinanceTools
from phi.model.xai import xAI
from phi.playground import Playground, serve_playground_app
from fastapi import FastAPI
# Create web search agent
import openai
from phi.agent import Agent
from phi.model.openai import OpenAIChat
from phi.tools.yfinance import YFinanceTools
from dotenv import load_dotenv
import os
# Load environment variables from .env file
load_dotenv()