chore: 清理重构后的旧架构残留文件

移除已废弃的 agent 定义、命令配置和脚本文件,这些文件在之前的多源数据入库架构重构后已不再使用。

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-01-10 11:50:33 +08:00
co-authored by Claude
parent 2d3796da43
commit 6b4189291c
10 changed files with 0 additions and 1902 deletions
-181
View File
@@ -1,181 +0,0 @@
const http = require('http');
const markdownContent = `# AutoGen
## 🎯 项目简介
**AutoGen** 是一个由微软开发的**多智能体 AI 应用程序框架**,可以创建能够自主工作或与人类协作的智能体。
### ✨ 核心特性
- **核心 API**:实现消息传递、事件驱动智能体以及本地和分布式运行时
- **AgentChat API**:提供更简单但更具主见的 API,用于快速原型设计
- **扩展 API**:支持 LLM 客户端的特定实现(如 OpenAI、Azure OpenAI
- **AutoGen Studio**:用于构建多智能体应用程序的无代码 GUI
- **AutoGen Bench**:用于评估智能体性能的基准测试套件
## 📦 安装方式
\`\`\`bash
# 使用 pip 安装
pip install -U "autogen-agentchat" "autogen-ext[openai]"
# 安装 AutoGen Studio
pip install -U "autogenstudio"
\`\`\`
> 💡 **提示**AutoGen 需要 **Python 3.10 或更高版本**
## 🚀 快速开始
### Hello World 示例
\`\`\`python
import asyncio
from autogen_agentchat.agents import AssistantAgent
from autogen_ext.models.openai import OpenAIChatCompletionClient
async def main() -> None:
model_client = OpenAIChatCompletionClient(model="gpt-4o")
agent = AssistantAgent("assistant", model_client=model_client)
print(await agent.run(task="Say 'Hello World!'"))
await model_client.close()
asyncio.run(main())
\`\`\`
## 📊 功能对比
| 特性 | AutoGen | LangChain | CrewAI |
|------|---------|-----------|--------|
| 多智能体协作 | ✅ | ✅ | ✅ |
| 无代码 GUI | ✅ | ❌ | ❌ |
| 分布式运行时 | ✅ | ❌ | ❌ |
| .NET 支持 | ✅ | ❌ | ❌ |
| 基准测试套件 | ✅ | ❌ | ❌ |
## 🔧 高级用法
### 多智能体编排
使用 \`AgentTool\` 创建基本的多智能体编排设置:
\`\`\`python
import asyncio
from autogen_agentchat.agents import AssistantAgent
from autogen_agentchat.tools import AgentTool
from autogen_ext.models.openai import OpenAIChatCompletionClient
async def main() -> None:
model_client = OpenAIChatCompletionClient(model="gpt-4o")
# 创建数学专家智能体
math_agent = AssistantAgent(
"math_expert",
model_client=model_client,
system_message="You are a math expert.",
description="A math expert assistant.",
)
# 创建化学专家智能体
chemistry_agent = AssistantAgent(
"chemistry_expert",
model_client=model_client,
system_message="You are a chemistry expert.",
description="A chemistry expert assistant.",
)
print("智能体创建成功!")
\`\`\`
## 📚 任务清单
- [x] 安装 AutoGen
- [ ] 创建第一个智能体
- [ ] 配置 OpenAI API
- [ ] 运行多智能体对话
- [ ] 部署到生产环境
## 🎓 学习资源
1. [官方文档](https://microsoft.github.io/autogen/)
2. [GitHub 仓库](https://github.com/microsoft/autogen)
3. [API 参考](https://microsoft.github.io/autogen/docs/reference)
4. [示例代码](https://github.com/microsoft/autogen/tree/main/samples)
## 💬 常见问题
### Q: AutoGen 是免费的吗?
**A**: 是的!AutoGen 使用 MIT 许可证,完全开源免费。
### Q: 支持哪些 LLM 提供商?
**A**: AutoGen 支持 OpenAI、Azure OpenAI,以及通过扩展 API 支持其他提供商。
---
## 📄 许可证
MIT License - 详见 [LICENSE](https://github.com/microsoft/autogen/blob/main/LICENSE) 文件
**Made with ❤️ by Microsoft**
`;
const data = JSON.stringify({
apiKey: 'sk_live_agent_park_webhook_key_2025',
projects: [{
name: 'AutoGen',
nameEn: 'AutoGen',
description: 'Microsoft 开发的多智能体 AI 应用程序框架,支持自主或与人类协作的智能体',
descriptionEn: 'A programming framework for creating multi-agent AI applications that can act autonomously or work alongside humans',
content: markdownContent,
contentEn: markdownContent, // 使用相同内容用于测试
status: 'ACTIVE',
source: 'GitHub',
tags: [
{ name: '多智能体', nameEn: 'Multi-Agent' },
{ name: '框架', nameEn: 'Framework' },
{ name: '微软', nameEn: 'Microsoft' },
{ name: 'Python', nameEn: 'Python' },
{ name: 'AI', nameEn: 'AI' },
{ name: 'LLM', nameEn: 'LLM' }
],
links: [
{ type: 'GITHUB', url: 'https://github.com/microsoft/autogen', title: 'GitHub 仓库' },
{ type: 'WEBSITE', url: 'https://microsoft.github.io/autogen/', title: '官方文档' },
{ type: 'WEBSITE', url: 'https://pypi.org/project/autogen-agentchat/', title: 'PyPI 包' }
]
}]
});
const options = {
hostname: '127.0.0.1',
port: 3001,
path: '/api/webhook/projects',
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Content-Length': Buffer.byteLength(data)
}
};
const req = http.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log('Status:', res.statusCode);
console.log('Response:', responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.write(data);
req.end();
-59
View File
@@ -1,59 +0,0 @@
const http = require('http');
const data = JSON.stringify({
apiKey: 'sk_live_agent_park_webhook_key_2025',
projects: [{
name: 'AutoGen',
nameEn: 'AutoGen',
description: 'Microsoft 开发的多智能体 AI 应用程序框架,支持自主或与人类协作的智能体',
descriptionEn: 'A programming framework for creating multi-agent AI applications that can act autonomously or work alongside humans',
content: 'AutoGen 是一个由微软开发的创建多智能体 AI 应用程序的框架。主要特性:\n\n1. 核心 API:实现消息传递、事件驱动智能体以及本地和分布式运行时\n2. AgentChat API:提供更简单但更具主见的 API,用于快速原型设计\n3. 扩展 API:支持 LLM 客户端的特定实现(如 OpenAI、Azure OpenAI\n4. AutoGen Studio:用于构建多智能体应用程序的无代码 GUI\n5. AutoGen Bench:用于评估智能体性能的基准测试套件\n\n支持 Python 3.10+ 和 .NET,使用 MIT 许可证。',
contentEn: 'AutoGen is a framework for creating multi-agent AI applications. Key features: Core API, AgentChat API, Extensions API, AutoGen Studio, AutoGen Bench. Supports Python 3.10+ and .NET. MIT licensed.',
status: 'ACTIVE',
source: 'GitHub',
tags: [
{ name: '多智能体', nameEn: 'Multi-Agent' },
{ name: '框架', nameEn: 'Framework' },
{ name: '微软', nameEn: 'Microsoft' },
{ name: 'Python', nameEn: 'Python' },
{ name: 'AI', nameEn: 'AI' },
{ name: 'LLM', nameEn: 'LLM' }
],
links: [
{ type: 'GITHUB', url: 'https://github.com/microsoft/autogen', title: 'GitHub 仓库' },
{ type: 'WEBSITE', url: 'https://microsoft.github.io/autogen/', title: '官方文档' },
{ type: 'WEBSITE', url: 'https://pypi.org/project/autogen-agentchat/', title: 'PyPI 包' }
]
}]
});
const options = {
hostname: '127.0.0.1',
port: 3001,
path: '/api/webhook/projects',
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Content-Length': Buffer.byteLength(data)
}
};
const req = http.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log('Status:', res.statusCode);
console.log('Response:', responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.write(data);
req.end();
-113
View File
@@ -1,113 +0,0 @@
// Simple Hugging Face scraper
const https = require('https');
const { HttpsProxyAgent } = require('https-proxy-agent');
async function scrapeHuggingFace() {
try {
console.log('Fetching Hugging Face models page...');
const proxyUrl = process.env.HTTPS_PROXY || process.env.HTTP_PROXY;
const agent = proxyUrl ? new HttpsProxyAgent(proxyUrl) : undefined;
const html = await new Promise((resolve, reject) => {
const options = {
headers: {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'Accept-Language': 'en-US,en;q=0.9',
}
};
if (agent) {
options.agent = agent;
}
const req = https.get('https://huggingface.co/models', options, (res) => {
let data = '';
res.on('data', chunk => data += chunk);
res.on('end', () => {
if (res.statusCode === 200) {
resolve(data);
} else {
reject(new Error(`HTTP ${res.statusCode}: ${res.statusMessage}`));
}
});
});
req.on('error', reject);
req.setTimeout(30000, () => {
req.destroy();
reject(new Error('Request timeout'));
});
});
console.log(`Page fetched successfully, size: ${html.length} bytes`);
// Extract model information
const models = [];
const modelLinkRegex = /<a\s+href="\/models\/([^"]+)"[^>]*>/gi;
const seenModels = new Set();
let match;
while ((match = modelLinkRegex.exec(html)) !== null) {
const modelId = decodeURIComponent(match[1]);
// Filter: must have org/model format
if (!modelId.includes('/')) continue;
if (modelId.includes('/discussions')) continue;
if (modelId.includes('/blob')) continue;
if (modelId.includes('/tree')) continue;
if (modelId.includes('/commit')) continue;
if (seenModels.has(modelId)) continue;
seenModels.add(modelId);
models.push({
source: 'huggingface',
name: modelId,
url: `https://huggingface.co/${modelId}`,
description: modelId,
metadata: {
likes: 0,
downloads: 0,
pipeline: ''
}
});
if (models.length >= 100) break;
}
console.log(`Extracted ${models.length} unique models`);
// Take first 25 (they should be roughly ordered by popularity on the page)
const topModels = models.slice(0, 25);
const fs = require('fs');
const outputPath = 'D:\\Code\\AI\\agent-park-v2\\.trending-workspace\\20260106-1226\\scraped-huggingface-projects.json';
fs.writeFileSync(outputPath, JSON.stringify(topModels, null, 2), 'utf8');
console.log(`\nData saved to: ${outputPath}`);
console.log('\nTop 25 Models:');
topModels.forEach((m, i) => {
console.log(`${i + 1}. ${m.name}`);
});
} catch (error) {
console.error('Error:', error.message);
// Output empty result on error
const fs = require('fs');
const outputPath = 'D:\\Code\\AI\\agent-park-v2\\.trending-workspace\\20260106-1226\\scraped-huggingface-projects.json';
const errorResult = {
error: error.message,
projects: [],
timestamp: new Date().toISOString()
};
fs.writeFileSync(outputPath, JSON.stringify(errorResult, null, 2), 'utf8');
console.log(`Error result saved to: ${outputPath}`);
}
}
scrapeHuggingFace();