initial version

This commit is contained in:
Maciej Lebiest 2025-06-09 17:44:57 +02:00
parent 529afd4eaa
commit edb5499caf
3 changed files with 65 additions and 0 deletions

31
openai-config.html Normal file
View file

@ -0,0 +1,31 @@
<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>