file_path
stringlengths
3
280
file_language
stringclasses
66 values
content
stringlengths
1
1.04M
repo_name
stringlengths
5
92
repo_stars
int64
0
154k
repo_description
stringlengths
0
402
repo_primary_language
stringclasses
108 values
developer_username
stringlengths
1
25
developer_name
stringlengths
0
30
developer_company
stringlengths
0
82
main.py
Python
import re input_text = """ # DatasetRetriever ## Overview - `DatasetRetriever`: Interface for retrieving datasets based on a prompt. - `DescriptionDatasetRetriever`: Retrieves HuggingFace datasets using similarity to a given prompt. ## Getting Started - Import Modules ```python from prompt2model.dataset_retrieve...
zhaochenyang20/markdownlint-savior
2
markdownlint-savior is a Python script designed to assist in resolving common Markdown linting issues. It helps ensure your Markdown files adhere to linting standards and improves the overall quality of your Markdown documents.
Python
zhaochenyang20
赵晨阳
University of California, Los Angeles
scratch/blockchain-simulator.cc
C++
#include "ns3/core-module.h" #include "ns3/network-module.h" #include "ns3/internet-module.h" #include "ns3/point-to-point-module.h" #include "ns3/applications-module.h" using namespace ns3; NS_LOG_COMPONENT_DEFINE ("BlockchainSimulator"); // 创建网络 void startSimulator (int N) { NodeContainer nodes; nodes.Create (...
zhayujie/blockchain-simulator
56
Some simulations of blockchain consensus based on ns3. Currently implemented consensus protocols include Raft, Paxos and PBFT.
C++
zhayujie
Minimal Future Tech
src/applications/helper/network-helper.cc
C++
#include "ns3/core-module.h" #include "network-helper.h" #include "ns3/string.h" #include "ns3/inet-socket-address.h" #include "ns3/names.h" #include "ns3/network-module.h" #include "ns3/internet-module.h" #include "ns3/applications-module.h" // 2.need changed to the the specific header file #include "../model/raft-n...
zhayujie/blockchain-simulator
56
Some simulations of blockchain consensus based on ns3. Currently implemented consensus protocols include Raft, Paxos and PBFT.
C++
zhayujie
Minimal Future Tech
src/applications/helper/network-helper.h
C/C++ Header
#ifndef NETWORK_HELPER_H #define NETWORK_HELPER_H #include "ns3/object-factory.h" #include "ns3/ipv4-address.h" #include "ns3/node-container.h" #include "ns3/application-container.h" #include "ns3/uinteger.h" #include <map> namespace ns3 { class NetworkHelper { public: NetworkHelper (uint32_t totalNoNodes); ...
zhayujie/blockchain-simulator
56
Some simulations of blockchain consensus based on ns3. Currently implemented consensus protocols include Raft, Paxos and PBFT.
C++
zhayujie
Minimal Future Tech
src/applications/model/paxos-node.cc
C++
#include "ns3/address.h" #include "ns3/address-utils.h" #include "ns3/log.h" #include "ns3/inet-socket-address.h" #include "ns3/inet6-socket-address.h" #include "ns3/node.h" #include "ns3/socket.h" #include "ns3/udp-socket.h" #include "ns3/simulator.h" #include "ns3/socket-factory.h" #include "ns3/packet.h" #include "n...
zhayujie/blockchain-simulator
56
Some simulations of blockchain consensus based on ns3. Currently implemented consensus protocols include Raft, Paxos and PBFT.
C++
zhayujie
Minimal Future Tech
src/applications/model/paxos-node.h
C/C++ Header
#ifndef PAXOS_NODE_H #define PAXOS_NODE_H #include <algorithm> #include "ns3/application.h" #include "ns3/event-id.h" #include "ns3/ptr.h" #include "ns3/traced-callback.h" #include "ns3/address.h" #include "ns3/boolean.h" namespace ns3 { class Address; class Socket; class Packet; class PaxosNode : public Applicati...
zhayujie/blockchain-simulator
56
Some simulations of blockchain consensus based on ns3. Currently implemented consensus protocols include Raft, Paxos and PBFT.
C++
zhayujie
Minimal Future Tech
src/applications/model/pbft-node.cc
C++
#include "ns3/address.h" #include "ns3/address-utils.h" #include "ns3/log.h" #include "ns3/inet-socket-address.h" #include "ns3/inet6-socket-address.h" #include "ns3/node.h" #include "ns3/socket.h" #include "ns3/udp-socket.h" #include "ns3/simulator.h" #include "ns3/socket-factory.h" #include "ns3/packet.h" #include "n...
zhayujie/blockchain-simulator
56
Some simulations of blockchain consensus based on ns3. Currently implemented consensus protocols include Raft, Paxos and PBFT.
C++
zhayujie
Minimal Future Tech
src/applications/model/pbft-node.h
C/C++ Header
#ifndef PBFT_NODE_H #define PBFT_NODE_H #include <algorithm> #include "ns3/application.h" #include "ns3/event-id.h" #include "ns3/ptr.h" #include "ns3/traced-callback.h" #include "ns3/address.h" #include "ns3/boolean.h" #include <map> namespace ns3 { class Address; class Socket; class Packet; class PbftNode : publi...
zhayujie/blockchain-simulator
56
Some simulations of blockchain consensus based on ns3. Currently implemented consensus protocols include Raft, Paxos and PBFT.
C++
zhayujie
Minimal Future Tech
src/applications/model/raft-node.cc
C++
#include "ns3/address.h" #include "ns3/address-utils.h" #include "ns3/log.h" #include "ns3/inet-socket-address.h" #include "ns3/inet6-socket-address.h" #include "ns3/node.h" #include "ns3/socket.h" #include "ns3/udp-socket.h" #include "ns3/simulator.h" #include "ns3/socket-factory.h" #include "ns3/packet.h" #include "n...
zhayujie/blockchain-simulator
56
Some simulations of blockchain consensus based on ns3. Currently implemented consensus protocols include Raft, Paxos and PBFT.
C++
zhayujie
Minimal Future Tech
src/applications/model/raft-node.h
C/C++ Header
#ifndef RAFT_NODE_H #define RAFT_NODE_H #include <algorithm> #include "ns3/application.h" #include "ns3/event-id.h" #include "ns3/ptr.h" #include "ns3/traced-callback.h" #include "ns3/address.h" #include "ns3/boolean.h" #include <map> namespace ns3 { class Address; class Socket; class Packet; class RaftNode : publi...
zhayujie/blockchain-simulator
56
Some simulations of blockchain consensus based on ns3. Currently implemented consensus protocols include Raft, Paxos and PBFT.
C++
zhayujie
Minimal Future Tech
app.py
Python
# encoding:utf-8 import argparse import config from channel import channel_factory from common import log, const from multiprocessing import Pool from plugins.plugin_manager import PluginManager # Start channel def start_process(channel_type, config_path): try: # For multi-process startup, child process...
zhayujie/bot-on-anything
4,180
A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) into various software applications (such as Telegram, Gmail, Slack, and websites).
Python
zhayujie
Minimal Future Tech
bridge/bridge.py
Python
from model import model_factory import config from plugins.event import Event, EventContext from plugins.plugin_manager import PluginManager class Bridge(object): def __init__(self): pass def fetch_reply_content(self, query, context): econtext = PluginManager().emit_event(EventContext( ...
zhayujie/bot-on-anything
4,180
A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) into various software applications (such as Telegram, Gmail, Slack, and websites).
Python
zhayujie
Minimal Future Tech
channel/channel.py
Python
""" Message sending channel abstract class """ from bridge.bridge import Bridge class Channel(object): def startup(self): """ init channel """ raise NotImplementedError def handle(self, msg): """ process received msg :param msg: message object "...
zhayujie/bot-on-anything
4,180
A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) into various software applications (such as Telegram, Gmail, Slack, and websites).
Python
zhayujie
Minimal Future Tech
channel/channel_factory.py
Python
""" channel factory """ from common import const def create_channel(channel_type): """ create a channel instance :param channel_type: channel type code :return: channel instance """ if channel_type== const.TERMINAL: from channel.terminal.terminal_channel import TerminalChannel r...
zhayujie/bot-on-anything
4,180
A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) into various software applications (such as Telegram, Gmail, Slack, and websites).
Python
zhayujie
Minimal Future Tech
channel/dingtalk/dingtalk_channel.py
Python
# encoding:utf-8 import json import hmac import hashlib import base64 import time import requests from urllib.parse import quote_plus from common import log from flask import Flask, request, render_template, make_response from common import const from common import functions from config import channel_conf from config ...
zhayujie/bot-on-anything
4,180
A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) into various software applications (such as Telegram, Gmail, Slack, and websites).
Python
zhayujie
Minimal Future Tech
channel/discord/discord_channel.py
Python
# encoding:utf-8 """ discord channel Python discord - https://github.com/Rapptz/discord.py.git """ from channel.channel import Channel from common.log import logger from config import conf, common_conf_val, channel_conf import ssl import discord from discord.ext import commands class DiscordChannel(Channel): def...
zhayujie/bot-on-anything
4,180
A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) into various software applications (such as Telegram, Gmail, Slack, and websites).
Python
zhayujie
Minimal Future Tech
channel/feishu/feishu_channel.py
Python
# encoding:utf-8 import json import hmac import hashlib import base64 import time import requests from urllib.parse import quote_plus from common import log from flask import Flask, request, render_template, make_response from common import const from common import functions from config import channel_conf from config ...
zhayujie/bot-on-anything
4,180
A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) into various software applications (such as Telegram, Gmail, Slack, and websites).
Python
zhayujie
Minimal Future Tech
channel/feishu/store.py
Python
# -*- coding: UTF-8 -*- import time from threading import Lock class Store(object): """ This is an interface to storage (Key, Value) pairs for sdk. """ def get(self, key): # type: (str) -> Tuple[bool, str] return False, '' def set(self, key, value, expire): # type: (str, str, int) -> ...
zhayujie/bot-on-anything
4,180
A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) into various software applications (such as Telegram, Gmail, Slack, and websites).
Python
zhayujie
Minimal Future Tech
channel/gmail/gmail_channel.py
Python
import smtplib import imaplib import email import re import base64 import time from random import randrange from email.mime.text import MIMEText from email.header import decode_header from channel.channel import Channel from concurrent.futures import ThreadPoolExecutor from common import const from config import channe...
zhayujie/bot-on-anything
4,180
A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) into various software applications (such as Telegram, Gmail, Slack, and websites).
Python
zhayujie
Minimal Future Tech
channel/http/auth.py
Python
# encoding:utf-8 import jwt import datetime import time from flask import jsonify, request from common import const from config import channel_conf class Auth(): def __init__(self, login): # argument 'privilegeRequired' is to set up your method's privilege # name self.login = login super(...
zhayujie/bot-on-anything
4,180
A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) into various software applications (such as Telegram, Gmail, Slack, and websites).
Python
zhayujie
Minimal Future Tech
channel/http/http_channel.py
Python
# encoding:utf-8 import asyncio import json from channel.http import auth from flask import Flask, request, render_template, make_response from datetime import timedelta from common import const from common import functions from config import channel_conf from config import channel_conf_val from channel.channel import...
zhayujie/bot-on-anything
4,180
A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) into various software applications (such as Telegram, Gmail, Slack, and websites).
Python
zhayujie
Minimal Future Tech
channel/http/static/1.css
CSS
.typing_loader { width: 6px; height: 6px; border-radius: 50%; -webkit-animation: typing 1s linear infinite alternate; -moz-animation: typing 1s linear infinite alternate; -ms-animation: typing 1s linear infinite alternate; animation: typing 1s linear infinite alternate; position: relativ...
zhayujie/bot-on-anything
4,180
A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) into various software applications (such as Telegram, Gmail, Slack, and websites).
Python
zhayujie
Minimal Future Tech
channel/http/static/1.js
JavaScript
function generateUUID() { return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8); return v.toString(16); }) } const conversationType = { DISPOSABLE: 1, STREAM: 1 << 1 } function ConvSt...
zhayujie/bot-on-anything
4,180
A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) into various software applications (such as Telegram, Gmail, Slack, and websites).
Python
zhayujie
Minimal Future Tech
channel/http/templates/index.html
HTML
<!doctype html> <html lang="en" dir="ltr"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta http-equiv="X-UA-Compatible" content="IE=edge"><!-- Title --> <title>ChatGPT</title><!-- Bootstrap Css --> <link href="./static/1.css" rel="stylesheet"...
zhayujie/bot-on-anything
4,180
A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) into various software applications (such as Telegram, Gmail, Slack, and websites).
Python
zhayujie
Minimal Future Tech
channel/http/templates/login.html
HTML
<!doctype html> <html lang="en" dir="ltr"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta http-equiv="X-UA-Compatible" content="IE=edge"><!-- Title --> <title>登录</title><!-- Bootstrap Css --> <style> .login-form { box-sha...
zhayujie/bot-on-anything
4,180
A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) into various software applications (such as Telegram, Gmail, Slack, and websites).
Python
zhayujie
Minimal Future Tech
channel/qq/qq_channel.py
Python
from channel.channel import Channel from aiocqhttp import CQHttp, Event from common import log from concurrent.futures import ThreadPoolExecutor bot = CQHttp(api_root='http://127.0.0.1:5700') thread_pool = ThreadPoolExecutor(max_workers=8) @bot.on_message('private') def handle_private_msg(event: Event): log.info(...
zhayujie/bot-on-anything
4,180
A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) into various software applications (such as Telegram, Gmail, Slack, and websites).
Python
zhayujie
Minimal Future Tech
channel/slack/slack_channel.py
Python
import re from slack_bolt import App from slack_bolt.adapter.socket_mode import SocketModeHandler from common import const from common.log import logger from channel.channel import Channel from config import channel_conf # 创建 Slack Bolt 实例 app = App(token=channel_conf(const.SLACK).get('slack_bot_token')) # 创建 SocketM...
zhayujie/bot-on-anything
4,180
A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) into various software applications (such as Telegram, Gmail, Slack, and websites).
Python
zhayujie
Minimal Future Tech
channel/telegram/telegram_channel.py
Python
from concurrent.futures import ThreadPoolExecutor import io import requests import telebot from common import const from common.log import logger from channel.channel import Channel from config import channel_conf_val, channel_conf bot = telebot.TeleBot(token=channel_conf(const.TELEGRAM).get('bot_token')) thread_pool =...
zhayujie/bot-on-anything
4,180
A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) into various software applications (such as Telegram, Gmail, Slack, and websites).
Python
zhayujie
Minimal Future Tech
channel/terminal/terminal_channel.py
Python
from channel.channel import Channel from common import log import sys class TerminalChannel(Channel): def startup(self): # close log log.close_log() context = {"from_user_id": "User", "stream": True} print("\nPlease input your question") while True: try: ...
zhayujie/bot-on-anything
4,180
A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) into various software applications (such as Telegram, Gmail, Slack, and websites).
Python
zhayujie
Minimal Future Tech
channel/wechat/wechat_channel.py
Python
# encoding:utf-8 """ wechat channel """ import time import itchat import json import re from itchat.content import * from channel.channel import Channel from concurrent.futures import ThreadPoolExecutor from common.log import logger from common import const from config import channel_conf_val import requests from plu...
zhayujie/bot-on-anything
4,180
A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) into various software applications (such as Telegram, Gmail, Slack, and websites).
Python
zhayujie
Minimal Future Tech
channel/wechat/wechat_com_channel.py
Python
#!/usr/bin/env python # -*- coding=utf-8 -*- """ @time: 2023/4/10 22:24 @Project :bot-on-anything @file: wechat_com_channel.py """ import time from channel.channel import Channel from concurrent.futures import ThreadPoolExecutor from common.log import logger from config import conf from wechatpy.enterprise.crypto im...
zhayujie/bot-on-anything
4,180
A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) into various software applications (such as Telegram, Gmail, Slack, and websites).
Python
zhayujie
Minimal Future Tech
channel/wechat/wechat_mp_channel.py
Python
import werobot import time from config import channel_conf from common import const from common.log import logger from channel.channel import Channel from concurrent.futures import ThreadPoolExecutor import os robot = werobot.WeRoBot(token=channel_conf(const.WECHAT_MP).get('token')) thread_pool = ThreadPoolExecutor(...
zhayujie/bot-on-anything
4,180
A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) into various software applications (such as Telegram, Gmail, Slack, and websites).
Python
zhayujie
Minimal Future Tech
channel/wechat/wechat_mp_service_channel.py
Python
import werobot from config import channel_conf from common import const from common.log import logger from channel.channel import Channel from concurrent.futures import ThreadPoolExecutor robot = werobot.WeRoBot(token=channel_conf(const.WECHAT_MP).get('token')) thread_pool = ThreadPoolExecutor(max_workers=8) @robot.t...
zhayujie/bot-on-anything
4,180
A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) into various software applications (such as Telegram, Gmail, Slack, and websites).
Python
zhayujie
Minimal Future Tech
common/const.py
Python
# channel TERMINAL = "terminal" WECHAT = "wechat" WECHAT_MP = "wechat_mp" WECHAT_MP_SERVICE = "wechat_mp_service" WECHAT_COM = "wechat_com" QQ = "qq" GMAIL = "gmail" TELEGRAM = "telegram" SLACK = "slack" HTTP = "http" DINGTALK = "dingtalk" FEISHU = "feishu" DISCORD = "discord" # model OPEN_AI = "openai" CHATGPT = "cha...
zhayujie/bot-on-anything
4,180
A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) into various software applications (such as Telegram, Gmail, Slack, and websites).
Python
zhayujie
Minimal Future Tech
common/functions.py
Python
import json import os import re from common import log def singleton(cls): instances = {} def get_instance(*args, **kwargs): if cls not in instances: instances[cls] = cls(*args, **kwargs) return instances[cls] return get_instance def load_json_file(curdir: str, file: str = 'c...
zhayujie/bot-on-anything
4,180
A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) into various software applications (such as Telegram, Gmail, Slack, and websites).
Python
zhayujie
Minimal Future Tech
common/log.py
Python
# encoding:utf-8 import logging import sys SWITCH = True def _get_logger(): log = logging.getLogger('log') log.setLevel(logging.INFO) console_handle = logging.StreamHandler(sys.stdout) console_handle.setFormatter(logging.Formatter('[%(levelname)s][%(asctime)s][%(filename)s:%(lineno)d] - %(message)s',...
zhayujie/bot-on-anything
4,180
A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) into various software applications (such as Telegram, Gmail, Slack, and websites).
Python
zhayujie
Minimal Future Tech
common/sensitive_word.py
Python
import requests from config import conf class SensitiveWord: def __init__(self): # 读取配置文件 try: self.config = conf() # 加载配置文件 #print(self.config) # 输出配置文件内容以进行调试 except Exception as e: print(e) # 打印错误信息 # 设置请求 URL self.url = "https://ai...
zhayujie/bot-on-anything
4,180
A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) into various software applications (such as Telegram, Gmail, Slack, and websites).
Python
zhayujie
Minimal Future Tech
config.py
Python
# encoding:utf-8 import json import os config = {} def load_config(config_path = "./config.json"): global config if not os.path.exists(config_path): raise Exception('配置文件不存在,请根据config-template.json模板创建config.json文件') config_str = read_file(config_path) # 将json字符串反序列化为dict类型 config = jso...
zhayujie/bot-on-anything
4,180
A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) into various software applications (such as Telegram, Gmail, Slack, and websites).
Python
zhayujie
Minimal Future Tech
model/baidu/yiyan_model.py
Python
# encoding:utf-8 from model.model import Model from config import model_conf from common import const from common.log import logger import requests import time sessions = {} class YiyanModel(Model): def __init__(self): self.acs_token = model_conf(const.BAIDU).get('acs_token') self.cookie = model_...
zhayujie/bot-on-anything
4,180
A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) into various software applications (such as Telegram, Gmail, Slack, and websites).
Python
zhayujie
Minimal Future Tech
model/bing/jailbroken_sydney.py
Python
# encoding:utf-8 import asyncio import time import websockets import random import uuid import EdgeGPT from EdgeGPT import ChatHubRequest, Chatbot, Conversation, ChatHub from typing import Generator from config import model_conf_val class SydneyBot(Chatbot): def __init__( self, cookiePath: str = "...
zhayujie/bot-on-anything
4,180
A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) into various software applications (such as Telegram, Gmail, Slack, and websites).
Python
zhayujie
Minimal Future Tech
model/bing/new_bing_model.py
Python
# encoding:utf-8 import asyncio from model.model import Model from config import model_conf_val, common_conf_val from common import log from EdgeGPT import Chatbot, ConversationStyle from ImageGen import ImageGen from common import functions from model.bing.jailbroken_sydney import SydneyBot user_session = dict() sugg...
zhayujie/bot-on-anything
4,180
A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) into various software applications (such as Telegram, Gmail, Slack, and websites).
Python
zhayujie
Minimal Future Tech
model/google/bard_bot.py
Python
import json import random import requests import re class BardBot: BARD_URL = "https://bard.google.com/" BARD_CHAT_URL = ( "https://bard.google.com/_/BardChatUi/data/assistant.lamda.BardFrontendService/StreamGenerate" ) HEADERS = { "Host": "bard.google.com", "X-Same-Domain": "1"...
zhayujie/bot-on-anything
4,180
A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) into various software applications (such as Telegram, Gmail, Slack, and websites).
Python
zhayujie
Minimal Future Tech
model/google/bard_model.py
Python
# encoding:utf-8 from .bard_bot import BardBot from config import model_conf_val from model.model import Model from common import log user_session = dict() class BardModel(Model): bot: BardBot = None def __init__(self): try: self.cookies = model_conf_val("bard", "cookie") sel...
zhayujie/bot-on-anything
4,180
A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) into various software applications (such as Telegram, Gmail, Slack, and websites).
Python
zhayujie
Minimal Future Tech
model/linkai/link_ai_bot.py
Python
# access LinkAI knowledge base platform # docs: https://link-ai.tech/platform/link-app/wechat from model.model import Model from config import model_conf, common_conf_val, channel_conf_val from common import const from common import log import time import requests import threading import os import re import json use...
zhayujie/bot-on-anything
4,180
A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) into various software applications (such as Telegram, Gmail, Slack, and websites).
Python
zhayujie
Minimal Future Tech
model/model.py
Python
""" Auto-replay chat robot abstract class """ class Model(object): def reply(self, query, context=None): """ model auto-reply content :param req: received message :return: reply content """ raise NotImplementedError
zhayujie/bot-on-anything
4,180
A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) into various software applications (such as Telegram, Gmail, Slack, and websites).
Python
zhayujie
Minimal Future Tech
model/model_factory.py
Python
""" channel factory """ from common import const def create_bot(model_type): """ create a channel instance :param channel_type: channel type code :return: channel instance """ if model_type == const.OPEN_AI: # OpenAI 官方对话模型API (gpt-3.0) from model.openai.open_ai_model import O...
zhayujie/bot-on-anything
4,180
A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) into various software applications (such as Telegram, Gmail, Slack, and websites).
Python
zhayujie
Minimal Future Tech
model/openai/chatgpt_model.py
Python
# encoding:utf-8 from model.model import Model from config import model_conf, common_conf_val from common import const from common import log import openai import time user_session = dict() # OpenAI对话模型API (可用) class ChatGPTModel(Model): def __init__(self): openai.api_key = model_conf(const.OPEN_AI).get(...
zhayujie/bot-on-anything
4,180
A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) into various software applications (such as Telegram, Gmail, Slack, and websites).
Python
zhayujie
Minimal Future Tech
model/openai/open_ai_model.py
Python
# encoding:utf-8 from model.model import Model from config import model_conf, common_conf_val from common import const from common import log import openai import time user_session = dict() # OpenAI对话模型API (可用) class OpenAIModel(Model): def __init__(self): openai.api_key = model_conf(const.OPEN_AI).get('...
zhayujie/bot-on-anything
4,180
A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) into various software applications (such as Telegram, Gmail, Slack, and websites).
Python
zhayujie
Minimal Future Tech
plugins/__init__.py
Python
# encoding:utf-8 from .event import * from .plugin import * from plugins.plugin_registry import PluginRegistry instance = PluginRegistry() register = instance.register # load_plugins = instance.load_plugins # emit_event = instance.emit_event
zhayujie/bot-on-anything
4,180
A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) into various software applications (such as Telegram, Gmail, Slack, and websites).
Python
zhayujie
Minimal Future Tech
plugins/createimg/createimg.py
Python
# encoding:utf-8 from channel.http.http_channel import HttpChannel from channel.wechat.wechat_channel import WechatChannel import plugins from plugins import * from common import functions from config import channel_conf from config import channel_conf_val from common import const @plugins.register(name="CreateImg",...
zhayujie/bot-on-anything
4,180
A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) into various software applications (such as Telegram, Gmail, Slack, and websites).
Python
zhayujie
Minimal Future Tech
plugins/event.py
Python
# encoding:utf-8 from enum import Enum class Event(Enum): # ON_RECEIVE_MESSAGE = 1 # 收到消息 ON_HANDLE_CONTEXT = 2 # 对应通道处理消息前 """ e_context = { "channel": 消息channel, "context" : 本次消息的context, "reply" : 目前的回复,初始为空 , "args": 其他上下文参数 } """ ON_DECORATE_REPLY = 3 # 得到回复后准备装饰 """ e_c...
zhayujie/bot-on-anything
4,180
A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) into various software applications (such as Telegram, Gmail, Slack, and websites).
Python
zhayujie
Minimal Future Tech
plugins/plugin.py
Python
# encoding:utf-8 class Plugin: def __init__(self): self.handlers = {} def get_help_text(self, **kwargs): return "暂无帮助信息"
zhayujie/bot-on-anything
4,180
A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) into various software applications (such as Telegram, Gmail, Slack, and websites).
Python
zhayujie
Minimal Future Tech
plugins/plugin_manager.py
Python
# encoding:utf-8 import os import importlib.util from plugins.event import EventAction, EventContext,Event from plugins.plugin_registry import PluginRegistry from common import functions, log @functions.singleton class PluginManager: def __init__(self, plugins_dir="./plugins/"): self.plugins_dir = plugins_...
zhayujie/bot-on-anything
4,180
A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) into various software applications (such as Telegram, Gmail, Slack, and websites).
Python
zhayujie
Minimal Future Tech
plugins/plugin_registry.py
Python
# encoding:utf-8 import inspect from plugins.plugin import Plugin from common.log import logger from common import functions @functions.singleton class PluginRegistry: def __init__(self): self.plugins = [] def register(self, name: str, desire_priority: int = 0, **kwargs): def wrapper(plugin_c...
zhayujie/bot-on-anything
4,180
A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) into various software applications (such as Telegram, Gmail, Slack, and websites).
Python
zhayujie
Minimal Future Tech
plugins/selector/selector.py
Python
# encoding:utf-8 import os import plugins from plugins import * from common import log from common import functions @plugins.register(name="Selector", desire_priority=99, hidden=True, desc="A model selector", version="0.1", author="RegimenArsenic") class Selector(Plugin): def __init__(self): super().__in...
zhayujie/bot-on-anything
4,180
A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) into various software applications (such as Telegram, Gmail, Slack, and websites).
Python
zhayujie
Minimal Future Tech
scripts/allow-http-nopassword.sh
Shell
#!/usr/bin/env bash set -x # @see https://stackoverflow.com/questions/30003570/how-to-use-gnu-sed-on-mac-os-10-10-brew-install-default-names-no-longer-su # @see https://www.cnblogs.com/fnlingnzb-learner/p/10657285.html cmd=sed if [ "$(uname)" == "Darwin" ];then brew install gnu-sed cmd=gsed fi echo "current sed ...
zhayujie/bot-on-anything
4,180
A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) into various software applications (such as Telegram, Gmail, Slack, and websites).
Python
zhayujie
Minimal Future Tech
scripts/fix-itchat.sh
Shell
#!/usr/bin/env bash set -x # @see https://stackoverflow.com/questions/30003570/how-to-use-gnu-sed-on-mac-os-10-10-brew-install-default-names-no-longer-su # @see https://www.cnblogs.com/fnlingnzb-learner/p/10657285.html cmd=sed if [ "$(uname)" == "Darwin" ];then brew install gnu-sed cmd=gsed fi echo "current sed ...
zhayujie/bot-on-anything
4,180
A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) into various software applications (such as Telegram, Gmail, Slack, and websites).
Python
zhayujie
Minimal Future Tech
scripts/shutdown.sh
Shell
#!/bin/bash #关闭服务 cd `dirname $0`/.. export BASE_DIR=`pwd` pid=`ps ax | grep -i app.py | grep "${BASE_DIR}" | grep python3 | grep -v grep | awk '{print $1}'` if [ -z "$pid" ] ; then echo "No bot-on-anaything running." exit -1; fi echo "The bot-on-anaything(${pid}) is running..." kill ${pid} echo "Se...
zhayujie/bot-on-anything
4,180
A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) into various software applications (such as Telegram, Gmail, Slack, and websites).
Python
zhayujie
Minimal Future Tech
scripts/start.sh
Shell
#!/bin/bash #后台运行bot-on-anaything执行脚本 cd `dirname $0`/.. export BASE_DIR=`pwd` echo $BASE_DIR # check the nohup.out log output file if [ ! -f "${BASE_DIR}/logs/log_info.log" ]; then mkdir "${BASE_DIR}/logs" touch "${BASE_DIR}/logs/log_info.log" echo "${BASE_DIR}/logs/log_info.log" fi nohup python3 "${BASE_DIR}...
zhayujie/bot-on-anything
4,180
A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) into various software applications (such as Telegram, Gmail, Slack, and websites).
Python
zhayujie
Minimal Future Tech
agent/memory/__init__.py
Python
""" Memory module for AgentMesh Provides long-term memory capabilities with hybrid search (vector + keyword) """ from agent.memory.manager import MemoryManager from agent.memory.config import MemoryConfig, get_default_memory_config, set_global_memory_config from agent.memory.embedding import create_embedding_provider...
zhayujie/chatgpt-on-wechat
41,284
CowAgent是基于大模型的超级AI助理,能主动思考和任务规划、访问操作系统和外部资源、创造和执行Skills、拥有长期记忆并不断成长。同时支持飞书、钉钉、企业微信应用、微信公众号、网页等接入,可选择OpenAI/Claude/Gemini/DeepSeek/ Qwen/GLM/Kimi/LinkAI,能处理文本、语音、图片和文件,可快速搭建个人AI助手和企业数字员工。
Python
zhayujie
Minimal Future Tech
agent/memory/chunker.py
Python
""" Text chunking utilities for memory Splits text into chunks with token limits and overlap """ from __future__ import annotations from typing import List, Tuple from dataclasses import dataclass @dataclass class TextChunk: """Represents a text chunk with line numbers""" text: str start_line: int e...
zhayujie/chatgpt-on-wechat
41,284
CowAgent是基于大模型的超级AI助理,能主动思考和任务规划、访问操作系统和外部资源、创造和执行Skills、拥有长期记忆并不断成长。同时支持飞书、钉钉、企业微信应用、微信公众号、网页等接入,可选择OpenAI/Claude/Gemini/DeepSeek/ Qwen/GLM/Kimi/LinkAI,能处理文本、语音、图片和文件,可快速搭建个人AI助手和企业数字员工。
Python
zhayujie
Minimal Future Tech
agent/memory/config.py
Python
""" Memory configuration module Provides global memory configuration with simplified workspace structure """ from __future__ import annotations import os from dataclasses import dataclass, field from typing import Optional, List from pathlib import Path def _default_workspace(): """Get default workspace path wi...
zhayujie/chatgpt-on-wechat
41,284
CowAgent是基于大模型的超级AI助理,能主动思考和任务规划、访问操作系统和外部资源、创造和执行Skills、拥有长期记忆并不断成长。同时支持飞书、钉钉、企业微信应用、微信公众号、网页等接入,可选择OpenAI/Claude/Gemini/DeepSeek/ Qwen/GLM/Kimi/LinkAI,能处理文本、语音、图片和文件,可快速搭建个人AI助手和企业数字员工。
Python
zhayujie
Minimal Future Tech
agent/memory/embedding.py
Python
""" Embedding providers for memory Supports OpenAI and local embedding models """ import hashlib from abc import ABC, abstractmethod from typing import List, Optional class EmbeddingProvider(ABC): """Base class for embedding providers""" @abstractmethod def embed(self, text: str) -> List[float]: ...
zhayujie/chatgpt-on-wechat
41,284
CowAgent是基于大模型的超级AI助理,能主动思考和任务规划、访问操作系统和外部资源、创造和执行Skills、拥有长期记忆并不断成长。同时支持飞书、钉钉、企业微信应用、微信公众号、网页等接入,可选择OpenAI/Claude/Gemini/DeepSeek/ Qwen/GLM/Kimi/LinkAI,能处理文本、语音、图片和文件,可快速搭建个人AI助手和企业数字员工。
Python
zhayujie
Minimal Future Tech
agent/memory/manager.py
Python
""" Memory manager for AgentMesh Provides high-level interface for memory operations """ import os from typing import List, Optional, Dict, Any from pathlib import Path import hashlib from datetime import datetime, timedelta from agent.memory.config import MemoryConfig, get_default_memory_config from agent.memory.st...
zhayujie/chatgpt-on-wechat
41,284
CowAgent是基于大模型的超级AI助理,能主动思考和任务规划、访问操作系统和外部资源、创造和执行Skills、拥有长期记忆并不断成长。同时支持飞书、钉钉、企业微信应用、微信公众号、网页等接入,可选择OpenAI/Claude/Gemini/DeepSeek/ Qwen/GLM/Kimi/LinkAI,能处理文本、语音、图片和文件,可快速搭建个人AI助手和企业数字员工。
Python
zhayujie
Minimal Future Tech
agent/memory/storage.py
Python
""" Storage layer for memory using SQLite + FTS5 Provides vector and keyword search capabilities """ from __future__ import annotations import sqlite3 import json import hashlib from typing import List, Dict, Optional, Any from pathlib import Path from dataclasses import dataclass @dataclass class MemoryChunk: ...
zhayujie/chatgpt-on-wechat
41,284
CowAgent是基于大模型的超级AI助理,能主动思考和任务规划、访问操作系统和外部资源、创造和执行Skills、拥有长期记忆并不断成长。同时支持飞书、钉钉、企业微信应用、微信公众号、网页等接入,可选择OpenAI/Claude/Gemini/DeepSeek/ Qwen/GLM/Kimi/LinkAI,能处理文本、语音、图片和文件,可快速搭建个人AI助手和企业数字员工。
Python
zhayujie
Minimal Future Tech
agent/memory/summarizer.py
Python
""" Memory flush manager Triggers memory flush before context compaction (similar to clawdbot) """ from typing import Optional, Callable, Any from pathlib import Path from datetime import datetime class MemoryFlushManager: """ Manages memory flush operations before context compaction Similar to cla...
zhayujie/chatgpt-on-wechat
41,284
CowAgent是基于大模型的超级AI助理,能主动思考和任务规划、访问操作系统和外部资源、创造和执行Skills、拥有长期记忆并不断成长。同时支持飞书、钉钉、企业微信应用、微信公众号、网页等接入,可选择OpenAI/Claude/Gemini/DeepSeek/ Qwen/GLM/Kimi/LinkAI,能处理文本、语音、图片和文件,可快速搭建个人AI助手和企业数字员工。
Python
zhayujie
Minimal Future Tech
agent/prompt/__init__.py
Python
""" Agent Prompt Module - 系统提示词构建模块 """ from .builder import PromptBuilder, build_agent_system_prompt from .workspace import ensure_workspace, load_context_files __all__ = [ 'PromptBuilder', 'build_agent_system_prompt', 'ensure_workspace', 'load_context_files', ]
zhayujie/chatgpt-on-wechat
41,284
CowAgent是基于大模型的超级AI助理,能主动思考和任务规划、访问操作系统和外部资源、创造和执行Skills、拥有长期记忆并不断成长。同时支持飞书、钉钉、企业微信应用、微信公众号、网页等接入,可选择OpenAI/Claude/Gemini/DeepSeek/ Qwen/GLM/Kimi/LinkAI,能处理文本、语音、图片和文件,可快速搭建个人AI助手和企业数字员工。
Python
zhayujie
Minimal Future Tech
agent/prompt/builder.py
Python
""" System Prompt Builder - 系统提示词构建器 实现模块化的系统提示词构建,支持工具、技能、记忆等多个子系统 """ from __future__ import annotations import os from typing import List, Dict, Optional, Any from dataclasses import dataclass from common.log import logger @dataclass class ContextFile: """上下文文件""" path: str content: str class Prom...
zhayujie/chatgpt-on-wechat
41,284
CowAgent是基于大模型的超级AI助理,能主动思考和任务规划、访问操作系统和外部资源、创造和执行Skills、拥有长期记忆并不断成长。同时支持飞书、钉钉、企业微信应用、微信公众号、网页等接入,可选择OpenAI/Claude/Gemini/DeepSeek/ Qwen/GLM/Kimi/LinkAI,能处理文本、语音、图片和文件,可快速搭建个人AI助手和企业数字员工。
Python
zhayujie
Minimal Future Tech
agent/prompt/workspace.py
Python
""" Workspace Management - 工作空间管理模块 负责初始化工作空间、创建模板文件、加载上下文文件 """ from __future__ import annotations import os import json from typing import List, Optional, Dict from dataclasses import dataclass from common.log import logger from .builder import ContextFile # 默认文件名常量 DEFAULT_AGENT_FILENAME = "AGENT.md" DEFAULT_US...
zhayujie/chatgpt-on-wechat
41,284
CowAgent是基于大模型的超级AI助理,能主动思考和任务规划、访问操作系统和外部资源、创造和执行Skills、拥有长期记忆并不断成长。同时支持飞书、钉钉、企业微信应用、微信公众号、网页等接入,可选择OpenAI/Claude/Gemini/DeepSeek/ Qwen/GLM/Kimi/LinkAI,能处理文本、语音、图片和文件,可快速搭建个人AI助手和企业数字员工。
Python
zhayujie
Minimal Future Tech
agent/protocol/__init__.py
Python
from .agent import Agent from .agent_stream import AgentStreamExecutor from .task import Task, TaskType, TaskStatus from .result import AgentResult, AgentAction, AgentActionType, ToolResult from .models import LLMModel, LLMRequest, ModelFactory __all__ = [ 'Agent', 'AgentStreamExecutor', 'Task', 'Tas...
zhayujie/chatgpt-on-wechat
41,284
CowAgent是基于大模型的超级AI助理,能主动思考和任务规划、访问操作系统和外部资源、创造和执行Skills、拥有长期记忆并不断成长。同时支持飞书、钉钉、企业微信应用、微信公众号、网页等接入,可选择OpenAI/Claude/Gemini/DeepSeek/ Qwen/GLM/Kimi/LinkAI,能处理文本、语音、图片和文件,可快速搭建个人AI助手和企业数字员工。
Python
zhayujie
Minimal Future Tech
agent/protocol/agent.py
Python
import json import time import threading from common.log import logger from agent.protocol.models import LLMRequest, LLMModel from agent.protocol.agent_stream import AgentStreamExecutor from agent.protocol.result import AgentAction, AgentActionType, ToolResult, AgentResult from agent.tools.base_tool import BaseTool, T...
zhayujie/chatgpt-on-wechat
41,284
CowAgent是基于大模型的超级AI助理,能主动思考和任务规划、访问操作系统和外部资源、创造和执行Skills、拥有长期记忆并不断成长。同时支持飞书、钉钉、企业微信应用、微信公众号、网页等接入,可选择OpenAI/Claude/Gemini/DeepSeek/ Qwen/GLM/Kimi/LinkAI,能处理文本、语音、图片和文件,可快速搭建个人AI助手和企业数字员工。
Python
zhayujie
Minimal Future Tech
agent/protocol/agent_stream.py
Python
""" Agent Stream Execution Module - Multi-turn reasoning based on tool-call Provides streaming output, event system, and complete tool-call loop """ import json import time from typing import List, Dict, Any, Optional, Callable, Tuple from agent.protocol.models import LLMRequest, LLMModel from agent.tools.base_tool i...
zhayujie/chatgpt-on-wechat
41,284
CowAgent是基于大模型的超级AI助理,能主动思考和任务规划、访问操作系统和外部资源、创造和执行Skills、拥有长期记忆并不断成长。同时支持飞书、钉钉、企业微信应用、微信公众号、网页等接入,可选择OpenAI/Claude/Gemini/DeepSeek/ Qwen/GLM/Kimi/LinkAI,能处理文本、语音、图片和文件,可快速搭建个人AI助手和企业数字员工。
Python
zhayujie
Minimal Future Tech
agent/protocol/context.py
Python
class TeamContext: def __init__(self, name: str, description: str, rule: str, agents: list, max_steps: int = 100): """ Initialize the TeamContext with a name, description, rules, a list of agents, and a user question. :param name: The name of the group context. :param description: A ...
zhayujie/chatgpt-on-wechat
41,284
CowAgent是基于大模型的超级AI助理,能主动思考和任务规划、访问操作系统和外部资源、创造和执行Skills、拥有长期记忆并不断成长。同时支持飞书、钉钉、企业微信应用、微信公众号、网页等接入,可选择OpenAI/Claude/Gemini/DeepSeek/ Qwen/GLM/Kimi/LinkAI,能处理文本、语音、图片和文件,可快速搭建个人AI助手和企业数字员工。
Python
zhayujie
Minimal Future Tech
agent/protocol/models.py
Python
""" Models module for agent system. Provides basic model classes needed by tools and bridge integration. """ from typing import Any, Dict, List, Optional class LLMRequest: """Request model for LLM operations""" def __init__(self, messages: List[Dict[str, str]] = None, model: Optional[str] = None, ...
zhayujie/chatgpt-on-wechat
41,284
CowAgent是基于大模型的超级AI助理,能主动思考和任务规划、访问操作系统和外部资源、创造和执行Skills、拥有长期记忆并不断成长。同时支持飞书、钉钉、企业微信应用、微信公众号、网页等接入,可选择OpenAI/Claude/Gemini/DeepSeek/ Qwen/GLM/Kimi/LinkAI,能处理文本、语音、图片和文件,可快速搭建个人AI助手和企业数字员工。
Python
zhayujie
Minimal Future Tech
agent/protocol/result.py
Python
from __future__ import annotations import time import uuid from dataclasses import dataclass, field from enum import Enum from typing import List, Dict, Any, Optional from agent.protocol.task import Task, TaskStatus class AgentActionType(Enum): """Enum representing different types of agent actions.""" TOOL_U...
zhayujie/chatgpt-on-wechat
41,284
CowAgent是基于大模型的超级AI助理,能主动思考和任务规划、访问操作系统和外部资源、创造和执行Skills、拥有长期记忆并不断成长。同时支持飞书、钉钉、企业微信应用、微信公众号、网页等接入,可选择OpenAI/Claude/Gemini/DeepSeek/ Qwen/GLM/Kimi/LinkAI,能处理文本、语音、图片和文件,可快速搭建个人AI助手和企业数字员工。
Python
zhayujie
Minimal Future Tech
agent/protocol/task.py
Python
from __future__ import annotations import time import uuid from dataclasses import dataclass, field from enum import Enum from typing import Dict, Any, List class TaskType(Enum): """Enum representing different types of tasks.""" TEXT = "text" IMAGE = "image" VIDEO = "video" AUDIO = "audio" FIL...
zhayujie/chatgpt-on-wechat
41,284
CowAgent是基于大模型的超级AI助理,能主动思考和任务规划、访问操作系统和外部资源、创造和执行Skills、拥有长期记忆并不断成长。同时支持飞书、钉钉、企业微信应用、微信公众号、网页等接入,可选择OpenAI/Claude/Gemini/DeepSeek/ Qwen/GLM/Kimi/LinkAI,能处理文本、语音、图片和文件,可快速搭建个人AI助手和企业数字员工。
Python
zhayujie
Minimal Future Tech
agent/skills/__init__.py
Python
""" Skills module for agent system. This module provides the framework for loading, managing, and executing skills. Skills are markdown files with frontmatter that provide specialized instructions for specific tasks. """ from agent.skills.types import ( Skill, SkillEntry, SkillMetadata, SkillInstallSp...
zhayujie/chatgpt-on-wechat
41,284
CowAgent是基于大模型的超级AI助理,能主动思考和任务规划、访问操作系统和外部资源、创造和执行Skills、拥有长期记忆并不断成长。同时支持飞书、钉钉、企业微信应用、微信公众号、网页等接入,可选择OpenAI/Claude/Gemini/DeepSeek/ Qwen/GLM/Kimi/LinkAI,能处理文本、语音、图片和文件,可快速搭建个人AI助手和企业数字员工。
Python
zhayujie
Minimal Future Tech
agent/skills/config.py
Python
""" Configuration support for skills. """ import os import platform from typing import Dict, Optional, List from agent.skills.types import SkillEntry def resolve_runtime_platform() -> str: """Get the current runtime platform.""" return platform.system().lower() def has_binary(bin_name: str) -> bool: ""...
zhayujie/chatgpt-on-wechat
41,284
CowAgent是基于大模型的超级AI助理,能主动思考和任务规划、访问操作系统和外部资源、创造和执行Skills、拥有长期记忆并不断成长。同时支持飞书、钉钉、企业微信应用、微信公众号、网页等接入,可选择OpenAI/Claude/Gemini/DeepSeek/ Qwen/GLM/Kimi/LinkAI,能处理文本、语音、图片和文件,可快速搭建个人AI助手和企业数字员工。
Python
zhayujie
Minimal Future Tech
agent/skills/formatter.py
Python
""" Skill formatter for generating prompts from skills. """ from typing import List from agent.skills.types import Skill, SkillEntry def format_skills_for_prompt(skills: List[Skill]) -> str: """ Format skills for inclusion in a system prompt. Uses XML format per Agent Skills standard. Skills wit...
zhayujie/chatgpt-on-wechat
41,284
CowAgent是基于大模型的超级AI助理,能主动思考和任务规划、访问操作系统和外部资源、创造和执行Skills、拥有长期记忆并不断成长。同时支持飞书、钉钉、企业微信应用、微信公众号、网页等接入,可选择OpenAI/Claude/Gemini/DeepSeek/ Qwen/GLM/Kimi/LinkAI,能处理文本、语音、图片和文件,可快速搭建个人AI助手和企业数字员工。
Python
zhayujie
Minimal Future Tech
agent/skills/frontmatter.py
Python
""" Frontmatter parsing for skills. """ import re import json from typing import Dict, Any, Optional, List from agent.skills.types import SkillMetadata, SkillInstallSpec def parse_frontmatter(content: str) -> Dict[str, Any]: """ Parse YAML-style frontmatter from markdown content. Returns a dictionar...
zhayujie/chatgpt-on-wechat
41,284
CowAgent是基于大模型的超级AI助理,能主动思考和任务规划、访问操作系统和外部资源、创造和执行Skills、拥有长期记忆并不断成长。同时支持飞书、钉钉、企业微信应用、微信公众号、网页等接入,可选择OpenAI/Claude/Gemini/DeepSeek/ Qwen/GLM/Kimi/LinkAI,能处理文本、语音、图片和文件,可快速搭建个人AI助手和企业数字员工。
Python
zhayujie
Minimal Future Tech
agent/skills/loader.py
Python
""" Skill loader for discovering and loading skills from directories. """ import os from pathlib import Path from typing import List, Optional, Dict from common.log import logger from agent.skills.types import Skill, SkillEntry, LoadSkillsResult, SkillMetadata from agent.skills.frontmatter import parse_frontmatter, pa...
zhayujie/chatgpt-on-wechat
41,284
CowAgent是基于大模型的超级AI助理,能主动思考和任务规划、访问操作系统和外部资源、创造和执行Skills、拥有长期记忆并不断成长。同时支持飞书、钉钉、企业微信应用、微信公众号、网页等接入,可选择OpenAI/Claude/Gemini/DeepSeek/ Qwen/GLM/Kimi/LinkAI,能处理文本、语音、图片和文件,可快速搭建个人AI助手和企业数字员工。
Python
zhayujie
Minimal Future Tech
agent/skills/manager.py
Python
""" Skill manager for managing skill lifecycle and operations. """ import os from typing import Dict, List, Optional from pathlib import Path from common.log import logger from agent.skills.types import Skill, SkillEntry, SkillSnapshot from agent.skills.loader import SkillLoader from agent.skills.formatter import form...
zhayujie/chatgpt-on-wechat
41,284
CowAgent是基于大模型的超级AI助理,能主动思考和任务规划、访问操作系统和外部资源、创造和执行Skills、拥有长期记忆并不断成长。同时支持飞书、钉钉、企业微信应用、微信公众号、网页等接入,可选择OpenAI/Claude/Gemini/DeepSeek/ Qwen/GLM/Kimi/LinkAI,能处理文本、语音、图片和文件,可快速搭建个人AI助手和企业数字员工。
Python
zhayujie
Minimal Future Tech
agent/skills/types.py
Python
""" Type definitions for skills system. """ from __future__ import annotations from typing import Dict, List, Optional, Any from dataclasses import dataclass, field @dataclass class SkillInstallSpec: """Specification for installing skill dependencies.""" kind: str # brew, pip, npm, download, etc. id: Op...
zhayujie/chatgpt-on-wechat
41,284
CowAgent是基于大模型的超级AI助理,能主动思考和任务规划、访问操作系统和外部资源、创造和执行Skills、拥有长期记忆并不断成长。同时支持飞书、钉钉、企业微信应用、微信公众号、网页等接入,可选择OpenAI/Claude/Gemini/DeepSeek/ Qwen/GLM/Kimi/LinkAI,能处理文本、语音、图片和文件,可快速搭建个人AI助手和企业数字员工。
Python
zhayujie
Minimal Future Tech
agent/tools/__init__.py
Python
# Import base tool from agent.tools.base_tool import BaseTool from agent.tools.tool_manager import ToolManager # Import file operation tools from agent.tools.read.read import Read from agent.tools.write.write import Write from agent.tools.edit.edit import Edit from agent.tools.bash.bash import Bash from agent.tools.ls...
zhayujie/chatgpt-on-wechat
41,284
CowAgent是基于大模型的超级AI助理,能主动思考和任务规划、访问操作系统和外部资源、创造和执行Skills、拥有长期记忆并不断成长。同时支持飞书、钉钉、企业微信应用、微信公众号、网页等接入,可选择OpenAI/Claude/Gemini/DeepSeek/ Qwen/GLM/Kimi/LinkAI,能处理文本、语音、图片和文件,可快速搭建个人AI助手和企业数字员工。
Python
zhayujie
Minimal Future Tech
agent/tools/base_tool.py
Python
from enum import Enum from typing import Any, Optional from common.log import logger import copy class ToolStage(Enum): """Enum representing tool decision stages""" PRE_PROCESS = "pre_process" # Tools that need to be actively selected by the agent POST_PROCESS = "post_process" # Tools that automatically...
zhayujie/chatgpt-on-wechat
41,284
CowAgent是基于大模型的超级AI助理,能主动思考和任务规划、访问操作系统和外部资源、创造和执行Skills、拥有长期记忆并不断成长。同时支持飞书、钉钉、企业微信应用、微信公众号、网页等接入,可选择OpenAI/Claude/Gemini/DeepSeek/ Qwen/GLM/Kimi/LinkAI,能处理文本、语音、图片和文件,可快速搭建个人AI助手和企业数字员工。
Python
zhayujie
Minimal Future Tech
agent/tools/bash/__init__.py
Python
from .bash import Bash __all__ = ['Bash']
zhayujie/chatgpt-on-wechat
41,284
CowAgent是基于大模型的超级AI助理,能主动思考和任务规划、访问操作系统和外部资源、创造和执行Skills、拥有长期记忆并不断成长。同时支持飞书、钉钉、企业微信应用、微信公众号、网页等接入,可选择OpenAI/Claude/Gemini/DeepSeek/ Qwen/GLM/Kimi/LinkAI,能处理文本、语音、图片和文件,可快速搭建个人AI助手和企业数字员工。
Python
zhayujie
Minimal Future Tech
agent/tools/bash/bash.py
Python
""" Bash tool - Execute bash commands """ import os import sys import subprocess import tempfile from typing import Dict, Any from agent.tools.base_tool import BaseTool, ToolResult from agent.tools.utils.truncate import truncate_tail, format_size, DEFAULT_MAX_LINES, DEFAULT_MAX_BYTES from common.log import logger fro...
zhayujie/chatgpt-on-wechat
41,284
CowAgent是基于大模型的超级AI助理,能主动思考和任务规划、访问操作系统和外部资源、创造和执行Skills、拥有长期记忆并不断成长。同时支持飞书、钉钉、企业微信应用、微信公众号、网页等接入,可选择OpenAI/Claude/Gemini/DeepSeek/ Qwen/GLM/Kimi/LinkAI,能处理文本、语音、图片和文件,可快速搭建个人AI助手和企业数字员工。
Python
zhayujie
Minimal Future Tech
agent/tools/browser_tool.py
Python
def copy(self): """ Special copy method for browser tool to avoid recreating browser instance. :return: A new instance with shared browser reference but unique model """ new_tool = self.__class__() # Copy essential attributes new_tool.model = self.model new_tool.context = getat...
zhayujie/chatgpt-on-wechat
41,284
CowAgent是基于大模型的超级AI助理,能主动思考和任务规划、访问操作系统和外部资源、创造和执行Skills、拥有长期记忆并不断成长。同时支持飞书、钉钉、企业微信应用、微信公众号、网页等接入,可选择OpenAI/Claude/Gemini/DeepSeek/ Qwen/GLM/Kimi/LinkAI,能处理文本、语音、图片和文件,可快速搭建个人AI助手和企业数字员工。
Python
zhayujie
Minimal Future Tech
agent/tools/edit/__init__.py
Python
from .edit import Edit __all__ = ['Edit']
zhayujie/chatgpt-on-wechat
41,284
CowAgent是基于大模型的超级AI助理,能主动思考和任务规划、访问操作系统和外部资源、创造和执行Skills、拥有长期记忆并不断成长。同时支持飞书、钉钉、企业微信应用、微信公众号、网页等接入,可选择OpenAI/Claude/Gemini/DeepSeek/ Qwen/GLM/Kimi/LinkAI,能处理文本、语音、图片和文件,可快速搭建个人AI助手和企业数字员工。
Python
zhayujie
Minimal Future Tech
agent/tools/edit/edit.py
Python
""" Edit tool - Precise file editing Edit files through exact text replacement """ import os from typing import Dict, Any from agent.tools.base_tool import BaseTool, ToolResult from common.utils import expand_path from agent.tools.utils.diff import ( strip_bom, detect_line_ending, normalize_to_lf, res...
zhayujie/chatgpt-on-wechat
41,284
CowAgent是基于大模型的超级AI助理,能主动思考和任务规划、访问操作系统和外部资源、创造和执行Skills、拥有长期记忆并不断成长。同时支持飞书、钉钉、企业微信应用、微信公众号、网页等接入,可选择OpenAI/Claude/Gemini/DeepSeek/ Qwen/GLM/Kimi/LinkAI,能处理文本、语音、图片和文件,可快速搭建个人AI助手和企业数字员工。
Python
zhayujie
Minimal Future Tech
agent/tools/env_config/__init__.py
Python
from agent.tools.env_config.env_config import EnvConfig __all__ = ['EnvConfig']
zhayujie/chatgpt-on-wechat
41,284
CowAgent是基于大模型的超级AI助理,能主动思考和任务规划、访问操作系统和外部资源、创造和执行Skills、拥有长期记忆并不断成长。同时支持飞书、钉钉、企业微信应用、微信公众号、网页等接入,可选择OpenAI/Claude/Gemini/DeepSeek/ Qwen/GLM/Kimi/LinkAI,能处理文本、语音、图片和文件,可快速搭建个人AI助手和企业数字员工。
Python
zhayujie
Minimal Future Tech
agent/tools/env_config/env_config.py
Python
""" Environment Configuration Tool - Manage API keys and environment variables """ import os import re from typing import Dict, Any from pathlib import Path from agent.tools.base_tool import BaseTool, ToolResult from common.log import logger from common.utils import expand_path # API Key 知识库:常见的环境变量及其描述 API_KEY_REG...
zhayujie/chatgpt-on-wechat
41,284
CowAgent是基于大模型的超级AI助理,能主动思考和任务规划、访问操作系统和外部资源、创造和执行Skills、拥有长期记忆并不断成长。同时支持飞书、钉钉、企业微信应用、微信公众号、网页等接入,可选择OpenAI/Claude/Gemini/DeepSeek/ Qwen/GLM/Kimi/LinkAI,能处理文本、语音、图片和文件,可快速搭建个人AI助手和企业数字员工。
Python
zhayujie
Minimal Future Tech
agent/tools/ls/__init__.py
Python
from .ls import Ls __all__ = ['Ls']
zhayujie/chatgpt-on-wechat
41,284
CowAgent是基于大模型的超级AI助理,能主动思考和任务规划、访问操作系统和外部资源、创造和执行Skills、拥有长期记忆并不断成长。同时支持飞书、钉钉、企业微信应用、微信公众号、网页等接入,可选择OpenAI/Claude/Gemini/DeepSeek/ Qwen/GLM/Kimi/LinkAI,能处理文本、语音、图片和文件,可快速搭建个人AI助手和企业数字员工。
Python
zhayujie
Minimal Future Tech
agent/tools/ls/ls.py
Python
""" Ls tool - List directory contents """ import os from typing import Dict, Any from agent.tools.base_tool import BaseTool, ToolResult from agent.tools.utils.truncate import truncate_head, format_size, DEFAULT_MAX_BYTES from common.utils import expand_path DEFAULT_LIMIT = 500 class Ls(BaseTool): """Tool for ...
zhayujie/chatgpt-on-wechat
41,284
CowAgent是基于大模型的超级AI助理,能主动思考和任务规划、访问操作系统和外部资源、创造和执行Skills、拥有长期记忆并不断成长。同时支持飞书、钉钉、企业微信应用、微信公众号、网页等接入,可选择OpenAI/Claude/Gemini/DeepSeek/ Qwen/GLM/Kimi/LinkAI,能处理文本、语音、图片和文件,可快速搭建个人AI助手和企业数字员工。
Python
zhayujie
Minimal Future Tech
agent/tools/memory/__init__.py
Python
""" Memory tools for Agent Provides memory_search and memory_get tools """ from agent.tools.memory.memory_search import MemorySearchTool from agent.tools.memory.memory_get import MemoryGetTool __all__ = ['MemorySearchTool', 'MemoryGetTool']
zhayujie/chatgpt-on-wechat
41,284
CowAgent是基于大模型的超级AI助理,能主动思考和任务规划、访问操作系统和外部资源、创造和执行Skills、拥有长期记忆并不断成长。同时支持飞书、钉钉、企业微信应用、微信公众号、网页等接入,可选择OpenAI/Claude/Gemini/DeepSeek/ Qwen/GLM/Kimi/LinkAI,能处理文本、语音、图片和文件,可快速搭建个人AI助手和企业数字员工。
Python
zhayujie
Minimal Future Tech
agent/tools/memory/memory_get.py
Python
""" Memory get tool Allows agents to read specific sections from memory files """ from agent.tools.base_tool import BaseTool class MemoryGetTool(BaseTool): """Tool for reading memory file contents""" name: str = "memory_get" description: str = ( "Read specific content from memory files. " ...
zhayujie/chatgpt-on-wechat
41,284
CowAgent是基于大模型的超级AI助理,能主动思考和任务规划、访问操作系统和外部资源、创造和执行Skills、拥有长期记忆并不断成长。同时支持飞书、钉钉、企业微信应用、微信公众号、网页等接入,可选择OpenAI/Claude/Gemini/DeepSeek/ Qwen/GLM/Kimi/LinkAI,能处理文本、语音、图片和文件,可快速搭建个人AI助手和企业数字员工。
Python
zhayujie
Minimal Future Tech
agent/tools/memory/memory_search.py
Python
""" Memory search tool Allows agents to search their memory using semantic and keyword search """ from typing import Dict, Any, Optional from agent.tools.base_tool import BaseTool class MemorySearchTool(BaseTool): """Tool for searching agent memory""" name: str = "memory_search" description: str = ...
zhayujie/chatgpt-on-wechat
41,284
CowAgent是基于大模型的超级AI助理,能主动思考和任务规划、访问操作系统和外部资源、创造和执行Skills、拥有长期记忆并不断成长。同时支持飞书、钉钉、企业微信应用、微信公众号、网页等接入,可选择OpenAI/Claude/Gemini/DeepSeek/ Qwen/GLM/Kimi/LinkAI,能处理文本、语音、图片和文件,可快速搭建个人AI助手和企业数字员工。
Python
zhayujie
Minimal Future Tech
agent/tools/read/__init__.py
Python
from .read import Read __all__ = ['Read']
zhayujie/chatgpt-on-wechat
41,284
CowAgent是基于大模型的超级AI助理,能主动思考和任务规划、访问操作系统和外部资源、创造和执行Skills、拥有长期记忆并不断成长。同时支持飞书、钉钉、企业微信应用、微信公众号、网页等接入,可选择OpenAI/Claude/Gemini/DeepSeek/ Qwen/GLM/Kimi/LinkAI,能处理文本、语音、图片和文件,可快速搭建个人AI助手和企业数字员工。
Python
zhayujie
Minimal Future Tech
agent/tools/read/read.py
Python
""" Read tool - Read file contents Supports text files, images (jpg, png, gif, webp), and PDF files """ import os from typing import Dict, Any from pathlib import Path from agent.tools.base_tool import BaseTool, ToolResult from agent.tools.utils.truncate import truncate_head, format_size, DEFAULT_MAX_LINES, DEFAULT_M...
zhayujie/chatgpt-on-wechat
41,284
CowAgent是基于大模型的超级AI助理,能主动思考和任务规划、访问操作系统和外部资源、创造和执行Skills、拥有长期记忆并不断成长。同时支持飞书、钉钉、企业微信应用、微信公众号、网页等接入,可选择OpenAI/Claude/Gemini/DeepSeek/ Qwen/GLM/Kimi/LinkAI,能处理文本、语音、图片和文件,可快速搭建个人AI助手和企业数字员工。
Python
zhayujie
Minimal Future Tech
agent/tools/scheduler/__init__.py
Python
""" Scheduler tool for managing scheduled tasks """ from .scheduler_tool import SchedulerTool __all__ = ["SchedulerTool"]
zhayujie/chatgpt-on-wechat
41,284
CowAgent是基于大模型的超级AI助理,能主动思考和任务规划、访问操作系统和外部资源、创造和执行Skills、拥有长期记忆并不断成长。同时支持飞书、钉钉、企业微信应用、微信公众号、网页等接入,可选择OpenAI/Claude/Gemini/DeepSeek/ Qwen/GLM/Kimi/LinkAI,能处理文本、语音、图片和文件,可快速搭建个人AI助手和企业数字员工。
Python
zhayujie
Minimal Future Tech