This file contains hidden or 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 subprocess | |
| import glob | |
| import zipfile | |
| from litellm import completion | |
| from dotenv import load_dotenv | |
| # Load environment variables | |
| load_dotenv() |
This file contains hidden or 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 secrets | |
| import fastapi_poe as fp | |
| from sanic import Sanic | |
| from sanic.response import json | |
| from json import dumps | |
| from sanic_cors import CORS | |
| from base64 import urlsafe_b64encode |
This file contains hidden or 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 openai | |
| from openai import OpenAI | |
| import os | |
| def load_environment_variables(filepath='.env'): | |
| script_dir = os.path.dirname(os.path.abspath(__file__)) | |
| filepath = os.path.join(script_dir, filepath) | |
| with open(filepath, 'r') as file: | |
| for line in file: |
This file contains hidden or 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
| ############################ | |
| # Usage: python monitor.py # | |
| ############################ | |
| import subprocess | |
| import json | |
| import re | |
| import multiprocessing | |
| from multiprocessing import Process, Manager | |
| from prettytable import PrettyTable |