LLMDebugger:模仿了人类开发者调试程序

今天 小智 来使用的工具是 LLMDebugger

现在分享给大家,快来一起看看吧。

一、LLMDebugger是什么?

LLMDebugger这是一个Github上的项目,https://github.com/FloridSleeves/LLMDebugger

这是一种新型调试框架 LDB,该框架使大语言模型(LLMs)能够利用运行时执行信息来优化其生成的程序。具体来说,LDB模仿了人类开发者调试程序的方式。它将程序分割成基本块,并在整个运行时执行过程中跟踪每个块后中间变量的值。这使得LLMs能够集中于总体执行流程中的较简单代码单元,逐块核实它们是否符合任务描述,并高效地定位任何潜在的错误。

简介

This repository contains the code and dataset for our paper LDB: A Large Language Model Debugger via Verifying Runtime Execution Step by Step.(ACL 2024)

We introduce 🛠️LDB, a novel debugging framework that enables LLMs to refine their generated programs with the runtime execution information. Specifically, LDB imitates how human developers debug programs. It segments the programs into basic blocks and tracks the values of intermediate variables after each block throughout the runtime execution. This allows LLMs to concentrate on simpler code units within the overall execution flow, verify their correctness against the task description block by block, and efficiently pinpoint any potential errors.

LLMDebugger:模仿了人类开发者调试程序

📦 Installation

 

conda create -n ldb python=3.10
conda activate ldb
python -m pip install -r requirements.txt

二、如何使用LLMDebugger呢?

需要用到一个API工具:智增增API,有了它就有了通向人工智能的钥匙!

简单三步,跟着我一步一步很容易搞定的
  • 第1步:需要先访问LDB。如上所述github自己安装。
LLMDebugger:模仿了人类开发者调试程序
  • 第3步:配置密钥。需要修改一下代码,将上一步复制的密钥key和主机地址url填入,即可正常使用。注意配置的主机地址是:https://api.zhizengzeng.com/v1

要简单的修改下代码即可:代码修改可以参考这里:

http://doc.zhizengzeng.com/doc-3979939

API_SECRET_KEY = "xxxxxx";

BASE_URL = "https://api.zhizengzeng.com/v1/"

将下图部分的代码修改为:OpenAI(api_key=API_SECRET_KEY, base_url=BASE_URL)

核心是指定智增增的主机地址,还有智增增的密钥

即可正常使用

LLMDebugger:模仿了人类开发者调试程序

 

配置完成!~

加入AI工具群

最后放上人工客服,有定制需求找他吧,用好AI工具

LLMDebugger:模仿了人类开发者调试程序
© 版权声明

相关文章

暂无评论

暂无评论...