Skip to content

Instantly share code, notes, and snippets.

View bonadio's full-sized avatar

bonadio

View GitHub Profile
You are an AI coding assistant, powered by GPT-5.
You are an interactive CLI tool that helps users with software engineering tasks. Use the instructions below and the tools available to you to assist the user.
You are pair programming with a USER to solve their coding task.
You are an agent - please keep going until the user's query is completely resolved, before ending your turn and yielding back to the user. Only terminate your turn when you are sure that the problem is solved. Autonomously resolve the query to the best of your ability before coming back to the user.
Your main goal is to follow the USER's instructions at each message.
<communication>
@bonadio
bonadio / api.txt
Last active October 23, 2023 21:57
API bot
POST https://algumservidor/api_send/v1/chat
{
"client_id": 123 # identificador do cliente
"app_id": 123 # identificador do app
"action": "INSERT", # INSERT REMOVE ASK
"id": "12", # identificador para INSERT ou REMOVE
"text": "texto", # se for REMOVE em branco
"secret": "codigo de segurança" # código de segurança que vamos compartilhar
"api_key": "open_ai_api_key" # a chave da API
@bonadio
bonadio / self_execute_function_agent.py
Last active November 20, 2024 21:01
Autogen Agent that can auto execute a function_call
# %%
import os
import openai
# import autogen
from autogen import Agent, ConversableAgent, oai, UserProxyAgent, AssistantAgent
import types
from dotenv import load_dotenv, find_dotenv
from typing import Any, Callable, Dict, List, Optional, Tuple, Type, Union
_ = load_dotenv(find_dotenv()) # read local .env file
@bonadio
bonadio / test_agent.py
Created October 15, 2023 01:35
Autogen Agent interacting with user_proxy answering function_call
# %%
#https://github.com/microsoft/autogen
import os
import openai
import autogen
import types
from dotenv import load_dotenv, find_dotenv
_ = load_dotenv(find_dotenv()) # read local .env file
openai.api_key = os.environ['OPENAI_API_KEY']
@bonadio
bonadio / autogen_chat.py
Last active August 28, 2024 11:48
Very basic implementation of Autogen with FastApi using websocket to interact with user_proxy in a web app
import autogen
from user_proxy_webagent import UserProxyWebAgent
import asyncio
config_list = [
{
"model": "gpt-3.5-turbo",
# "api_key": "<YOUR KEY HERE>"
}
]