当前位置: 首页 > news >正文

第一个autogen与docker项目

前提条件:在windows上安装docker
代码如下:

import os
import autogen
from autogen import AssistantAgent, UserProxyAgentllm_config = {"config_list": [{"model": "GLM-4-Plus","api_key": "your api key","base_url": "https://open.bigmodel.cn/api/paas/v4/",}]
}with autogen.coding.DockerCommandLineCodeExecutor(work_dir="coding") as code_executor:assistant = AssistantAgent("assistant", llm_config=llm_config)user_proxy = UserProxyAgent("user_proxy", code_execution_config={"executor": code_executor})# Start the chatuser_proxy.initiate_chat(assistant,message="1 plus 1 equals what?",)

运行结果:
在这里插入图片描述
查看安装的镜像:

docker images

在这里插入图片描述

希望这些内容对你有所帮助!如果有任何问题,欢迎在评论区留言。

http://www.lryc.cn/news/490382.html

相关文章:

  • 第三十四篇 MobileNetV1、V2、V3模型解析
  • Python学习——字符串操作方法
  • 力扣—15.三数之和
  • 容器安全检测和渗透测试工具
  • sqlite3自动删除数据的两种设置方式记录
  • Hive分桶超详细!!!
  • 【深度学习之回归预测篇】 深度极限学习机DELM多特征回归拟合预测(Matlab源代码)
  • Android mk/bp构建工具介绍
  • 数据源及分层开发
  • 气膜场馆照明设计:科技与环保的完美结合—轻空间
  • 并行IO接口8255
  • Level DB --- SkipList
  • 第二十二周机器学习笔记:动手深度学习之——线性代数
  • leetcode 50个简单和中等难度的题
  • 多模态大模型(5)--LLaVA
  • Vue实训---3-element plus的使用与布局
  • TritonServer中加载模型,并在Gunicorn上启动Web服务调用模型
  • 快速删除 node_modules 目录的集中方法
  • shell编程--if判断与for循环
  • Makefile基础应用
  • 计算机网络基础全攻略:探秘网络构建块(1/10)
  • SpringMVC-Day1
  • 【虚拟机】VMWare的CentOS虚拟机断电或强制关机出现问题
  • 探索 RocketMQ:企业级消息中间件的选择与应用
  • vue中v-if和v-for优先级
  • 使用Kotlin写一个将字符串加密成short数组,然后可以解密还原成原始的字符串的功能
  • windows C#-取消任务列表(上)
  • Linux---ps命令
  • 解决k8s拉取私有镜像401 Unauthorized 问题
  • Ruby 模块(Module)