This file contains 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
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 |
This file contains 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 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 |
This file contains 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
# %% | |
#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'] |
This file contains 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 autogen | |
from user_proxy_webagent import UserProxyWebAgent | |
import asyncio | |
config_list = [ | |
{ | |
"model": "gpt-3.5-turbo", | |
# "api_key": "<YOUR KEY HERE>" | |
} | |
] |