32 lines
1 KiB
HTML
32 lines
1 KiB
HTML
|
<script type="text/javascript">
|
||
|
RED.nodes.registerType('openai-config', {
|
||
|
category: 'config',
|
||
|
color: '#a6bbcf',
|
||
|
defaults: {
|
||
|
name: {value: ""},
|
||
|
apiUrl: {value: ""}
|
||
|
},
|
||
|
credentials: {
|
||
|
apiToken: {type: "password"}
|
||
|
},
|
||
|
label: function () {
|
||
|
return this.name || "openai-config";
|
||
|
}
|
||
|
});
|
||
|
</script>
|
||
|
|
||
|
<script type="text/html" data-template-name="openai-config">
|
||
|
<div class="form-row">
|
||
|
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
|
||
|
<input type="text" id="node-input-name" placeholder="Name">
|
||
|
</div>
|
||
|
<div class="form-row">
|
||
|
<label for="node-input-apiUrl"><i class="fa fa-link"></i> API URL</label>
|
||
|
<input type="text" id="node-input-apiUrl" placeholder="API URL">
|
||
|
</div>
|
||
|
<div class="form-row">
|
||
|
<label for="node-input-apiToken"><i class="fa fa-key"></i> API Token</label>
|
||
|
<input type="password" id="node-input-apiToken" placeholder="API Token">
|
||
|
</div>
|
||
|
</script>
|