Enhancement: KNIME AI Assistant Data

Description:

I had the following conversation with the KNIME AI Assistant about building a ChatBot on the webserver using ChatGPT:

“”"Hi! I am K-AI, your KNIME Q&A Assistant. What would you like to know?

I want to build a ChatBot Web server App, how can I do this in KNIME? And please populate the needed nodes into my workflow

To build a ChatBot Web server app in KNIME, you can follow these steps:

  1. Start by creating a new workflow in KNIME Analytics Platform.
  2. Add an “HTTP Retriever” node to retrieve incoming requests from the web server. This node will act as the entry point for the ChatBot app.
  3. Connect the “HTTP Retriever” node to a “JSON Path” node. This node will extract the necessary information from the incoming request.
  4. Add a “Rule Engine” node to define the logic for your ChatBot. This node will contain the rules and responses that the ChatBot will use to interact with users.
  5. Connect the “JSON Path” node to the “Rule Engine” node.
  6. Add a “Table Creator” node to create a table with the responses from the ChatBot.
  7. Connect the “Rule Engine” node to the “Table Creator” node.
  8. Add an “HTTP Retriever” node to send the response back to the web server.
  9. Connect the “Table Creator” node to the second “HTTP Retriever” node.
  10. Finally, add an “HTTP Server Connector” node to start the web server and deploy your ChatBot app.

Your workflow should look like this:

[HTTP Retriever] -> [JSON Path] -> [Rule Engine] -> [Table Creator] -> [HTTP Retriever] -> [HTTP Server Connector]

Please note that this is a basic example to get you started. You can customize and expand the workflow based on your specific requirements.

Remember to configure the nodes accordingly, such as setting the appropriate URLs, ports, and request/response formats.

I hope this helps you get started with building your ChatBot Web server app in KNIME! Let me know if you have any further questions.

Nodes

  • Rule Engine

  • Table Creator

  • JSON Path

Please note I would like to use ChatGPT

To build a ChatBot Web server app using ChatGPT in KNIME, you can follow these steps:

  1. Start by creating a new workflow in KNIME Analytics Platform.
  2. Add an “HTTP Retriever” node to retrieve incoming requests from the web server. This node will act as the entry point for the ChatBot app.
  3. Connect the “HTTP Retriever” node to a “JSON Path” node. This node will extract the necessary information from the incoming request.
  4. Add a “Python Script (1⨉1)” node to interact with the ChatGPT API. This node will send the user’s message to the ChatGPT API and receive the response.
  5. Connect the “JSON Path” node to the “Python Script (1⨉1)” node.
  6. In the “Python Script (1⨉1)” node, you can use the following Python code to interact with the ChatGPT API:
import requests

def get_chatgpt_response(message):
    url = "https://api.openai.com/v1/engines/davinci-codex/completions"
    headers = {
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json"
    }
    data = {
        "prompt": message,
        "max_tokens": 50
    }
    response = requests.post(url, headers=headers, json=data)
    return response.json()["choices"][0]["text"]

message = ${message}$
response = get_chatgpt_response(message)

Make sure to replace “YOUR_API_KEY” with your actual ChatGPT API key.

  1. Add a “Table Creator” node to create a table with the response from ChatGPT.
  2. Connect the “Python Script (1⨉1)” node to the “Table Creator” node.
  3. Add an “HTTP Retriever” node to send the response back to the web server.
  4. Connect the “Table Creator” node to the second “HTTP Retriever” node.
  5. Finally, add an “HTTP Server Connector” node to start the web server and deploy your ChatBot app.

Your workflow should look like this:

[HTTP Retriever] -> [JSON Path] -> [Python Script (1⨉1)] -> [Table Creator] -> [HTTP Retriever] -> [HTTP Server Connector]

Please note that you need to replace “YOUR_API_KEY” with your actual ChatGPT API key in the Python code.

Remember to configure the nodes accordingly, such as setting the appropriate URLs, ports, and request/response formats.

I hope this helps you build your ChatBot Web server app using ChatGPT in KNIME! Let me know if you have any further questions.“”"

Steps to reproduce:

  1. Have a conversation about building a ChatBot on the KNIME server using ChatGPT

Actual results:
Actual results did not mention how the new AI nodes can be easily leveraged to accomplish this task or discuss nodes to use to build the Aebapp.

Expected results:
Information on which AI nodes to use to complete the task and nodes to use for the WebApp component to enable user interaction.

General Comments
If the node labels and node description information (plus any further internal documentation) are not currently in the knowledge base of the model, this should be added I believe. The way the KNIME AI Assistant is recommending I approach this task seems very outdated and it does not appear it has knowledge of these new nodes.

OS:
Windows

Hello @TosinLitics,

thank you for your feedback.
It indeed looks like K-AI is not aware of the AI Extension at the moment and we are looking into why that is.
That being said, your request is quite advanced, so chances are that just knowing the extension will not yet enable K-AI to answer it.
For these more complicated questions we hope to further extend K-AI’s knowledgebase in future Community Hub releases.
The ticket number for that is AP-20852.

Best regards and thank you again
Adrian

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.