...
| Code Block |
|---|
| language | js |
|---|
| theme | Emacs |
|---|
| title | synapeditor.config.js |
|---|
|
// URL과 API Key를 설정하는 경우
'aiWriteSupporter.config': {
ai: 'gpt',
url: 'https://api.openai.com/v1/chat/completions',
apiKey: 'sk-abc123...456xyz' // 브라우저에 노출되므로 안전하지 않음
}
// URL만 설정하는 경우
'aiWriteSupporter.config': {
ai: 'gpt',
url: '/requestGPTrequest'
}
|
Naver HyperCLOVA X 설정
| Code Block |
|---|
| language | js |
|---|
| theme | Emacs |
|---|
| title | synapeditor.config.js |
|---|
|
// url: HyperCLOVA X로 요청을 하도록 구현한 URL
'aiWriteSupporter.config': {
ai: 'hcx',
url: '/requestHCXrequest',
} |
Request Body 설정
API 요청 시 추가로 필요한 값들을 설정합니다.
...
| Code Block |
|---|
| language | js |
|---|
| theme | Emacs |
|---|
| title | synapeditor.config.js |
|---|
|
// URL과 API Key를 설정하는 경우
'aiWriteSupporter.config': {
text: {
url: 'https://api.openai.com/v1/chat/completions',
apiKey: 'sk-abc123...456xyz', // 브라우저에 노출되므로 안전하지 않음
//...
},
image: {
url: 'https://api.openai.com/v1/images/generations',
apiKey: 'sk-abc123...456xyz', // 브라우저에 노출되므로 안전하지 않음
//...
}
}
// URL만 설정하는 경우
'aiWriteSupporter.config': {
text: {
url: '/requestGPTrequest',
//...
},
image: {
url: '/requestDallerequest',
//...
}
} |
추가로 사용 가능한 키
| Key | Type | 필수 | 기본값 | 설명 |
|---|
| areaSize | object | X | {width: 380, height: 260} | - 프롬프트 및 미리보기 창 사이즈를 설정합니다.
|
...