Chatbot (Frontend Only)
Want to get started quickly? Check out this frontend only example! They're the fastest way to see the SDK in action. However, these examples are meant for testing and exploration only. In a real application, it's important to protect your API key. We'll show you how to do that in our secure setup guide.
1. Create Chat Agent
Create Project

Create a Chat Agent at Project > Chat Table > New Agent
Configure your agent. You can define the following parameters.
Agent ID
Name of Agent
Model
LLM model
Temperature
Max tokens
Top-p
System Prompt
Define the persona of the model
User message
Define the conversational opener between User and AI
AI response
Define the conversational opener between User and AI

2. Get the following information to start using JamAIBase
Get the Agent ID.
Get the Project ID.

Create JamAI API Key at Organization > Secrets > Create API Key.

3. Clone the Chatbot Example
git clone https://github.com/EmbeddedLLM/jamaibase-cookbook
# example is at https://github.com/EmbeddedLLM/jamaibase-cookbook/tree/main/quickstart/nlux/0001-chat-with-jamai-agent
4. Update the App.tsx
...
const baseURL = "https://api.jamaibase.com";
const apiKey = "<jamaibase-api-key";
const projectId = "<jamaibase-project-id>";
const agentId = "<your-agent-id";
...
5. Start app
cd jamaibase-cookbook/quickstart/nlux/0001-chat-with-jamai-agent
npm install
npm run dev
Open up your app at http://localhost:5173 .
6. Manage and View Conversation Histories in Chat Table

Last updated
Was this helpful?