A community-driven registry for Claude, Cursor, Windsurf, Cline & more. Not affiliated with Anthropic.
Are you the author? Sign in to claim
UnOfficial Gradio Repo for ICML 2024 paper "Executable Code Actions Elicit Better LLM Agents" by Xingyao Wang, Yangyi Ch
利用 Gradio 使 CodeActAgent-Mistral-7b 成为一个可交互运行的 Code-LLM 教学代理机器人 🤖
Executable Code Actions Elicit Better LLM Agents是一个使用可执行代码的工程,
将LLM代理的行动整合到代码执行程序(CodeAct)中,其与 Python 解释器集成。
CodeAct 可以执行代码操作并动态修改先前的操作或根据新的观察发出新的操作(例如,代码教学、代码纠错、运行代码得到执行结果),可实现与用户的动态交互和程序执行。
原始工程,使用Huggingface ChatUi并且具有相对复杂的前后端结构。
本项目旨在简化原有项目结构,仅使用Llama-cpp和gradio,从量化模型出发,以相对简单的结构实现了CodeActAgent作为可运行、可交互的Code LLM教学代理功能使用。
pip install -r requirements.txt
推荐安装llama-cpp-python GPU版本以获得更好体验。
启动名为 "code_act_agent_gradio_demo.ipynb" 的jupyter notebook,运行所有单元格。
在浏览器访问 http://127.0.0.1:7860 或者 gradio 提供的开放分享接口。
下面通过几个视频介绍如何与本工程的例子进行交互。
Give me a python function give the divide of number it self 10 times.
https://github.com/svjack/CodeActAgent-Gradio/assets/27874014/7cc55406-dc58-42dd-bab5-2c8b0cdb42e1
聊天上下文中的 "Observation:" 表明由LLM定义的函数在Python解析器中的运行结果。 这表明本工程具有代码可运行和可交互式运行的能力。
teach me how to use numpy.
https://github.com/svjack/CodeActAgent-Gradio/assets/27874014/6704ea21-4dd1-429a-9fc7-a348d24c8b83
Write a python code about, download image to local from url, the format as :
url = f'https://image.pollinations.ai/prompt/{prompt}'
where prompt as the input of download function.
https://github.com/svjack/CodeActAgent-Gradio/assets/27874014/6085a21b-5ba1-4c36-8c9d-0f373474fd64
在本例中,用户可以借助LLM定义 download_image 函数,并将蜜蜂图像下载到本地。
我们可以看到,LLM有能力自行纠正输出的错误。
当agent保存没有扩展名的图像时,用户可以使用自然语言命令程序修改本地文件的扩展名,
这表明LLM具有可执行的代理能力而不仅仅是教学助手。
Plot box plot with pandas and save it to local.
https://github.com/svjack/CodeActAgent-Gradio/assets/27874014/62d7788c-3580-4a5b-8c57-6f19f5ea922e
Draw a picture teach me what linear regression is.
https://github.com/svjack/CodeActAgent-Gradio/assets/27874014/d587bf10-7051-46dc-aba0-7e1befed5d54
Write a piece of Python code to simulate the financial transaction process and draw a financial images chart by lineplot of Poisson process.
https://github.com/svjack/CodeActAgent-Gradio/assets/27874014/6d628900-7362-4c84-8563-327be3194b7b
| 模型名称 | 模型类型 | HuggingFace 模型链接 |
|---|---|---|
| xingyaoww/CodeActAgent-Mistral-7b-v0.1 | Mistral-7b 8bit quantization | https://huggingface.co/xingyaoww/CodeActAgent-Mistral-7b-v0.1 |
https://github.com/e2b-dev/code-interpreter
svjack - https://huggingface.co/svjack - svjackbt@gmail.com - ehangzhou@outlook.com
Project Link:https://github.com/svjack/CodeActAgent-Gradio
干净、强大、属于你的 AI Agent 平台 --AI agents, without the clutter.
Pocket Flow: Codebase to Tutorial
An AI-powered custom node for ComfyUI designed to enhance workflow automation and provide intelligent assistance
npx CLI installing 100+ agents, commands, hooks, and integrations in one command