온디바이스 AI를 이용한 코딩 보조 툴인 'Continue Dev'은 설정 화일에서 '시스템 메시지'를 설정할 수 있다.
'시스템 메시지'를 잘 설정하면 AI가 좀 더 코딩 보조 역할에 알맞게 설정할 수 있다.
예를 들어, 본인의 코딩 스타일을 설명해 놓으면 이를 기본값으로 작동하므로 작업에 한결 도움이 된다.
Continue Dev은 설정 화일은 '%USERPROFILE%\.continue\config.json' 파일이며, "systemMessage" 값을 원하는 문자열로 설정하면 된다.
( %USERPROFILE% 은 MS윈도우 사용자 홈 디렉토리를 지칭하는 환경변수이다.)
예를 들면 다음과 같이 설정한다.
(가장 중요한 것은 맨 마지막 줄의 "systemMessage" 값이다.)
{
"models": [
{
"title": "Llama3-70b",
"model": "llama3:70b",
"provider": "ollama"
},
(... 중간 생략 : 사용하고자 하는 AI 모델을 넣어주면 된다. ...)
{
"title": "Ollama",
"provider": "ollama",
"model": "AUTODETECT"
}
],
"customCommands": [
{
"name": "test",
"prompt": "{{{ input }}}\n\nWrite a comprehensive set of unit tests for the selected code. It should setup, run tests that check for correctness including important edge cases, and teardown. Ensure that the tests are complete and sophisticated. Give the tests just as chat output, don't edit any file.",
"description": "Write unit tests for highlighted code"
}
],
"tabAutocompleteModel": {
"title": "DeepSeek Coder V2",
"provider": "ollama",
"model": "deepseek-coder-v2"
},
"embeddingsProvider": {
"title": "bge-m3",
"provider": "ollama",
"model": "chatfire/bge-m3:q8_0"
},
"contextProviders": [
{"name": "code"},
{"name": "highlights"},
{"name": "open"},
{"name": "outline"},
{"name": "folder"},
{"name": "codebase"},
{"name": "url"},
{"name": "terminal"},
{"name": "docs"}
],
"allowAnonymousTelemetry": false,
"systemMessage" : "You are a experienced software developer. You and all of the team members are Korean. So, you use Korean for variable names, function names, comments and names for all other data types. Because, Korean language does not have upper/lower case, you use snake case. Also, it is very important to keep spacing with Korean language for readability, you use '_' in place of space character. You use Korean language for chat."
}
여기에, AI로 하여금 '숙련된 소프트웨어 개발자' 역할을 맡기고, 한국인으로만 구성된 팀의 일원이기에, 변수명, 코멘트등을 한글로 작성하며, 대소문자 구분이 없는 한글의 특성으로 인해 대소문자로 단어를 구분하는 '카멜 케이스'보다 '_'로 공백을 대신해서 단어를 구분하는 '스네이크 케이스'를 선호한다고 명시해 놓으면, AI가 이러한 요구 사항에 맞는 답변을 내 놓는다.
이것은 예시일 뿐이며 각자의 코드 스타일이나 선호도에 맞게 맞춤 설정을 하면 (완벽하지는 않더라도) 상당 부분 반영된다.
Continue Dev에서 contextLength 늘리기. (0) | 2024.06.22 |
---|---|
AI에게 코드 리뷰를 받아보니. (0) | 2024.06.21 |
AI는 거짓말?? (0) | 2024.06.19 |
자소서 작성과 서류면접을 모두 AI가 하면 벌어지는 일... (0) | 2024.06.19 |
AI에 대한 리누스 토발즈의 인터뷰 (0) | 2024.06.19 |