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

NEW:Add Auto-synced LB Memory for docs #717

Draft
wants to merge 1 commit 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: 7 additions & 0 deletions .env.baseai.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# !! SERVER SIDE ONLY !!
# Keep all your API keys secret — use only on the server side.

# TODO: ADD: Both in your production and local env files.
# Langbase API key for your User or Org account.
# How to get this API key https://langbase.com/docs/api-reference/api-keys
LANGBASE_API_KEY=
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,8 @@ next-env.d.ts

# We ignore the generated file as it should always be generated
public/technical-changelog.rss

# baseai
**/.baseai/
# env file
.env
18 changes: 18 additions & 0 deletions baseai/baseai.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import type { BaseAIConfig } from 'baseai';

export const config: BaseAIConfig = {
log: {
isEnabled: true,
logSensitiveData: false,
pipe: true,
'pipe.completion': true,
'pipe.request': true,
'pipe.response': true,
tool: true,
memory: true
},
memory: {
useLocalEmbeddings: false
},
envFilePath: '.env'
};
15 changes: 15 additions & 0 deletions baseai/memory/docs/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { MemoryI } from '@baseai/core';
import path from 'path';

const memoryDocs = (): MemoryI => ({
name: 'docs',
description: 'Docs folder of sourcegraph docs repository as an auto-synced memory',
config: {
deployedCommitHash: '7a147cfb18f19d5584ffb3805b678db47191960a',
useGitRepo: true,
dirToTrack: path.posix.join('.', 'docs'),
extToTrack: [".md",".mdx"]
}
});

export default memoryDocs;
141 changes: 72 additions & 69 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,70 +1,73 @@
{
"name": "sourcegraph-docs",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"browserslist": "defaults, not ie <= 11",
"dependencies": {
"@algolia/autocomplete-core": "^1.9.2",
"@algolia/client-search": "^4.22.1",
"@docsearch/react": "3",
"@headlessui/react": "^1.7.13",
"@heroicons/react": "^2.0.18",
"@mdx-js/mdx": "^3.0.1",
"@next/third-parties": "^14.1.4",
"@radix-ui/react-hover-card": "^1.1.1",
"@radix-ui/react-select": "^2.0.0",
"@radix-ui/react-slot": "^1.0.2",
"@tailwindcss/typography": "^0.5.7",
"@types/node": "20.4.9",
"@types/react": "18.2.20",
"@types/react-dom": "18.2.7",
"@types/react-highlight-words": "^0.16.4",
"algoliasearch": "^4.22.1",
"autoprefixer": "^10.4.12",
"class-variance-authority": "^0.7.0",
"clsx": "^1.2.1",
"contentlayer": "^0.3.4",
"date-fns": "^2.30.0",
"fast-glob": "^3.2.12",
"feed": "^4.2.2",
"flexsearch": "^0.7.31",
"github-slugger": "^2.0.0",
"js-yaml": "^4.1.0",
"kbar": "^0.1.0-beta.44",
"lucide-react": "^0.372.0",
"mdx": "^0.3.1",
"next": "^14.2.3",
"next-contentlayer": "^0.3.4",
"next-themes": "^0.2.1",
"prism-react-renderer": "^2.0.6",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-highlight-words": "^0.20.0",
"react-syntax-highlighter": "^15.5.0",
"rehype-autolink-headings": "^7.1.0",
"rehype-pretty-code": "^0.10.2",
"rehype-slug": "^6.0.0",
"rehype-toc": "^3.0.2",
"remark-gfm": "3.0.1",
"shiki": "^0.14.5",
"simple-functional-loader": "^1.2.1",
"tailwind-merge": "^2.3.0",
"tailwindcss": "^3.3.3",
"tailwindcss-animate": "^1.0.7",
"typescript": "5.1.6",
"unist-util-visit": "^5.0.0"
},
"devDependencies": {
"eslint": "8.45.0",
"eslint-config-next": "13.4.16",
"prettier": "^3.0.1",
"prettier-plugin-tailwindcss": "^0.5.2",
"sharp": "^0.32.0"
}
}
"name": "sourcegraph-docs",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint",
"baseai": "baseai"
},
"browserslist": "defaults, not ie <= 11",
"dependencies": {
"@algolia/autocomplete-core": "^1.9.2",
"@algolia/client-search": "^4.22.1",
"@baseai/core": "^0.9.14",
"@docsearch/react": "3",
"@headlessui/react": "^1.7.13",
"@heroicons/react": "^2.0.18",
"@mdx-js/mdx": "^3.0.1",
"@next/third-parties": "^14.1.4",
"@radix-ui/react-hover-card": "^1.1.1",
"@radix-ui/react-select": "^2.0.0",
"@radix-ui/react-slot": "^1.0.2",
"@tailwindcss/typography": "^0.5.7",
"@types/node": "20.4.9",
"@types/react": "18.2.20",
"@types/react-dom": "18.2.7",
"@types/react-highlight-words": "^0.16.4",
"algoliasearch": "^4.22.1",
"autoprefixer": "^10.4.12",
"class-variance-authority": "^0.7.0",
"clsx": "^1.2.1",
"contentlayer": "^0.3.4",
"date-fns": "^2.30.0",
"fast-glob": "^3.2.12",
"feed": "^4.2.2",
"flexsearch": "^0.7.31",
"github-slugger": "^2.0.0",
"js-yaml": "^4.1.0",
"kbar": "^0.1.0-beta.44",
"lucide-react": "^0.372.0",
"mdx": "^0.3.1",
"next": "^14.2.3",
"next-contentlayer": "^0.3.4",
"next-themes": "^0.2.1",
"prism-react-renderer": "^2.0.6",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-highlight-words": "^0.20.0",
"react-syntax-highlighter": "^15.5.0",
"rehype-autolink-headings": "^7.1.0",
"rehype-pretty-code": "^0.10.2",
"rehype-slug": "^6.0.0",
"rehype-toc": "^3.0.2",
"remark-gfm": "3.0.1",
"shiki": "^0.14.5",
"simple-functional-loader": "^1.2.1",
"tailwind-merge": "^2.3.0",
"tailwindcss": "^3.3.3",
"tailwindcss-animate": "^1.0.7",
"typescript": "5.1.6",
"unist-util-visit": "^5.0.0"
},
"devDependencies": {
"baseai": "^0.9.14",
"eslint": "8.45.0",
"eslint-config-next": "13.4.16",
"prettier": "^3.0.1",
"prettier-plugin-tailwindcss": "^0.5.2",
"sharp": "^0.32.0"
}
}
Loading
Loading