feat: add claude 3.7 code generation support
What does this merge request do and why?
Adds code generation template for the new Claude 3.7 Sonnet model
Resolves gitlab-org/gitlab#521045 (closed)
How to set up and validate locally
curl -X "POST" "http://gdk.test:5052/v3/code/completions" \
-H 'Content-Type: application/json; charset=utf-8' \
-d $'{
"prompt_version": 3,
"prompt_components": [
{
"type": "code_editor_generation",
"payload": {
"prompt_version": "3.0.2-dev",
"model_name": "base",
"file_name": "main.go",
"content_above_cursor": "func parseEnvFile(filename string) (map[string]string, error) {",
"prompt_id": "code_suggestions/generations",
"prompt_enhancer": {
"user_instruction": "hello world"
},
"content_below_cursor": "}",
"language_identifier": "go"
}
}
]
}'
Merge request checklist
-
Tests added for new functionality. If not, please raise an issue to follow up. -
Documentation added/updated, if needed.
Edited by Allen Cook