DEV Community

Cortexx AI
Cortexx AI

Posted on • Edited on

BUILD A CUSTOM AI CHATBOT WITH FLOWISE

GET API KEYS - & save them (ideally in notepad - its appropriate to have a consistent name):

  • Groq Api keys
  • Cohere (for this, just click on the eye icon & copy key)

OPEN ANOTHER TAB & GO TO PINECONE WEBSITE

  • Open an account
  • Get Pinecone API
  • Create index
  • On the boxes below, scroll to & select “manual configuration”
  • Default name should be “chatbot”
  • Set dimension to 4096

CREATE FLOWISE ACCOUNT

  • On the left side click on “Agent Flows”
  • Then “Add agent” (click on the blue icon)
  • Drag the agent to the workspace
  • Connect the start and agent

CUSTOMIZING AGENT

  • Double tap on the “Agent 0” (you can rename it to “chatbot”)
  • For Model scroll down and choose “Groq chat”
  • Click the dropdown on the parameters and fill the details as below
  • Credentials is where you add the api details you saved earlier (name & keys)
  • Model name should be llama 3.3-70b-versatile
  • Set temperature to 0.5
  • Skip max tokens
  • Turn off streaming

Messages part

  • Role should be “system”
  • Prompt should be “You are a chat assistant on accessing documents. Your role is to answer user questions bases on the documents uploaded or will upload. Make sure to give answers from the documents and If you do not, say "I do not have information about the question asked at the moment"
  • Click outside the whole modal to save

Back on Flowise (on the left panel)

GO TO DOCUMENT STORES

  • Add document details - name & description
  • Add documents loader - select pdf
  • Upload the document the model will be trained on
  • Scroll down to splitter part and select “text splitter recursive”
  • Click “preview chunks” on the right side
  • Then click “process” on the top right corner
  • After processing, click on the dropdown options button
  • Then click “upsert chunks”
  • Select cohere embeddings
  • At the credentials part, put the cohere details you saved earlier (name & API keys)
  • Model name should stay as “embed-english-v2.0

Go back to the flowise tab

  • Connect the pinecone credentials (name & API)
  • Click on “upsert” from the top right corner
  • After upsetting, a pop up will come. Just close it
  • Save config

GO BACK TO AGENTFLOWS on the flowise left panel

  • Click on the created agent
  • Double click on agent 0
  • Scroll down to “Document store”
  • Document store is supposed to show you the document you just upserted
  • Save File. Always save

*Your chatbot should be live now. *

Click on the purple message button on the top right corner and start chatting.

Top comments (0)