node-red-contrib-dotnsf-watsonxai
Version:
55 lines (52 loc) • 2.1 kB
HTML
<script type="text/javascript">
RED.nodes.registerType( 'watsonx.ai', {
category: 'function',
color: '#cccc99',
defaults: {
name: { value: '' },
location: { value: 'us-south' },
deployment_id: { value: '' },
apikey: { value: '' },
project_id: { value: '' },
model_id: { value: 'ibm/granite-13b-chat-v2' },
max_new_tokens: { value: 1000 },
only_firstline: { value: false }
},
inputs: 1,
outputs: 1,
icon: "font-awesome/fa-graduation-cap",
label: function(){
return this.name || "watsonx.ai";
}
});
</script>
<script type="text/x-red" data-template-name="watsonx.ai">
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name"/>
<br/>
<label for="node-input-location"><i class="icon-tag"></i> Location</label>
<input type="text" id="node-input-location" placeholder="Location"/>
<br/>
<label for="node-input-deployment_id"><i class="icon-tag"></i> Deployment ID</label>
<input type="text" id="node-input-deployment_id" placeholder="Deployment ID"/>
<br/>
<label for="node-input-apikey"><i class="icon-tag"></i> API Key</label>
<input type="text" id="node-input-apikey" placeholder="API Key"/>
<br/>
<label for="node-input-project_id"><i class="icon-tag"></i> Project ID</label>
<input type="text" id="node-input-project_id" placeholder="Project ID"/>
<br/>
<label for="node-input-model_id"><i class="icon-tag"></i> Model ID</label>
<input type="text" id="node-input-model_id" placeholder="Model ID"/>
<br/>
<label for="node-input-max_new_tokens"><i class="icon-tag"></i> Max New Toksns</label>
<input type="text" id="node-input-max_new_tokens" placeholder="1000"/>
<br/>
<input type="checkbox" id="node-input-only_firstline"/>
Only first phrase
</div>
</script>
<script type="text/x-red" data-help-name="watsonx.ai">
<p>watsonx.ai based query node.</p>
</script>