diff --git a/frameworks/autogen/0.7.2/Dockerfile b/frameworks/autogen/0.7.2/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..8e3b81dafa1ac74492d51c54b6805505f21b193a --- /dev/null +++ b/frameworks/autogen/0.7.2/Dockerfile @@ -0,0 +1,23 @@ +FROM opencloudos/opencloudos9-minimal:latest + +LABEL maintainer="OpenCloudOS Community" +LABEL org.opencontainers.image.source="https://gitee.com/OpenCloudOS/ai-agent-container" +LABEL org.opencontainers.image.description="AutoGen 0.7.2 on OpenCloudOS 9" + +# Install Python and necessary dependencies +RUN dnf update -y && \ + dnf upgrade -y && \ + dnf install -y python3 python3-pip curl && \ + dnf clean all +# Set working directory +WORKDIR /app + +COPY requirements.txt ./requirements.txt + +RUN pip install -r ./requirements.txt + +# Copy the modified test script +COPY openai-test.py ./openai-test.py + +# Set the entrypoint to run the script +ENTRYPOINT ["python3", "openai-test.py"] diff --git a/frameworks/autogen/0.7.2/README.md b/frameworks/autogen/0.7.2/README.md new file mode 100644 index 0000000000000000000000000000000000000000..ed2ae277c7e49049b56a6bb641ec32fa9950310d --- /dev/null +++ b/frameworks/autogen/0.7.2/README.md @@ -0,0 +1,77 @@ +# AutoGen on OpenCloudOS 9 + +## 基本信息 + +- **框架版本**:0.7.2 +- **基础镜像**:opencloudos/opencloudos9-minimal:latest +- **Python 版本**:3.11 +- **框架名称**:AutoGen + +## 框架简介 + +AutoGen 是一个开源框架,用于构建多代理 AI 系统。它允许开发者创建能够自主协作的 AI 代理,以解决复杂的任务。AutoGen 支持多种模型提供商,并提供了丰富的工具和扩展。 + +更多信息请访问:[Microsoft AutoGen GitHub](https://github.com/microsoft/autogen) + +## 支持的模型 + +AutoGen 支持多种大型语言模型,包括: + +- **OpenAI**: GPT 系列模型 +- **Azure OpenAI**: Azure 托管的 OpenAI 模型 +- **Azure AI Foundry**: Azure AI Studio 托管的模型(如 Phi-4) +- **Anthropic**: Claude 系列模型(实验性) +- **Ollama**: 本地运行的模型(如 Llama 系列) +- **Gemini**: Google 的 Gemini 模型(通过 OpenAI 兼容 API) +- **Llama API**: Meta 的 Llama 模型 API +- **Semantic Kernel Adapter**: 支持 Anthropic、Google Gemini、Ollama、MistralAI、AWS、Hugging Face 等 + +**注意**:本容器仅提供了 OpenAI 兼容 API 的使用示例,其他模型需要根据 AutoGen 官方文档进行相应配置。 + +## 构建 + +```bash +docker build -t oc9-autogen:0.7.2 . +``` + +## 使用示例 + +构建镜像后,您可以使用以下命令运行容器: + +```bash +docker run --rm oc9-autogen:0.7.2 "您的任务描述" +``` + +例如: + +```bash +docker run --rm oc9-autogen:0.7.2 "2+2等于多少?" +``` + +如果需要自定义模型服务器地址,请使用环境变量 `BASE_URL`: + +```bash +docker run --rm -e BASE_URL="http://your-custom-server:port/v1" oc9-autogen:0.7.2 "您的任务描述" +``` + +### 测试用例 + +容器内包含一个测试用例脚本,用于验证"12+12=?"的计算: + +```bash +./test/test_12_plus_12.sh +``` + +该脚本将运行以下命令: + +```bash +docker run --rm oc9-autogen:0.7.2 "12+12=?" +``` + +容器将使用内置的本地模型(qwen/qwen3.5-9b)来处理您的查询。 + +## 已知问题 + +- 默认配置使用本地模型服务器(http://192.168.1.174:1234/v1)。如果您的环境不同,请通过环境变量 `BASE_URL` 设置自定义地址。 +- 确保本地模型服务器正在运行并且可访问。 +- 如果遇到网络问题,请检查防火墙设置。 diff --git a/frameworks/autogen/0.7.2/build.conf b/frameworks/autogen/0.7.2/build.conf new file mode 100644 index 0000000000000000000000000000000000000000..ecf6b15f8f86ad245b9c1badf767ea558b3f042e --- /dev/null +++ b/frameworks/autogen/0.7.2/build.conf @@ -0,0 +1,11 @@ +# Build configuration for AutoGen 0.7.2 +IMAGE_NAME=oc9-autogen +IMAGE_TAG=0.7.2 +BASE_IMAGE=opencloudos/opencloudos9-minimal:latest +MAINTAINER="OpenCloudOS Community" +DESCRIPTION="AutoGen 0.7.2 on OpenCloudOS 9" +SOURCE_URL=https://gitee.com/OpenCloudOS/ai-agent-container +PYTHON_VERSION=3.11 +FRAMEWORK_NAME=autogen +FRAMEWORK_VERSION=0.7.2 +GPU_TEST=false diff --git a/frameworks/autogen/0.7.2/openai-test.py b/frameworks/autogen/0.7.2/openai-test.py new file mode 100644 index 0000000000000000000000000000000000000000..75d3b019d76825b1db3de823f8d2a48fdadfe748 --- /dev/null +++ b/frameworks/autogen/0.7.2/openai-test.py @@ -0,0 +1,32 @@ +import asyncio +import os +import sys +from autogen_agentchat.agents import AssistantAgent +from autogen_ext.models.openai import OpenAIChatCompletionClient + +async def main() -> None: + # Get task from command line argument or default + task = sys.argv[1] if len(sys.argv) > 1 else "Say 'Hello World!'" + + # Get base_url from environment variable + base_url = os.environ.get('BASE_URL', 'http://192.168.1.174:1234/v1') + + model_client = OpenAIChatCompletionClient( + model="qwen/qwen3.5-9b", + api_key="any-key", + base_url=base_url, + model_info={ + "vision": False, + "function_calling": False, + "json_mode": False, + "json_output": False, + "family": "local" + } + ) + + agent = AssistantAgent("assistant", model_client=model_client) + print(await agent.run(task=task)) + await model_client.close() + +if __name__ == "__main__": + asyncio.run(main()) diff --git a/frameworks/autogen/0.7.2/requirements.txt b/frameworks/autogen/0.7.2/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..46ee9fc8e94996f43fa1b91ab7fd2ebda887eb4e --- /dev/null +++ b/frameworks/autogen/0.7.2/requirements.txt @@ -0,0 +1,2 @@ +autogen-agentchat==0.7.2 +autogen-ext[openai]==0.7.2 diff --git a/frameworks/autogen/0.7.2/test/test_12_plus_12.sh b/frameworks/autogen/0.7.2/test/test_12_plus_12.sh new file mode 100644 index 0000000000000000000000000000000000000000..3a4e610cc2cd9ef1e5409ee8ec2cf680e9c61419 --- /dev/null +++ b/frameworks/autogen/0.7.2/test/test_12_plus_12.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +# Test case for 12+12=? +echo "Running test case: 12+12=?" +docker run --rm oc9-autogen:0.7.2 "12+12=?" diff --git a/frameworks/autogen/0.7.2/test/test_12_plus_12_result.png b/frameworks/autogen/0.7.2/test/test_12_plus_12_result.png new file mode 100644 index 0000000000000000000000000000000000000000..bb21ece92938bf1e7bf17c1338e0a24da23c3061 Binary files /dev/null and b/frameworks/autogen/0.7.2/test/test_12_plus_12_result.png differ diff --git a/frameworks/autogen/0.7.3/Dockerfile b/frameworks/autogen/0.7.3/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..c34068d739f33d7754373ea4b7a4e2c446ffe465 --- /dev/null +++ b/frameworks/autogen/0.7.3/Dockerfile @@ -0,0 +1,23 @@ +FROM opencloudos/opencloudos9-minimal:latest + +LABEL maintainer="OpenCloudOS Community" +LABEL org.opencontainers.image.source="https://gitee.com/OpenCloudOS/ai-agent-container" +LABEL org.opencontainers.image.description="AutoGen 0.7.3 on OpenCloudOS 9" + +# Install Python and necessary dependencies +RUN dnf update -y && \ + dnf upgrade -y && \ + dnf install -y python3 python3-pip curl && \ + dnf clean all +# Set working directory +WORKDIR /app + +COPY requirements.txt ./requirements.txt + +RUN pip install -r ./requirements.txt + +# Copy the modified test script +COPY openai-test.py ./openai-test.py + +# Set the entrypoint to run the script +ENTRYPOINT ["python3", "openai-test.py"] diff --git a/frameworks/autogen/0.7.3/README.md b/frameworks/autogen/0.7.3/README.md new file mode 100644 index 0000000000000000000000000000000000000000..f7758e2ba502375ef31f6f611e6b95135edb8664 --- /dev/null +++ b/frameworks/autogen/0.7.3/README.md @@ -0,0 +1,77 @@ +# AutoGen on OpenCloudOS 9 + +## 基本信息 + +- **框架版本**:0.7.3 +- **基础镜像**:opencloudos/opencloudos9-minimal:latest +- **Python 版本**:3.11 +- **框架名称**:AutoGen + +## 框架简介 + +AutoGen 是一个开源框架,用于构建多代理 AI 系统。它允许开发者创建能够自主协作的 AI 代理,以解决复杂的任务。AutoGen 支持多种模型提供商,并提供了丰富的工具和扩展。 + +更多信息请访问:[Microsoft AutoGen GitHub](https://github.com/microsoft/autogen) + +## 支持的模型 + +AutoGen 支持多种大型语言模型,包括: + +- **OpenAI**: GPT 系列模型 +- **Azure OpenAI**: Azure 托管的 OpenAI 模型 +- **Azure AI Foundry**: Azure AI Studio 托管的模型(如 Phi-4) +- **Anthropic**: Claude 系列模型(实验性) +- **Ollama**: 本地运行的模型(如 Llama 系列) +- **Gemini**: Google 的 Gemini 模型(通过 OpenAI 兼容 API) +- **Llama API**: Meta 的 Llama 模型 API +- **Semantic Kernel Adapter**: 支持 Anthropic、Google Gemini、Ollama、MistralAI、AWS、Hugging Face 等 + +**注意**:本容器仅提供了 OpenAI 兼容 API 的使用示例,其他模型需要根据 AutoGen 官方文档进行相应配置。 + +## 构建 + +```bash +docker build -t oc9-autogen:0.7.3 . +``` + +## 使用示例 + +构建镜像后,您可以使用以下命令运行容器: + +```bash +docker run --rm oc9-autogen:0.7.3 "您的任务描述" +``` + +例如: + +```bash +docker run --rm oc9-autogen:0.7.3 "2+2等于多少?" +``` + +如果需要自定义模型服务器地址,请使用环境变量 `BASE_URL`: + +```bash +docker run --rm -e BASE_URL="http://your-custom-server:port/v1" oc9-autogen:0.7.3 "您的任务描述" +``` + +### 测试用例 + +容器内包含一个测试用例脚本,用于验证"12+12=?"的计算: + +```bash +./test/test_12_plus_12.sh +``` + +该脚本将运行以下命令: + +```bash +docker run --rm oc9-autogen:0.7.3 "12+12=?" +``` + +容器将使用内置的本地模型(qwen/qwen3.5-9b)来处理您的查询。 + +## 已知问题 + +- 默认配置使用本地模型服务器(http://192.168.1.174:1234/v1)。如果您的环境不同,请通过环境变量 `BASE_URL` 设置自定义地址。 +- 确保本地模型服务器正在运行并且可访问。 +- 如果遇到网络问题,请检查防火墙设置。 diff --git a/frameworks/autogen/0.7.3/build.conf b/frameworks/autogen/0.7.3/build.conf new file mode 100644 index 0000000000000000000000000000000000000000..a3760013fa0ed1921ec79d297ee42af9df27f830 --- /dev/null +++ b/frameworks/autogen/0.7.3/build.conf @@ -0,0 +1,11 @@ +# Build configuration for AutoGen 0.7.3 +IMAGE_NAME=oc9-autogen +IMAGE_TAG=0.7.3 +BASE_IMAGE=opencloudos/opencloudos9-minimal:latest +MAINTAINER="OpenCloudOS Community" +DESCRIPTION="AutoGen 0.7.3 on OpenCloudOS 9" +SOURCE_URL=https://gitee.com/OpenCloudOS/ai-agent-container +PYTHON_VERSION=3.11 +FRAMEWORK_NAME=autogen +FRAMEWORK_VERSION=0.7.3 +GPU_TEST=false diff --git a/frameworks/autogen/0.7.3/openai-test.py b/frameworks/autogen/0.7.3/openai-test.py new file mode 100644 index 0000000000000000000000000000000000000000..75d3b019d76825b1db3de823f8d2a48fdadfe748 --- /dev/null +++ b/frameworks/autogen/0.7.3/openai-test.py @@ -0,0 +1,32 @@ +import asyncio +import os +import sys +from autogen_agentchat.agents import AssistantAgent +from autogen_ext.models.openai import OpenAIChatCompletionClient + +async def main() -> None: + # Get task from command line argument or default + task = sys.argv[1] if len(sys.argv) > 1 else "Say 'Hello World!'" + + # Get base_url from environment variable + base_url = os.environ.get('BASE_URL', 'http://192.168.1.174:1234/v1') + + model_client = OpenAIChatCompletionClient( + model="qwen/qwen3.5-9b", + api_key="any-key", + base_url=base_url, + model_info={ + "vision": False, + "function_calling": False, + "json_mode": False, + "json_output": False, + "family": "local" + } + ) + + agent = AssistantAgent("assistant", model_client=model_client) + print(await agent.run(task=task)) + await model_client.close() + +if __name__ == "__main__": + asyncio.run(main()) diff --git a/frameworks/autogen/0.7.3/requirements.txt b/frameworks/autogen/0.7.3/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..9f40a4c84d3fb96b925dd8b7a5c46c82f6f98da5 --- /dev/null +++ b/frameworks/autogen/0.7.3/requirements.txt @@ -0,0 +1,2 @@ +autogen-agentchat==0.7.3 +autogen-ext[openai]==0.7.3 diff --git a/frameworks/autogen/0.7.3/test/test_12_plus_12.sh b/frameworks/autogen/0.7.3/test/test_12_plus_12.sh new file mode 100644 index 0000000000000000000000000000000000000000..45e8462c1e1de3c67932d65ff0d3266820390de0 --- /dev/null +++ b/frameworks/autogen/0.7.3/test/test_12_plus_12.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +# Test case for 12+12=? +echo "Running test case: 12+12=?" +docker run --rm oc9-autogen:0.7.3 "12+12=?" diff --git a/frameworks/autogen/0.7.3/test/test_12_plus_12_result.png b/frameworks/autogen/0.7.3/test/test_12_plus_12_result.png new file mode 100644 index 0000000000000000000000000000000000000000..afb0c394b6ec10ed32307e9445cdf1ea339e747a Binary files /dev/null and b/frameworks/autogen/0.7.3/test/test_12_plus_12_result.png differ diff --git a/frameworks/autogen/0.7.4/Dockerfile b/frameworks/autogen/0.7.4/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..583303ff30c94db6aed14d17e4f00e71d94d1152 --- /dev/null +++ b/frameworks/autogen/0.7.4/Dockerfile @@ -0,0 +1,23 @@ +FROM opencloudos/opencloudos9-minimal:latest + +LABEL maintainer="OpenCloudOS Community" +LABEL org.opencontainers.image.source="https://gitee.com/OpenCloudOS/ai-agent-container" +LABEL org.opencontainers.image.description="AutoGen 0.7.4 on OpenCloudOS 9" + +# Install Python and necessary dependencies +RUN dnf update -y && \ + dnf upgrade -y && \ + dnf install -y python3 python3-pip curl && \ + dnf clean all +# Set working directory +WORKDIR /app + +COPY requirements.txt ./requirements.txt + +RUN pip install -r ./requirements.txt + +# Copy the modified test script +COPY openai-test.py ./openai-test.py + +# Set the entrypoint to run the script +ENTRYPOINT ["python3", "openai-test.py"] diff --git a/frameworks/autogen/0.7.4/README.md b/frameworks/autogen/0.7.4/README.md new file mode 100644 index 0000000000000000000000000000000000000000..464cb512aa82a61aec96a7521a4a58924874d732 --- /dev/null +++ b/frameworks/autogen/0.7.4/README.md @@ -0,0 +1,77 @@ +# AutoGen on OpenCloudOS 9 + +## 基本信息 + +- **框架版本**:0.7.4 +- **基础镜像**:opencloudos/opencloudos9-minimal:latest +- **Python 版本**:3.11 +- **框架名称**:AutoGen + +## 框架简介 + +AutoGen 是一个开源框架,用于构建多代理 AI 系统。它允许开发者创建能够自主协作的 AI 代理,以解决复杂的任务。AutoGen 支持多种模型提供商,并提供了丰富的工具和扩展。 + +更多信息请访问:[Microsoft AutoGen GitHub](https://github.com/microsoft/autogen) + +## 支持的模型 + +AutoGen 支持多种大型语言模型,包括: + +- **OpenAI**: GPT 系列模型 +- **Azure OpenAI**: Azure 托管的 OpenAI 模型 +- **Azure AI Foundry**: Azure AI Studio 托管的模型(如 Phi-4) +- **Anthropic**: Claude 系列模型(实验性) +- **Ollama**: 本地运行的模型(如 Llama 系列) +- **Gemini**: Google 的 Gemini 模型(通过 OpenAI 兼容 API) +- **Llama API**: Meta 的 Llama 模型 API +- **Semantic Kernel Adapter**: 支持 Anthropic、Google Gemini、Ollama、MistralAI、AWS、Hugging Face 等 + +**注意**:本容器仅提供了 OpenAI 兼容 API 的使用示例,其他模型需要根据 AutoGen 官方文档进行相应配置。 + +## 构建 + +```bash +docker build -t oc9-autogen:0.7.4 . +``` + +## 使用示例 + +构建镜像后,您可以使用以下命令运行容器: + +```bash +docker run --rm oc9-autogen:0.7.4 "您的任务描述" +``` + +例如: + +```bash +docker run --rm oc9-autogen:0.7.4 "2+2等于多少?" +``` + +如果需要自定义模型服务器地址,请使用环境变量 `BASE_URL`: + +```bash +docker run --rm -e BASE_URL="http://your-custom-server:port/v1" oc9-autogen:0.7.4 "您的任务描述" +``` + +### 测试用例 + +容器内包含一个测试用例脚本,用于验证"12+12=?"的计算: + +```bash +./test/test_12_plus_12.sh +``` + +该脚本将运行以下命令: + +```bash +docker run --rm oc9-autogen:0.7.4 "12+12=?" +``` + +容器将使用内置的本地模型(qwen/qwen3.5-9b)来处理您的查询。 + +## 已知问题 + +- 默认配置使用本地模型服务器(http://192.168.1.174:1234/v1)。如果您的环境不同,请通过环境变量 `BASE_URL` 设置自定义地址。 +- 确保本地模型服务器正在运行并且可访问。 +- 如果遇到网络问题,请检查防火墙设置。 diff --git a/frameworks/autogen/0.7.4/build.conf b/frameworks/autogen/0.7.4/build.conf new file mode 100644 index 0000000000000000000000000000000000000000..7788406824ff2f7b747843e1158c26090736f5f9 --- /dev/null +++ b/frameworks/autogen/0.7.4/build.conf @@ -0,0 +1,11 @@ +# Build configuration for AutoGen 0.7.4 +IMAGE_NAME=oc9-autogen +IMAGE_TAG=0.7.4 +BASE_IMAGE=opencloudos/opencloudos9-minimal:latest +MAINTAINER="OpenCloudOS Community" +DESCRIPTION="AutoGen 0.7.4 on OpenCloudOS 9" +SOURCE_URL=https://gitee.com/OpenCloudOS/ai-agent-container +PYTHON_VERSION=3.11 +FRAMEWORK_NAME=autogen +FRAMEWORK_VERSION=0.7.4 +GPU_TEST=false diff --git a/frameworks/autogen/0.7.4/openai-test.py b/frameworks/autogen/0.7.4/openai-test.py new file mode 100644 index 0000000000000000000000000000000000000000..75d3b019d76825b1db3de823f8d2a48fdadfe748 --- /dev/null +++ b/frameworks/autogen/0.7.4/openai-test.py @@ -0,0 +1,32 @@ +import asyncio +import os +import sys +from autogen_agentchat.agents import AssistantAgent +from autogen_ext.models.openai import OpenAIChatCompletionClient + +async def main() -> None: + # Get task from command line argument or default + task = sys.argv[1] if len(sys.argv) > 1 else "Say 'Hello World!'" + + # Get base_url from environment variable + base_url = os.environ.get('BASE_URL', 'http://192.168.1.174:1234/v1') + + model_client = OpenAIChatCompletionClient( + model="qwen/qwen3.5-9b", + api_key="any-key", + base_url=base_url, + model_info={ + "vision": False, + "function_calling": False, + "json_mode": False, + "json_output": False, + "family": "local" + } + ) + + agent = AssistantAgent("assistant", model_client=model_client) + print(await agent.run(task=task)) + await model_client.close() + +if __name__ == "__main__": + asyncio.run(main()) diff --git a/frameworks/autogen/0.7.4/requirements.txt b/frameworks/autogen/0.7.4/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..6d23a43d6c33614eb8911c9ec2d53e85c53eabab --- /dev/null +++ b/frameworks/autogen/0.7.4/requirements.txt @@ -0,0 +1,2 @@ +autogen-agentchat==0.7.4 +autogen-ext[openai]==0.7.4 diff --git a/frameworks/autogen/0.7.4/test/test_12_plus_12.sh b/frameworks/autogen/0.7.4/test/test_12_plus_12.sh new file mode 100644 index 0000000000000000000000000000000000000000..877fd1804ac067b78618ed4bc69fd3a168f65bd2 --- /dev/null +++ b/frameworks/autogen/0.7.4/test/test_12_plus_12.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +# Test case for 12+12=? +echo "Running test case: 12+12=?" +docker run --rm oc9-autogen:0.7.4 "12+12=?" diff --git a/frameworks/autogen/0.7.4/test/test_12_plus_12_result.png b/frameworks/autogen/0.7.4/test/test_12_plus_12_result.png new file mode 100644 index 0000000000000000000000000000000000000000..68009d686b84388bb36e17829fd5d24ed733707b Binary files /dev/null and b/frameworks/autogen/0.7.4/test/test_12_plus_12_result.png differ diff --git a/frameworks/autogen/0.7.5/Dockerfile b/frameworks/autogen/0.7.5/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..eb8191809b842bc4d5d305d48bf6d15529eab34d --- /dev/null +++ b/frameworks/autogen/0.7.5/Dockerfile @@ -0,0 +1,23 @@ +FROM opencloudos/opencloudos9-minimal:latest + +LABEL maintainer="OpenCloudOS Community" +LABEL org.opencontainers.image.source="https://gitee.com/OpenCloudOS/ai-agent-container" +LABEL org.opencontainers.image.description="AutoGen 0.7.5 on OpenCloudOS 9" + +# Install Python and necessary dependencies +RUN dnf update -y && \ + dnf upgrade -y && \ + dnf install -y python3 python3-pip curl && \ + dnf clean all +# Set working directory +WORKDIR /app + +COPY requirements.txt ./requirements.txt + +RUN pip install -r ./requirements.txt + +# Copy the modified test script +COPY openai-test.py ./openai-test.py + +# Set the entrypoint to run the script +ENTRYPOINT ["python3", "openai-test.py"] diff --git a/frameworks/autogen/0.7.5/README.md b/frameworks/autogen/0.7.5/README.md new file mode 100644 index 0000000000000000000000000000000000000000..ec4dc897ea19da4ad59d4b45fa807f693aa7e0fe --- /dev/null +++ b/frameworks/autogen/0.7.5/README.md @@ -0,0 +1,77 @@ +# AutoGen on OpenCloudOS 9 + +## 基本信息 + +- **框架版本**:0.7.5 +- **基础镜像**:opencloudos/opencloudos9-minimal:latest +- **Python 版本**:3.11 +- **框架名称**:AutoGen + +## 框架简介 + +AutoGen 是一个开源框架,用于构建多代理 AI 系统。它允许开发者创建能够自主协作的 AI 代理,以解决复杂的任务。AutoGen 支持多种模型提供商,并提供了丰富的工具和扩展。 + +更多信息请访问:[Microsoft AutoGen GitHub](https://github.com/microsoft/autogen) + +## 支持的模型 + +AutoGen 支持多种大型语言模型,包括: + +- **OpenAI**: GPT 系列模型 +- **Azure OpenAI**: Azure 托管的 OpenAI 模型 +- **Azure AI Foundry**: Azure AI Studio 托管的模型(如 Phi-4) +- **Anthropic**: Claude 系列模型(实验性) +- **Ollama**: 本地运行的模型(如 Llama 系列) +- **Gemini**: Google 的 Gemini 模型(通过 OpenAI 兼容 API) +- **Llama API**: Meta 的 Llama 模型 API +- **Semantic Kernel Adapter**: 支持 Anthropic、Google Gemini、Ollama、MistralAI、AWS、Hugging Face 等 + +**注意**:本容器仅提供了 OpenAI 兼容 API 的使用示例,其他模型需要根据 AutoGen 官方文档进行相应配置。 + +## 构建 + +```bash +docker build -t oc9-autogen:0.7.5 . +``` + +## 使用示例 + +构建镜像后,您可以使用以下命令运行容器: + +```bash +docker run --rm oc9-autogen:0.7.5 "您的任务描述" +``` + +例如: + +```bash +docker run --rm oc9-autogen:0.7.5 "2+2等于多少?" +``` + +如果需要自定义模型服务器地址,请使用环境变量 `BASE_URL`: + +```bash +docker run --rm -e BASE_URL="http://your-custom-server:port/v1" oc9-autogen:0.7.5 "您的任务描述" +``` + +### 测试用例 + +容器内包含一个测试用例脚本,用于验证"12+12=?"的计算: + +```bash +./test/test_12_plus_12.sh +``` + +该脚本将运行以下命令: + +```bash +docker run --rm oc9-autogen:0.7.5 "12+12=?" +``` + +容器将使用内置的本地模型(qwen/qwen3.5-9b)来处理您的查询。 + +## 已知问题 + +- 默认配置使用本地模型服务器(http://192.168.1.174:1234/v1)。如果您的环境不同,请通过环境变量 `BASE_URL` 设置自定义地址。 +- 确保本地模型服务器正在运行并且可访问。 +- 如果遇到网络问题,请检查防火墙设置。 \ No newline at end of file diff --git a/frameworks/autogen/0.7.5/build.conf b/frameworks/autogen/0.7.5/build.conf new file mode 100644 index 0000000000000000000000000000000000000000..fcc5fb15ecdd2a9447c6a5d3b0d48bde40e3eb39 --- /dev/null +++ b/frameworks/autogen/0.7.5/build.conf @@ -0,0 +1,11 @@ +# Build configuration for AutoGen 0.7.5 +IMAGE_NAME=oc9-autogen +IMAGE_TAG=0.7.5 +BASE_IMAGE=opencloudos/opencloudos9-minimal:latest +MAINTAINER="OpenCloudOS Community" +DESCRIPTION="AutoGen 0.7.5 on OpenCloudOS 9" +SOURCE_URL=https://gitee.com/OpenCloudOS/ai-agent-container +PYTHON_VERSION=3.11 +FRAMEWORK_NAME=autogen +FRAMEWORK_VERSION=0.7.5 +GPU_TEST=false diff --git a/frameworks/autogen/0.7.5/openai-test.py b/frameworks/autogen/0.7.5/openai-test.py new file mode 100644 index 0000000000000000000000000000000000000000..75d3b019d76825b1db3de823f8d2a48fdadfe748 --- /dev/null +++ b/frameworks/autogen/0.7.5/openai-test.py @@ -0,0 +1,32 @@ +import asyncio +import os +import sys +from autogen_agentchat.agents import AssistantAgent +from autogen_ext.models.openai import OpenAIChatCompletionClient + +async def main() -> None: + # Get task from command line argument or default + task = sys.argv[1] if len(sys.argv) > 1 else "Say 'Hello World!'" + + # Get base_url from environment variable + base_url = os.environ.get('BASE_URL', 'http://192.168.1.174:1234/v1') + + model_client = OpenAIChatCompletionClient( + model="qwen/qwen3.5-9b", + api_key="any-key", + base_url=base_url, + model_info={ + "vision": False, + "function_calling": False, + "json_mode": False, + "json_output": False, + "family": "local" + } + ) + + agent = AssistantAgent("assistant", model_client=model_client) + print(await agent.run(task=task)) + await model_client.close() + +if __name__ == "__main__": + asyncio.run(main()) diff --git a/frameworks/autogen/0.7.5/requirements.txt b/frameworks/autogen/0.7.5/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..9605087b8133f53c73ee5d44b0f1d65ad0f7172d --- /dev/null +++ b/frameworks/autogen/0.7.5/requirements.txt @@ -0,0 +1,2 @@ +autogen-agentchat==0.7.5 +autogen-ext[openai]==0.7.5 \ No newline at end of file diff --git a/frameworks/autogen/0.7.5/test/test_12_plus_12.sh b/frameworks/autogen/0.7.5/test/test_12_plus_12.sh new file mode 100755 index 0000000000000000000000000000000000000000..862383c4cee4b314acda8f59d8a5a2c1b553a5e0 --- /dev/null +++ b/frameworks/autogen/0.7.5/test/test_12_plus_12.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +# Test case for 12+12=? +echo "Running test case: 12+12=?" +docker run --rm oc9-autogen:0.7.5 "12+12=?" \ No newline at end of file diff --git a/frameworks/autogen/0.7.5/test/test_12_plus_12_result.png b/frameworks/autogen/0.7.5/test/test_12_plus_12_result.png new file mode 100644 index 0000000000000000000000000000000000000000..19da71f1f72a3cb1512bec4ed13bd6014082c8d5 Binary files /dev/null and b/frameworks/autogen/0.7.5/test/test_12_plus_12_result.png differ