Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
@langbase/components
Advanced tools
A component library for building AI powered web apps.
npm install @langbase/components
# or
yarn add @langbase/components
# or
pnpm add @langbase/components
Import the styles in the root layout of your app.
import '@langbase/components/styles'
'use client';
import { Chatbot } from '@langbase/components';
export default function App() {
return (
<Chatbot
apiRoute="/api/chat"
suggestions={[
{
title: `Explain how to get started in easy steps`,
prompt: `Explain how to get started in easy steps?`,
},
{
title: `How do I create an API key?`,
prompt: `How do I create an API key?`,
},
{
title: `What are the supported providers?`,
prompt: `What are the supported providers?`,
},
{
title: `How do I reset my password?`,
prompt: `How do I reset my password?`,
},
]}
/>
);
}
Name | Type | Required | Default | Description |
---|---|---|---|---|
apiRoute | string | true | - | The API route where the Langbase AI Pipe is called. |
suggestions | Array | false | [] | An array of suggestions to show to the user. |
trigger | React.ReactNode | false | - | A custom React component to open the chatbot. |
openingMessage | string | false | - | The opening message to show when the chatbot opens. |
onConnect | Function | false | - | A function that is called before request |
onResponse | Function | false | - | A function that is called everytime chatbot receives a stream chunk. |
onError | Function | false | - | A function that is called when there is an error. |
onFinish | Function | false | - | A function that is called after the AI text stream finishes. |
If you've found an issue with any of the components, please reach out to us at support@langbase.com.
FAQs
Ready to use components for building AI powered web apps
The npm package @langbase/components receives a total of 73 weekly downloads. As such, @langbase/components popularity was classified as not popular.
We found that @langbase/components demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.