• Resolved Deepak

    (@golinuxcloud)


    Hello Team,

    I am expecting OpenAI to send code in the responses which they will send inside or based on the type of code provided.

    But it doesn’t appear good when those are not handled. is it possible that chatbot processes the response and by default adds <pre> for content inside and <code> for content inside

    Also I see OpenAI adds programming language as an added entry in the code so can we remove that as well?

    I wrote some code which does the same in my existing solution but I couldn’t find similar alternative in your plugin so I am not able to use it. Do you already have any such functionality? If No, is it possible to add?

    Sample code

        function formatResponse(response) {
    let cleanResponse = response.replace(/
    (\w+)\n/g, '');
    cleanResponse = cleanResponse.replace(/(.*?)/gs, '<pre>$1</pre>');
    cleanResponse = cleanResponse.replace(/(.*?)/g, '<code>$1</code>');
    return cleanResponse;
    }
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author QuantumCloud

    (@quantumcloud)

    Hi,

    We are checking this. I will get back to you.

    Thank you!

    Plugin Author QuantumCloud

    (@quantumcloud)

    Hi,

    We will release a new version addressing your request tomorrow.

    Thank you!

    Thread Starter Deepak

    (@golinuxcloud)

    Thank you for the quick come back and accepting this request

    Plugin Author QuantumCloud

    (@quantumcloud)

    We released a new version with Mark down support for the OpenAI responses. Can you please upgrade and check now?

    Thanks

    Thread Starter Deepak

    (@golinuxcloud)

    I have cleaned up all predefined Intents from Settings as I want to use chatbot only to integrate with OpenAI and nothing else.

    When I ask “write a shell and go code to determine all partitions with size more than 10G in Linux”
    Then this is the response I get

    https://ibb.co/9r929L5

    But I get proper response when I only ask for go code

    write a go code to determine all partitions with size more than 10G in Linux“. But this was working with earlier version when I was asking for both go and shell code, the only problem was formatting.

    I have tested this in my existing solution with OpenAI and there also it works so I don’t think the problem is with OpenAI

    Secondly, sorry for mixing issues. Please let me know if I should create new ticket but another observation.

    After I have got the response from OpenAI, I get another message from Bot as “You may choose option from below.” I am not sure from where or how this comes? As I have disabled all options from “Predefined Intents”

    https://ibb.co/pRVSS93

    • This reply was modified 1 month ago by Deepak.
    Plugin Author QuantumCloud

    (@quantumcloud)

    Your screenshot did not come through. I checked with the same query and it provided code for both:

    The text “You may choose option from below.” is the default text that shows after the bot displays a response to keep the conversation going. You can change it to anything like “Insert your question and press enter for more” from the Settings->Change Language.

    Thanks

    Plugin Author QuantumCloud

    (@quantumcloud)

    Seems like WordPress forum is having image upload problem. Here are the screenshots:
    https://prnt.sc/RqwFpbuFcgan

    https://prnt.sc/Zbq8N8uKcFAX

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.