Skip to content

Instantly share code, notes, and snippets.

@bizrockman
bizrockman / autogen_openai_assistant.py
Created July 21, 2024 12:16
AutoGen - OpenAI Assistant
import os
from autogen import UserProxyAgent
from autogen.agentchat.contrib.gpt_assistant_agent import GPTAssistantAgent
os.environ["AUTOGEN_USE_DOCKER"] = "False"
config_list = [
{
"model": "gpt-4o",
"api_key": "sk-..."
}
@bizrockman
bizrockman / autogen_eigener_agent.py
Created July 21, 2024 12:14
AutoGen - Eigener Agent
import autogen
from autogen import AssistantAgent, runtime_logging
from typing import Dict, List, Optional
import requests
sys_msg = """You are a weather reporter who provides a short weather report for a given city.
Make your response short. ONLY the weather information. Noting more. NO excuses, that you can only talk about the
weather. Do not make an introduction. Just start with the weather information.
If no city is provided, tell the user that you need a city name. But you will generate a weather report for the city
@bizrockman
bizrockman / autogen_statische_kommunikationswege.py
Created July 21, 2024 12:11
AutoGen - Statische Kommunikationswege
import os
import requests
from autogen import AssistantAgent, UserProxyAgent, ConversableAgent
import openai
os.environ["AUTOGEN_USE_DOCKER"] = "False"
def get_current_weather(city_name):
weather_api_key = "<API KEY>"
@bizrockman
bizrockman / py
Created July 21, 2024 12:09
AutoGen - Function Calling
import os
import requests
from autogen import AssistantAgent, UserProxyAgent, GroupChat, GroupChatManager
import openai
os.environ["AUTOGEN_USE_DOCKER"] = "False"
def get_current_weather(city_name):
weather_api_key = "<API KEY>"
@bizrockman
bizrockman / gist:b1c2c13f967948833ea1601070f0da5f
Created July 21, 2024 12:06
AutoGen - Zusammenarbeit von Agenten
import os
from autogen import AssistantAgent, UserProxyAgent, GroupChat, GroupChatManager
os.environ["AUTOGEN_USE_DOCKER"] = "False"
config_list = [
{
"model": "gpt-4o",
"api_key": "sk-..."
}
@bizrockman
bizrockman / gist:2a2c421da0bc4e24b5320e4f46da0ff2
Created July 21, 2024 11:55
AutoGen - Einfaches Beispiel
from autogen import AssistantAgent, UserProxyAgent
config_list = [
{
"model": "gpt-4o",
"api_key": "sk-...",
}
]
assistant = AssistantAgent(
@bizrockman
bizrockman / gist:b15e58d071b167010bb6aeb8a54ed6b6
Created July 21, 2024 11:53
AutoGen - Einfaches Beispiel
from autogen import AssistantAgent, UserProxyAgent
config_list = [
{
"model": "gpt-4o",
"api_key": "sk-...",
}
]
assistant = AssistantAgent(
@bizrockman
bizrockman / gist:94afe857342075cb0bfae068550ea0bd
Created November 27, 2023 19:30 — forked from levelsio/gist:5bc87fd1b1ffbf4a705047bebd9b4790
Secret of Monkey Island: Amsterdam (by @levelsio) or how to create your own ChatGPT image+text-based adventure game
# 2023-11-27 MIT LICENSE
Here's the open source version of my ChatGPT game MonkeyIslandAmsterdam.com.
It's an unofficial image+text-based adventure game edition of Monkey Island in Amsterdam, my home town.
Please use it however you want. It'd be nice to see more ChatGPT-based games appear from this. If you get inspired by it, please link back to my X https://x.com/levelsio or this Gist so more people can do the same!
Send me your ChatGPT text adventure game on X, I'd love to try it!
from MEGABYTE_pytorch import MEGABYTE
import datetime
import time
import random
import tqdm
import gzip
import numpy as np
import torch
@bizrockman
bizrockman / App.css
Created April 27, 2023 20:32 — forked from adrianhajdin/App.css
Build and Deploy Your Own ChatGPT AI SaaS Business with React
@tailwind base;
@tailwind components;
@tailwind utilities;
/*
Note: The styles for this gradient grid background is heavily inspired by the creator of this amazing site (https://dub.sh) – all credits go to them!
*/
.main {
width: 100vw;