{"id":28380559,"url":"https://github.com/context-labs/toly-gpt","last_synced_at":"2025-06-24T21:31:26.270Z","repository":{"id":240328732,"uuid":"619234549","full_name":"context-labs/toly-gpt","owner":"context-labs","description":"A chatbot trained on the Solana validator codebase.","archived":false,"fork":false,"pushed_at":"2023-03-26T17:10:51.000Z","size":9211,"stargazers_count":50,"open_issues_count":0,"forks_count":11,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-06T03:35:40.670Z","etag":null,"topics":["documentation-tool","llm","solana"],"latest_commit_sha":null,"homepage":"https://TolyGPT.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/context-labs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-03-26T16:56:41.000Z","updated_at":"2025-06-03T21:56:08.000Z","dependencies_parsed_at":"2024-05-18T03:57:38.165Z","dependency_job_id":null,"html_url":"https://github.com/context-labs/toly-gpt","commit_stats":null,"previous_names":["context-labs/toly-gpt"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/context-labs/toly-gpt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/context-labs%2Ftoly-gpt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/context-labs%2Ftoly-gpt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/context-labs%2Ftoly-gpt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/context-labs%2Ftoly-gpt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/context-labs","download_url":"https://codeload.github.com/context-labs/toly-gpt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/context-labs%2Ftoly-gpt/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261759094,"owners_count":23205494,"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":["documentation-tool","llm","solana"],"created_at":"2025-05-30T03:08:46.265Z","updated_at":"2025-06-24T21:31:26.258Z","avatar_url":"https://github.com/context-labs.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# TolyGPT\n\n[TolyGPT.com](https://tolygpt.com) is a chatbot powered by GPT-4 and trained on the [Solana validator](https://github.com/solana-labs/solana) codebase. You can use TolyGPT to ask questions about how the Solana validator works and receive highly specific answers with references back to code files.\n\nThis version of TolyGPT is available here mostly for research and record keeping purposes. If you're interested in something similar for your project, please see [Autodoc](https://github.com/context-labs/autodoc), which contains an updated version of the core TolyGPT functionality designed for use with your own repositories.\n\n## Credit\n\nThis project was originally forked from Sean Sullivans's [chatlangchain-js](https://github.com/sullivan-sean/chat-langchainjs) repository. The credit for the UI and core querying flow goes to him.\n\nOther contributors include:\n- [ChatLangChain](https://github.com/hwchase17/chat-langchain) - for the backend and data ingestion logic\n- [LangChain Chat NextJS](https://github.com/zahidkhawaja/langchain-chat-nextjs) - for the frontend.\n\n## Getting Started\n\n**NOTE:** This instructions below may not work. please see [Autodoc](https://github.com/context-labs/autodoc) for an updated version. If you must use this project, do so at your own risk.\n\nThis is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).\n\nFirst, create a new `.env` file from `.env.example` and add your OpenAI API key found [here](https://platform.openai.com/account/api-keys).\n\n```bash\ncp .env.example .env\n```\n\n### Prerequisites\n\n- [Node.js](https://nodejs.org/en/download/) (v16 or higher)\n- [Yarn](https://classic.yarnpkg.com/en/docs/install/#mac-stable)\n- `wget` (on macOS, you can install this with `brew install wget`)\n\nNext, we'll need to load our data source.\n\n### Data Ingestion\n\nData ingestion happens in two steps.\n\nFirst, you should run\n\n```bash\nsh download.sh\n```\n\nThis will download our data source (in this case the Langchain docs ).\n\nNext, install dependencies and run the ingestion script:\n\n```bash\nyarn \u0026\u0026 yarn ingest\n```\n\n_Note: If on Node v16, use `NODE_OPTIONS='--experimental-fetch' yarn ingest`_\n\nThis will parse the data, split text, create embeddings, store them in a vectorstore, and\nthen save it to the `data/` directory.\n\nWe save it to a directory because we only want to run the (expensive) data ingestion process once.\n\nThe Next.js server relies on the presence of the `data/` directory. Please\nmake sure to run this before moving on to the next step.\n\n### Running the Server\n\nThen, run the development server:\n\n```bash\nyarn dev\n```\n\nOpen [http://localhost:3000](http://localhost:3000) with your browser to see the result.\n\n### Deploying the server\n\nThe production version of this repo is hosted on\n[fly](https://chat-langchainjs.fly.dev/). To deploy your own server on Fly, you\ncan use the provided `fly.toml` and `Dockerfile` as a starting point.\n\n**Note:** As a Next.js app it seems like Vercel is a natural place to\nhost this site. Unfortunately there are\n[limitations](https://github.com/websockets/ws/issues/1786#issuecomment-678315435)\nto secure websockets using `ws` with Next.js which requires using a custom\nserver which cannot be hosted on Vercel. Even using server side events, it\nseems, Vercel's serverless functions seem to prohibit streaming responses\n(e.g. see\n[here](https://github.com/vercel/next.js/issues/9965#issuecomment-820156947))\n\n## Inspirations\n\nThis repo borrows heavily from\n\n\n\n## How To Run on Your Example\n\nIf you'd like to chat your own data, you need to:\n\n1. Set up your own ingestion pipeline, and create a similar `data/` directory with a vectorstore in it.\n2. Change the prompt used in `pages/api/util.ts` - right now this tells the chatbot to only respond to questions about LangChain, so in order to get it to work on your data you'll need to update it accordingly.\n\nThe server should work just the same 😄\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcontext-labs%2Ftoly-gpt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcontext-labs%2Ftoly-gpt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcontext-labs%2Ftoly-gpt/lists"}