Usage & Examples
Examples of how to use Chat, Multimodal, Image Upload, and Copy Response features.
1. Using the Web Chat Interface
Open your browser and navigate to:http://localhost:3000
Type your message and receive real-time responses.
2. Basic Prompt Example
Write a one-paragraph summary describing the impact of artificial intelligence on small businesses.
3. System Prompt Example
System prompt: You are a concise and formal AI assistant. Provide structured answers only.
4. REST API Example
Example curl request to the chat API:
curl http://localhost:3000/api/chat -X POST -H "Content-Type: application/json" -d '{
"model": "llama3",
"messages": [
{ "role": "user", "content": "What is Jeko AI?" }
]
}'5. WebSocket Streaming Example
Connect to a WebSocket endpoint and stream messages:
const ws = new WebSocket("ws://localhost:3000/ws");
ws.onopen = () => {
ws.send(JSON.stringify({ message: "Hello Jeko AI" }));
};
ws.onmessage = (event) => {
console.log("stream:", event.data);
};6. Example: Multi-Turn Conversation
Example dialog:
User: Generate a business plan outline.
Assistant: (returns a structured outline)
User: Expand section 3 into a full description.
All features run fully on the client side, except for API calls.