{"id":13520983,"url":"https://github.com/writingmate/chatlabs","last_synced_at":"2025-03-31T20:30:21.434Z","repository":{"id":177727751,"uuid":"660817667","full_name":"writingmate/chatlabs","owner":"writingmate","description":null,"archived":false,"fork":false,"pushed_at":"2024-10-29T22:10:25.000Z","size":3559,"stargazers_count":59,"open_issues_count":29,"forks_count":37,"subscribers_count":7,"default_branch":"main","last_synced_at":"2024-10-29T22:46:41.552Z","etag":null,"topics":["anthropic","assistant-api","chatbot","chatbot-ui","chatgpt","claude-3","dalle-3","gemini","gemini-pro-vision","google","gpt-4-turbo","langchain","llama2","search","webui"],"latest_commit_sha":null,"homepage":"https://writingmate.ai/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/writingmate.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-30T23:41:30.000Z","updated_at":"2024-10-29T20:18:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"3a657e40-97e9-4088-a328-13b1308b6495","html_url":"https://github.com/writingmate/chatlabs","commit_stats":{"total_commits":860,"total_committers":43,"mean_commits":20.0,"dds":"0.27209302325581397","last_synced_commit":"8cd3ae0c1176c3131c29aff8687699a2e2b2ac82"},"previous_names":["writingmate/webapp","writingmate/chatlabs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writingmate%2Fchatlabs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writingmate%2Fchatlabs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writingmate%2Fchatlabs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writingmate%2Fchatlabs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/writingmate","download_url":"https://codeload.github.com/writingmate/chatlabs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246535702,"owners_count":20793308,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anthropic","assistant-api","chatbot","chatbot-ui","chatgpt","claude-3","dalle-3","gemini","gemini-pro-vision","google","gpt-4-turbo","langchain","llama2","search","webui"],"created_at":"2024-08-01T06:00:25.494Z","updated_at":"2025-03-31T20:30:21.197Z","avatar_url":"https://github.com/writingmate.png","language":"TypeScript","readme":"# ChatLabs\n\n\u003cimg width=\"1464\" alt=\"image\" src=\"https://github.com/writingmate/chatlabs/assets/420428/aad7706f-8b8d-4671-b668-0e38babc5f09\"\u003e\n\n\nChatLabs is all-in-one LLM chat platform with access to over 20+ LLMs in one place. \nIt comes with Web Search and Image Generation plugins included.\n\nChatLabs is a fork of the [ChatbotUI](https://github.com/mckaywrigley/chatbot-ui) project.\n\n## Demo\n\nView the latest demo [here](https://twitter.com/avysotsky/status/1765805788402995206).\n\n## Official Hosted Version\n\nUse ChatLabs without having to host it yourself!\n\nFind the official hosted version of ChatLabs [here](https://labs.writingmate.ai).\n\n## Issues\n\nWe restrict \"Issues\" to actual issues related to the codebase.\n\nWe're getting excessive amounts of issues that amount to things like feature requests, cloud provider issues, etc.\n\nIf you are having issues with things like setup, please refer to the \"Help\" section in the \"Discussions\" tab above.\n\nIssues unrelated to the codebase will likely be closed immediately.\n\n## Discussions\n\nWe highly encourage you to participate in the \"Discussions\" tab above!\n\nDiscussions are a great place to ask questions, share ideas, and get help.\n\nOdds are if you have a question, someone else has the same question.\n\n## Updating\n\nIn your terminal at the root of your local ChatLabs repository, run:\n\n```bash\nnpm run update\n```\n\nIf you run a hosted instance you'll also need to run:\n\n```bash\nnpm run db-push\n```\n\nto apply the latest migrations to your live database.\n\n## Local Quickstart\n\nFollow these steps to get your own ChatLabs instance running locally.\n\n### 1. Clone the Repo\n\n```bash\ngit clone https://github.com/writingmate/chatlabs.git\n```\n\n### 2. Install Dependencies\n\nOpen a terminal in the root directory of your local ChatLabs repository and run:\n\n```bash\nnpm install\n```\n\n### 3. Install Supabase \u0026 Run Locally\n\n#### 1. Install Docker\n\nYou will need to install Docker to run Supabase locally. You can download it [here](https://docs.docker.com/get-docker) for free.\n\n#### 2. Install Supabase CLI\n\n**MacOS/Linux**\n\n```bash\nbrew install supabase/tap/supabase\n```\n\n**Windows**\n\n```bash\nscoop bucket add supabase https://github.com/supabase/scoop-bucket.git\nscoop install supabase\n```\n\n#### 3. Start Supabase\n\nIn your terminal at the root of your local ChatLabs repository, run:\n\n```bash\nsupabase start\n```\n\n### 4. Fill in Secrets\n\n#### 1. Environment Variables\n\nIn your terminal at the root of your local ChatLabs repository, run:\n\n```bash\ncp .env.local.example .env.local\n```\n\n#### 2. Additional env variables for supabase\n\nPlease do not share these credentials with anyone. This is a quickfix and we need to figure out how to encorporate these into the env file above.\n\n```\nexport SUPABASE_AUTH_EXTERNAL_GOOGLE_CLIENT_ID=xxx\nexport SUPABASE_AUTH_EXTERNAL_GOOGLE_CLIENT_SECRET=xxx\n```\n\nGet the required values by running:\n\n```bash\nsupabase status\n```\n\nNote: Use `API URL` from `supabase status` for `NEXT_PUBLIC_SUPABASE_URL`\n\nNow go to your `.env.local` file and fill in the values.\n\nIf the environment variable is set, it will disable the input in the user settings.\n\n#### 2. SQL Setup\n\nIn the 1st migration file `supabase/migrations/20240108234540_setup.sql` you will need to replace 2 values with the values you got above:\n\n- `project_url` (line 53): `http://supabase_kong_chatbotui:8000` (default) can remain unchanged if you don't change your `project_id` in the `config.toml` file\n- `service_role_key` (line 54): You got this value from running `supabase status`\n\nThis prevents issues with storage files not being deleted properly.\n\n### 5. Install Ollama (optional for local models)\n\nFollow the instructions [here](https://github.com/ollama/ollama#macos).\n\n### 6. Run app locally\n\nIn your terminal at the root of your local ChatLabs repository, run:\n\n```bash\nnpm run chat\n```\n\nYour local instance of ChatLabs should now be running at [http://localhost:3000](http://localhost:3000). Be sure to use a compatible node version (i.e. v18).\n\nYou can view your backend GUI at [http://localhost:54323/project/default/editor](http://localhost:54323/project/default/editor).\n\n## Hosted Quickstart\n\nFollow these steps to get your own ChatLabs instance running in the cloud.\n\nVideo tutorial coming soon.\n\n### 1. Follow Local Quickstart\n\nRepeat steps 1-4 in \"Local Quickstart\" above. If you want to use Ollama, also follow the instructions linked in step 5.\n\nYou will want separate repositories for your local and hosted instances.\n\nCreate a new repository for your hosted instance of ChatLabs on GitHub and push your code to it.\n\n### 2. Setup Backend with Supabase\n\n#### 1. Create a new project\n\nGo to [Supabase](https://supabase.com/) and create a new project.\n\n#### 2. Get Project Values\n\nOnce you are in the project dashboard, click on the \"Project Settings\" icon tab on the far bottom left.\n\nHere you will get the values for the following environment variables:\n\n- `Project Ref`: Found in \"General settings\" as \"Reference ID\"\n\n- `Project ID`: Found in the URL of your project dashboard (Ex: https://supabase.com/dashboard/project/\u003cYOUR_PROJECT_ID\u003e/settings/general)\n\nWhile still in \"Settings\" click on the \"API\" text tab on the left.\n\nHere you will get the values for the following environment variables:\n\n- `Project URL`: Found in \"API Settings\" as \"Project URL\"\n\n- `Anon key`: Found in \"Project API keys\" as \"anon public\"\n\n- `Service role key`: Found in \"Project API keys\" as \"service_role\" (Reminder: Treat this like a password!)\n\n#### 3. Configure Auth\n\nNext, click on the \"Authentication\" icon tab on the far left.\n\nIn the text tabs, click on \"Providers\" and make sure \"Email\" is enabled.\n\nWe recommend turning off \"Confirm email\" for your own personal instance.\n\n#### 4. Connect to Hosted DB\n\nOpen up your repository for your hosted instance of ChatLabs.\n\nIn the 1st migration file `supabase/migrations/20240108234540_setup.sql` you will need to replace 2 values with the values you got above:\n\n- `project_url` (line 53): Use the `Project URL` value from above\n- `service_role_key` (line 54): Use the `Service role key` value from above\n\nNow, open a terminal in the root directory of your local ChatLabs repository. We will execute a few commands here.\n\nLogin to Supabase by running:\n\n```bash\nsupabase login\n```\n\nNext, link your project by running the following command with the \"Project ID\" you got above:\n\n```bash\nsupabase link --project-ref \u003cproject-id\u003e\n```\n\nYour project should now be linked.\n\nFinally, push your database to Supabase by running:\n\n```bash\nsupabase db push\n```\n\nYour hosted database should now be set up!\n\n### 3. Setup Frontend with Vercel\n\nGo to [Vercel](https://vercel.com/) and create a new project.\n\nIn the setup page, import your GitHub repository for your hosted instance of ChatLabs. Within the project Settings, in the \"Build \u0026 Development Settings\" section, switch Framework Preset to \"Next.js\".\n\nIn environment variables, add the following from the values you got above:\n\n- `NEXT_PUBLIC_SUPABASE_URL`\n- `NEXT_PUBLIC_SUPABASE_ANON_KEY`\n- `SUPABASE_SERVICE_ROLE_KEY`\n- `NEXT_PUBLIC_OLLAMA_URL` (only needed when using local Ollama models; default: `http://localhost:11434`)\n\nYou can also add API keys as environment variables.\n\n- `OPENAI_API_KEY`\n- `AZURE_OPENAI_API_KEY`\n- `AZURE_OPENAI_ENDPOINT`\n- `AZURE_GPT_45_VISION_NAME`\n\nFor the full list of environment variables, refer to the '.env.local.example' file. If the environment variables are set for API keys, it will disable the input in the user settings.\n\nClick \"Deploy\" and wait for your frontend to deploy.\n\nOnce deployed, you should be able to use your hosted instance of ChatLabs via the URL Vercel gives you.\n\n## Platform Tools\n\nWe've introduced a new feature that allows every user to access a set of platform tools directly within the application. These tools are designed to enhance your productivity and streamline your workflow. Here's a quick overview of the tools currently available:\n\n* **Web Scraper Tool**:  This tool fetches data from a URL and returns it in markdown format to the LLM. It's perfect for quickly grabbing content from web pages without having to manually copy and paste or write markdown. It also supports google fetching results from google search and summarizing youtube videos. \n\n* **Image Generation Tool**:  This tool generates AI images with Dall-E. \n\nFor adding or removing platform tools, consult the [platformToolsList.ts](./lib/platformTools/platformToolsList.ts) document.\n\nTo introduce a new tool, utilize the `PlatformTool` interface and incorporate it into the aforementioned list. For a practical illustration, examine the [webScraperTool.ts](./lib/platformTools/library/webScraperTool.ts) example.\n\n## Contact\n\nMessage Artem on [Twitter/X](https://twitter.com/avysotsky)\n","funding_links":[],"categories":["Applications"],"sub_categories":["AI Platforms"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwritingmate%2Fchatlabs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwritingmate%2Fchatlabs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwritingmate%2Fchatlabs/lists"}