Skip to content

Commit bfc4fb7

Browse files
authored
Merge pull request opea-project#54 from cld2labs/cld2labs/CodeTranslation
cld2labs/CodeTranslation
2 parents e584971 + d5e4d1d commit bfc4fb7

30 files changed

Lines changed: 2009 additions & 0 deletions
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Backend API Configuration
2+
BACKEND_PORT=5001
3+
4+
# Inference API Configuration
5+
# INFERENCE_API_ENDPOINT: URL to your inference service (without /v1 suffix)
6+
# - For GenAI Gateway: https://genai-gateway.example.com
7+
# - For APISIX Gateway: https://apisix-gateway.example.com/CodeLlama-34b-Instruct-hf
8+
# Note: APISIX Gateway requires the model name in the URL path
9+
#
10+
# INFERENCE_API_TOKEN: Authentication token/API key for the inference service
11+
# - For GenAI Gateway: Your GenAI Gateway API key
12+
# - For APISIX Gateway: Your APISIX authentication token
13+
INFERENCE_API_ENDPOINT=https://your-api-endpoint.com/deployment
14+
INFERENCE_API_TOKEN=your-pre-generated-token-here
15+
INFERENCE_MODEL_NAME=codellama/CodeLlama-34b-Instruct-hf
16+
17+
# LLM Settings
18+
LLM_TEMPERATURE=0.2
19+
LLM_MAX_TOKENS=4096
20+
21+
# Code Translation Settings
22+
# MAX_CODE_LENGTH: Maximum input code length in characters
23+
# Note: For Enterprise Inference with CodeLlama-34b (max tokens: 5196)
24+
# Set to 4000 characters to stay safely under the token limit with prompt overhead
25+
MAX_CODE_LENGTH=4000
26+
MAX_FILE_SIZE=10485760
27+
28+
# CORS Configuration
29+
CORS_ALLOW_ORIGINS=["http://localhost:5173", "http://localhost:3000"]
30+
31+
# Local URL Endpoint (only needed for non-public domains)
32+
# If using a local domain like api.example.com mapped to localhost, set to the domain without https://
33+
# Otherwise, set to: not-needed
34+
LOCAL_URL_ENDPOINT=not-needed
35+
36+
# SSL Verification Settings
37+
# Set to false only for dev with self-signed certs
38+
VERIFY_SSL=true
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Environment variables
2+
.env
3+
.env.local
4+
.env.production
5+
.env.*.local
6+
7+
# Python
8+
__pycache__/
9+
*.py[cod]
10+
*$py.class
11+
*.so
12+
.Python
13+
build/
14+
develop-eggs/
15+
dist/
16+
downloads/
17+
eggs/
18+
.eggs/
19+
lib/
20+
lib64/
21+
parts/
22+
sdist/
23+
var/
24+
wheels/
25+
*.egg-info/
26+
.installed.cfg
27+
*.egg
28+
MANIFEST
29+
venv/
30+
env/
31+
ENV/
32+
.venv
33+
34+
# Node
35+
node_modules/
36+
npm-debug.log*
37+
yarn-debug.log*
38+
yarn-error.log*
39+
pnpm-debug.log*
40+
lerna-debug.log*
41+
.npm
42+
.yarn
43+
package-lock.json
44+
45+
# IDE
46+
.vscode/
47+
.idea/
48+
*.swp
49+
*.swo
50+
*~
51+
.DS_Store
52+
53+
# Build outputs
54+
dist/
55+
*.log
56+
57+
# Temporary files
58+
*.tmp
59+
tmp/
60+
temp/

0 commit comments

Comments
 (0)