-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenai-api.html
54 lines (51 loc) · 2.2 KB
/
openai-api.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<script type="text/javascript">
RED.nodes.registerType('openai-api', {
category: "openai",
defaults: {
name: {value: "OpenAiAPI"},
config: {value: "", type: "openai-api-config", required: true},
payload: {value: "payload", required: true},
api: {value: "chat.completions.create", required: true},
},
inputs: 1,
outputs: 1,
color: "rgb(22,229,178)",
label: function () {
return (this.name || "openai-api")
}
});
</script>
<script type="text/html" data-template-name="openai-api">
<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"/>
</div>
<div class="form-row">
<label for="node-input-config"><i class="icon-bookmark"></i> Api Config</label>
<input type="text" id="node-input-config"/>
</div>
<div class="form-row">
<label for="node-input-payload"><i class="icon-bookmark"></i> Payload field</label>
<input type="text" id="node-input-payload"/>
</div>
<div class="form-row">
<label for="node-input-api"><i class="icon-bookmark"></i> Api to call </label>
<select name="cars" id="node-input-api">
<option value="chat.completions.create">chat.completions.create</option>
<option value="fineTuning.create">fineTuning.create</option>
<option value="fineTuning.list">fineTuning.list</option>
<option value="fineTuning.retrieve">fineTuning.retrieve</option>
<option value="fineTuning.cancel">fineTuning.cancel</option>
<option value="fineTuning.listEvents">fineTuning.listEvents</option>
<option value="files.create">files.create</option>
<option value="files.validate">files.validate</option>
<option value="files.list">files.list</option>
<option value="files.retrieve">files.retrieve</option>
<option value="files.delete">files.delete</option>
</select>
</div>
</script>
<script type="text/html" data-help-name="openai-api">
<p>OpenAi api calls</p>
<a href="https://platform.openai.com/docs/api-reference/chat/create">openai.createChatCompletion function call</a>
</script>