Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions sample_solutions/CodeTranslation/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Backend API Configuration
BACKEND_PORT=5001

# Inference API Configuration
# INFERENCE_API_ENDPOINT: URL to your inference service (without /v1 suffix)
# - For GenAI Gateway: https://genai-gateway.example.com
# - For APISIX Gateway: https://apisix-gateway.example.com/CodeLlama-34b-Instruct-hf
# Note: APISIX Gateway requires the model name in the URL path
#
# INFERENCE_API_TOKEN: Authentication token/API key for the inference service
# - For GenAI Gateway: Your GenAI Gateway API key
# - For APISIX Gateway: Your APISIX authentication token
INFERENCE_API_ENDPOINT=https://your-api-endpoint.com/deployment
INFERENCE_API_TOKEN=your-pre-generated-token-here
INFERENCE_MODEL_NAME=codellama/CodeLlama-34b-Instruct-hf

# LLM Settings
LLM_TEMPERATURE=0.2
LLM_MAX_TOKENS=4096

# Code Translation Settings
# MAX_CODE_LENGTH: Maximum input code length in characters
# Note: For Enterprise Inference with CodeLlama-34b (max tokens: 5196)
# Set to 4000 characters to stay safely under the token limit with prompt overhead
MAX_CODE_LENGTH=4000
MAX_FILE_SIZE=10485760

# CORS Configuration
CORS_ALLOW_ORIGINS=["http://localhost:5173", "http://localhost:3000"]

# Local URL Endpoint (only needed for non-public domains)
# If using a local domain like api.example.com mapped to localhost, set to the domain without https://
# Otherwise, set to: not-needed
LOCAL_URL_ENDPOINT=not-needed

# SSL Verification Settings
# Set to false only for dev with self-signed certs
VERIFY_SSL=true
60 changes: 60 additions & 0 deletions sample_solutions/CodeTranslation/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Environment variables
.env
.env.local
.env.production
.env.*.local

# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
venv/
env/
ENV/
.venv

# Node
node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
.npm
.yarn
package-lock.json

# IDE
.vscode/
.idea/
*.swp
*.swo
*~
.DS_Store

# Build outputs
dist/
*.log

# Temporary files
*.tmp
tmp/
temp/
Loading