Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add chatbot #969

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/app/chat.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client';

import { Chatbot } from '@langbase/components';
import {Chatbot} from '@langbase/components';
import '@langbase/components/styles';

export default function Chat() {
Expand All @@ -11,8 +11,9 @@ export default function Chat() {
background-color: #dedede;
}
`}</style>
<Chatbot apiRoute="/docs/api/chat"
openingMessage="Hi there! Welcome to Ask Sourcegraph AI agent. How can I help you?"
<Chatbot
apiRoute="/docs/api/chat"
openingMessage="Hi there! I'm Sourcegraph's AI assistant trained for our documentation. How can I help you?"
// Remember AI can make mistakes, please double-check responses.
suggestions={[
{
Expand Down
13 changes: 7 additions & 6 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { Providers } from '@/app/providers';
import { Layout } from '@/components/Layout';
import { GoogleAnalytics } from '@next/third-parties/google';
import Chat from '@/app/chat';
import {Providers} from '@/app/providers';
import {Layout} from '@/components/Layout';
import {GoogleAnalytics} from '@next/third-parties/google';
import clsx from 'clsx';
import config from 'docs.config';
import { type Metadata } from 'next';
import { Inter } from 'next/font/google';
import {type Metadata} from 'next';
import {Inter} from 'next/font/google';
import localFont from 'next/font/local';

import '@/styles/tailwind.css';
Expand Down Expand Up @@ -98,7 +99,7 @@ export default function RootLayout({children}: {children: React.ReactNode}) {
className="flex min-h-full bg-light-bg dark:bg-dark-bg"
>
<Providers>
{/* <Chat /> */}
<Chat />
<Layout>{children}</Layout>
</Providers>
</body>
Expand Down