dify/evaluate/code-generator
2024-11-10 22:35:56 +09:00
..
auth Add evaluation metrics for code generator 2024-11-10 21:58:47 +09:00
bin Update bin 2024-11-10 22:33:55 +09:00
cmd Add evaluation metrics for code generator 2024-11-10 21:58:47 +09:00
coderuntime Add evaluation metrics for code generator 2024-11-10 21:58:47 +09:00
testdata add testcases 2024-11-10 21:58:57 +09:00
.env.example Add evaluation metrics for code generator 2024-11-10 21:58:47 +09:00
.gitignore Add gitignore 2024-11-10 22:35:56 +09:00
build.sh Add executables for multi-platform build: 2024-11-10 22:00:11 +09:00
go.mod add golang dependencies 2024-11-10 21:59:19 +09:00
go.sum add golang dependencies 2024-11-10 21:59:19 +09:00
README.md docs: add README for code generator evaluator 2024-11-10 22:06:23 +09:00

Code Generator Evaluator

Getting Started

  1. Move to the evaluator directory
cd dify/evaluate/code-generator
  1. Set up your .env file with required variables
cp .env.example .env
  1. Add your test cases to testdata/testcases.json

  2. Execute the evaluator

# For Linux
./bin/evaluate-code-linux

# For macOS (Intel)
./bin/evaluate-code-mac

# For macOS (Apple Silicon)
./bin/evaluate-code-mac-arm64

# For Windows
./bin/evaluate-code.exe

Build Instructions

1. Prepare Build Script

First, grant execution permissions to the build script:

chmod +x build.sh

2. Prerequisites

  • Go 1.20 or higher
  • Properly configured GOPATH

3. Build Process

Run the cross-platform build with the following command:

./build.sh

Running the Evaluator

Execute the Code Generator evaluation on your platform using:

# For Linux
./bin/evaluate-code-linux

# For macOS (Intel)
./bin/evaluate-code-mac

# For macOS (Apple Silicon)
./bin/evaluate-code-mac-arm64

# For Windows
./bin/evaluate-code.exe