Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
f92d024
Migrate AI Chatbot to Streamdown
haydenbleasel Nov 24, 2025
44702f6
Migrate AI Drug Assistant to Streamdown
haydenbleasel Nov 24, 2025
1417ece
Migrate AI Master Chef to Streamdown
haydenbleasel Nov 24, 2025
a7425f1
Migrate API Sec Consultant to Streamdown
haydenbleasel Nov 24, 2025
34e3a65
Migrate ASCII Software Architect to Streamdown
haydenbleasel Nov 24, 2025
b406378
Migrate Ask Docs RAG to Streamdown
haydenbleasel Nov 24, 2025
84e13a4
Migrate CEFR Level Assessment Bot to Streamdown
haydenbleasel Nov 24, 2025
4a312da
Migrate Career Prep Coach to Streamdown
haydenbleasel Nov 24, 2025
43e7df4
Fix typos in READMEs
haydenbleasel Nov 24, 2025
763d1b9
Migrate Code Alchemist to Streamdown
haydenbleasel Nov 24, 2025
44b4b82
Migrate Dev Screener to Streamdown
haydenbleasel Nov 24, 2025
26152a4
Migrate Excel Master to Streamdown
haydenbleasel Nov 24, 2025
a7a771d
Migrate Expert Proofreader to Streamdown
haydenbleasel Nov 24, 2025
45a8ada
Migrate JS Tutor to Streamdown
haydenbleasel Nov 24, 2025
75fe7b5
Migrate Notedash to Streamdown
haydenbleasel Nov 24, 2025
c21a844
Migrate Product Review Generator to Streamdown
haydenbleasel Nov 24, 2025
75cc287
Migrate Psuedocode Generator to Streamdown
haydenbleasel Nov 24, 2025
089a1a2
Migrate Rag Chatbot to Streamdown
haydenbleasel Nov 24, 2025
73014ea
Migrate Resume Tailor to Streamdown
haydenbleasel Nov 24, 2025
6cbefbb
Migrate Slack Agent to Streamdown
haydenbleasel Nov 24, 2025
2db94ed
Migrate Tech Guide Writer to Streamdown
haydenbleasel Nov 24, 2025
4808f0c
Migrate Text Summarizer to Streamdown
haydenbleasel Nov 24, 2025
44a6cbd
Migrate Therapeutic Assistant to Streamdown
haydenbleasel Nov 24, 2025
47d46d0
Migrate Video Wisdom to Streamdown
haydenbleasel Nov 24, 2025
4d71d6d
Remove unused dependency from newsgpt
haydenbleasel Nov 24, 2025
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
2 changes: 1 addition & 1 deletion examples/ai-chatbot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ To get started with Langbase, you'll need to [create a free personal account on

1. Fork the [AI Chatbot][pipe] Pipe on ⌘ Langbase.
2. Go to Langbase API keys page and [generate an API key][api-key] (to be used on server-side only).
3. Download the example project folder from [here][download] or clone the reppository.
3. Download the example project folder from [here][download] or clone the repository.
4. `cd` into the project directory and open it in your code editor.
5. Duplicate the `.env.example` file in this project and rename it to `.env.local`.
6. Add the following environment variables:
Expand Down
47 changes: 2 additions & 45 deletions examples/ai-chatbot/components/chat-message.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import { Message } from '@baseai/core'
import remarkGfm from 'remark-gfm'
import remarkMath from 'remark-math'
import { Streamdown } from 'streamdown'

import { ChatMessageActions } from '@/components/chat-message-actions'
import { MemoizedReactMarkdown } from '@/components/markdown'
import { CodeBlock } from '@/components/ui/codeblock'
import { IconSparkles, IconUser } from '@/components/ui/icons'
import cn from 'mxcn'

Expand All @@ -29,47 +26,7 @@ export function ChatMessage({ message, ...props }: ChatMessageProps) {
{message.role === 'user' ? <IconUser /> : <IconSparkles />}
</div>
<div className="ml-4 flex-1 space-y-2 overflow-hidden px-1">
<MemoizedReactMarkdown
className="prose dark:prose-invert prose-p:leading-relaxed prose-pre:p-0 prose-pre:rounded-xl break-words rounded-xl"
remarkPlugins={[remarkGfm, remarkMath]}
components={{
p({ children }) {
return <p className="mb-2 last:mb-0">{children}</p>
},
code({ node, inline, className, children, ...props }) {
if (children.length) {
if (children[0] == '▍') {
return (
<span className="mt-1 animate-pulse cursor-default">▍</span>
)
}

children[0] = (children[0] as string).replace('`▍`', '▍')
}

const match = /language-(\w+)/.exec(className || '')

if (inline) {
return (
<code className={className} {...props}>
{children}
</code>
)
}

return (
<CodeBlock
key={Math.random()}
language={(match && match[1]) || ''}
value={String(children).replace(/\n$/, '')}
{...props}
/>
)
}
}}
>
{message.content || ''}
</MemoizedReactMarkdown>
<Streamdown>{message.content}</Streamdown>
<ChatMessageActions message={message} />
</div>
</div>
Expand Down
9 changes: 0 additions & 9 deletions examples/ai-chatbot/components/markdown.tsx

This file was deleted.

145 changes: 0 additions & 145 deletions examples/ai-chatbot/components/ui/codeblock.tsx

This file was deleted.

8 changes: 2 additions & 6 deletions examples/ai-chatbot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,15 @@
"next": "14.2.20",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-markdown": "^8.0.7",
"react-syntax-highlighter": "^15.6.1",
"react-textarea-autosize": "^8.5.6",
"remark-gfm": "^3.0.1",
"remark-math": "^5.1.1",
"sonner": "^1.7.1"
"sonner": "^1.7.1",
"streamdown": "^1.6.6"
},
"devDependencies": {
"@tailwindcss/typography": "^0.5.15",
"@types/node": "^17.0.12",
"@types/react": "^18.0.22",
"@types/react-dom": "^18.0.7",
"@types/react-syntax-highlighter": "^15.5.6",
"@typescript-eslint/parser": "^5.59.7",
"autoprefixer": "^10.4.20",
"eslint": "^8.31.0",
Expand Down
Loading