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
from appwrite.client import Client | |
from appwrite.services.databases import Databases | |
from appwrite.services.storage import Storage | |
from appwrite.query import Query | |
... | |
app_database = Databases(appwrite_client) | |
result = database.list_documents( | |
database_id=database_id, |
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
from appwrite.client import Client | |
from dotenv import load_dotenv | |
def init_appwrite_client() -> Client: | |
''' | |
Init Appwrite client and return Databases object | |
''' | |
client = Client() | |
client.set_endpoint(os.getenv("APPWRITE_ENDPOINT")) | |
client.set_project(os.getenv("APPWRITE_PROJECT_ID")) |
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 | |
from openai import OpenAI | |
import json | |
import re | |
import hashlib | |
import random | |
from tqdm import tqdm | |
from dotenv import load_dotenv | |
load_dotenv() |
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 | |
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-..." | |
} |
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 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 |
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 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>" |
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 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>" |
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 | |
from autogen import AssistantAgent, UserProxyAgent, GroupChat, GroupChatManager | |
os.environ["AUTOGEN_USE_DOCKER"] = "False" | |
config_list = [ | |
{ | |
"model": "gpt-4o", | |
"api_key": "sk-..." | |
} |
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
from autogen import AssistantAgent, UserProxyAgent | |
config_list = [ | |
{ | |
"model": "gpt-4o", | |
"api_key": "sk-...", | |
} | |
] | |
assistant = AssistantAgent( |
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
from autogen import AssistantAgent, UserProxyAgent | |
config_list = [ | |
{ | |
"model": "gpt-4o", | |
"api_key": "sk-...", | |
} | |
] | |
assistant = AssistantAgent( |
NewerOlder