@terranlabs/appflow-langchain
Version:
Use langchain in appflow
256 lines (247 loc) • 7.26 kB
HTML
<script type="text/html" data-help-name="find-domain-bod">
<p>A simple node that take a Company name in and return BODs info</p>
</script>
<script type="text/html" data-template-name="find-domain-bod">
<div class="form-row">
<label for="node-input-llmStrategy"
><i class="fa fa-slack"></i> LLM Strategy</label
>
<select id="node-input-llmStrategy" placeholder="llmStrategy">
<option value="google_gemini">Google Gemini</option>
<option value="openai">OpenAI</option>
<option value="local">Local Hosted</option>
</select>
</div>
<div class="form-row">
<label for="node-input-llmApiKey"
><i class="fa fa-slack"></i> LLM API KEY</label
>
<input type="text" id="node-input-llmApiKey" placeholder="llmApiKey" />
</div>
<div style="display: none;" class="form-row node-input-llm-hosted-url">
<label for="node-input-llm-hosted-url"
><i class="fa fa-slack"></i> LLM Hosted URL
</label>
<input
type="text"
id="node-input-llm-hosted-url"
placeholder="llmHostedUrl"
/>
</div>
<div class="form-row">
<label for="node-input-strategy"
><i class="fa fa-slack"></i> Search strategy</label
>
<select id="node-input-strategy" placeholder="strategy">
<option value="google">Google Custom Search</option>
<option value="serper">Serper API</option>
</select>
</div>
<div class="form-row">
<label for="node-input-apiKey"><i class="fa fa-slack"></i> API Key</label>
<input type="text" id="node-input-apiKey" placeholder="apiKey" />
</div>
<div class="form-row node-input-cx">
<label for="node-input-cx"><i class="fa fa-slack"></i> cx</label>
<input type="text" id="node-input-cx" placeholder="cx" />
</div>
<div class="form-row">
<label for="node-input-domainOnly">Find Domain only</label>
<input type="checkbox" id="node-input-domainOnly" />
</div>
<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>
</script>
<script type="text/javascript">
RED.nodes.registerType("find-domain-bod", {
category: "chatops",
color: "#42B34F",
defaults: {
name: {
value: "",
},
domainOnly: {
value: false,
},
llmStrategy: {
value: "google_gemini",
},
llmApiKey: {
value: "",
},
llmHostedUrl: {
value: "",
},
strategy: {
value: "google",
},
apiKey: {
value: "",
},
cx: {
value: "",
},
},
inputs: 1,
outputs: 1,
oneditprepare: function () {
$("#node-input-strategy").change(() => {
var strategy = $("#node-input-strategy").val();
console.log(strategy);
if (strategy == "serper") {
$(".node-input-cx").hide();
} else {
$(".node-input-cx").show();
}
});
$("#node-input-llm-strategy").change(() => {
var strategy = $("#node-input-llm-strategy").val();
console.log(strategy);
if (strategy != "local") {
$(".node-input-llm-hosted-url").hide();
} else {
$(".node-input-llm-hosted-url").show();
}
});
},
icon: "agent.png",
label: function () {
return this.name || "Agent find domain and BODs";
},
});
</script>
<!--
<script type="text/html" data-help-name="find-domain-bod-internal">
<p>A simple node that take a Company name in and return BODs internal info</p>
</script>
<script type="text/html" data-template-name="find-domain-bod-internal">
<div class="form-row">
<label for="node-input-llm-api-key"
><i class="fa fa-slack"></i> OPENAI API KEY</label
>
<input type="text" id="node-input-llm-api-key" placeholder="llmApiKey" />
</div>
<div class="form-row">
<label for="node-input-basePath"
><i class="fa fa-slack"></i> Base Path</label
>
<input type="text" id="node-input-basePath" placeholder="basePath" />
</div>
<div class="form-row">
<label for="node-input-strategy"
><i class="fa fa-slack"></i> Search strategy</label
>
<select id="node-input-strategy" placeholder="strategy">
<option value="google">Google Custom Search</option>
<option value="serper">Serper API</option>
</select>
</div>
<div class="form-row">
<label for="node-input-apiKey"><i class="fa fa-slack"></i> API Key</label>
<input type="text" id="node-input-apiKey" placeholder="apiKey" />
</div>
<div class="form-row node-input-cx">
<label for="node-input-cx"><i class="fa fa-slack"></i> cx</label>
<input type="text" id="node-input-cx" placeholder="cx" />
</div>
<div class="form-row">
<label for="node-input-domainOnly">Find Domain only</label>
<input type="checkbox" id="node-input-domainOnly" />
</div>
<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>
</script>
<script type="text/javascript">
RED.nodes.registerType("find-domain-bod-internal", {
category: "chatops",
color: "#42B34F",
defaults: {
name: {
value: "",
},
domainOnly: {
value: false,
},
llmApiKey: {
value: "",
},
basePath: {
value: "",
},
strategy: {
value: "google",
},
apiKey: {
value: "",
},
cx: {
value: "",
},
},
inputs: 1,
outputs: 1,
oneditprepare: function () {
$("#node-input-strategy").change(() => {
var strategy = $("#node-input-strategy").val();
console.log(strategy);
if (strategy == "serper") {
$(".node-input-cx").hide();
} else {
$(".node-input-cx").show();
}
});
},
icon: "agent.png",
label: function () {
return this.name || "Agent find domain and BODs internal";
},
});
</script>
<script type="text/html" data-help-name="find-bod">
<p>A simple node that find BODs info</p>
</script>
<script type="text/html" data-template-name="find-bod">
<div class="form-row">
<label for="node-input-llm-api-key"
><i class="fa fa-slack"></i> OPENAI API KEY</label
>
<input type="text" id="node-input-llm-api-key" placeholder="llmApiKey" />
</div>
<div class="form-row">
<label for="node-input-basePath"
><i class="fa fa-slack"></i> Base Path</label
>
<input type="text" id="node-input-basePath" placeholder="basePath" />
</div>
<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>
</script>
<script type="text/javascript">
RED.nodes.registerType("find-bod", {
category: "chatops",
color: "#42B34F",
defaults: {
name: {
value: "",
},
llmApiKey: {
value: "",
},
basePath: {
value: "",
},
},
inputs: 1,
outputs: 1,
icon: "agent.png",
label: function () {
return this.name || "Agent find BODs";
},
});
</script> -->