Find answers from the community

Updated 3 months ago

Has anyone tried building a bot similar

Has anyone tried building a bot similar to kapa.ai? I’m curious if what they do is achievable purely / mostly - by storing the documentation in markdown directly, thus allowing the bot to respond to queries with markdown code.

I want to do something similar for a hobby project, currently the source corpus isn’t markdown, but I want nicely formatted responses and special things like class names called out with code tags.

Anywho, any thoughts or references I should look into are appreciated
W
N
8 comments
I'm interested to know more about this too. Creating a thread so that if someone pings. I get an update too 🙂
It seems like whenever i interact with openai's chat completion it returns pure text, but the website always returns markdown, curious what im doing wrong, and if maybe im suppose to be sending a flag
Yeah I get it, Did you tried sending some instruction in OpenAI's completion? Like If the response contains some code make it in markdown format

something like this
Or simply add the isntruction to return response in Mardown format only
I tried this in playground just now. Thid following is the output and it provided the code in markdown

You have to provide the response in Markdown format only.
Question: What is the code of palindrome. Explain it also.
Answer:
A palindrome is a word, sentence or verse that reads the same backwards or forwards.

The code to check if a string is a palindrome is:

Plain Text
function isPalindrome(str) {
  revStr = str.split('').reverse().join('');
  if (revStr === str) {
    return true;
  }
  else {
    return false;
  }
}


The function takes a string as an argument, then it splits it into an array of characters, reverses the order, re-joins them back together and compares it with the original string. If it is the same, then it returns true, otherwise it returns false.
Yeah, that part appears to work, but since im seeding it, and it's basically explaining things back to me from seeded documentation, im clearly missing 'something', to give it the capability to know to do things like when you ask it a general programming question about a library the LLM itself has been trained to know about, e.g.
Attachment
image.png
Did you try modifying the prompt to provide some instructions to make code appear in markdown format only?
Yeah, but it didn't know to highlight certain words. Like it understands when generating code if it has data i guess that those are keywords, but I think I basically need to feed it markdown of maybe an API where those words are wrapped in markdown class for it to get the idea
Add a reply
Sign up and join the conversation on Discord