{"id":24973010,"url":"https://github.com/weaviate-tutorials/demo-quizbuddai","last_synced_at":"2025-03-29T06:11:05.675Z","repository":{"id":203516471,"uuid":"708775093","full_name":"weaviate-tutorials/DEMO-quizbuddai","owner":"weaviate-tutorials","description":"Demo app built for DevReach conference talk - October 2023","archived":false,"fork":false,"pushed_at":"2023-10-25T11:59:40.000Z","size":1932,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-03T18:11:27.012Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/weaviate-tutorials.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}},"created_at":"2023-10-23T11:18:20.000Z","updated_at":"2023-10-23T11:20:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"6fc129ee-9bae-4029-a10b-4b9818aa2015","html_url":"https://github.com/weaviate-tutorials/DEMO-quizbuddai","commit_stats":null,"previous_names":["weaviate-tutorials/demo-quizbuddai"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weaviate-tutorials%2FDEMO-quizbuddai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weaviate-tutorials%2FDEMO-quizbuddai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weaviate-tutorials%2FDEMO-quizbuddai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weaviate-tutorials%2FDEMO-quizbuddai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/weaviate-tutorials","download_url":"https://codeload.github.com/weaviate-tutorials/DEMO-quizbuddai/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246145079,"owners_count":20730495,"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":[],"created_at":"2025-02-03T18:11:18.942Z","updated_at":"2025-03-29T06:11:05.655Z","avatar_url":"https://github.com/weaviate-tutorials.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Weaviate DEMO - AI search app\n\nThis is a minimal demo app to show how to use Weaviate in a React app to perform AI-powered search.\n\nThe app uses the [Weaviate Javascript/Typescript client](https://www.npmjs.com/package/weaviate-ts-client), and the [OpenAI API](https://beta.openai.com/).\n\nIt connects to a Weaviate instance running on the cloud (at https://edu-demo.weaviate.network), with a read-only Weaviate API key that allows you to perform search queries.\n\n## Key components\n\nThe bulk of the `AI` functionality is implemented in the `SearchBox` component.\n\n- `connectToWeaviate` is a helper function that creates a Weaviate client and connects to the Weaviate instance.\n- `queryBuilder` is a helper function that builds the base query, upon which the search query can be built.\n- The vector search functionality is implemented via the `mainSearch` function.\n- The RAG (retrieval augmented generation) functionality is implemented via the `generateSinglePrompt` and `generateGroupedTask` purposes.\n\nFor demonstration purposes, the `QuestionCard` component implements some additional RAG functionality and vector distance calculation, by directly leveraging the OpenAI API. Note that in the `SearchBox` component, similar functionalities are abstracted and implemented via the Weaviate API.\n\n\n\n## How to run\n\n1. Clone this repo\n\n2. Install dependencies\n\n```bash\nnpm install\n```\n\n3.  Add your OpenAI API key to the `.env` file\n\nCreate a file called `.env` in the root of the project and add your OpenAI API key to it, with the following format:\n\n```bash\nVITE_OPENAI_APIKEY=\u003cyour-api-key\u003e\n```\n\nYou can get an API key from the OpenAI site (https://platform.openai.com).\n\n4. Run the app\n\n```bash\nnpm run dev\n```\n\n5. Open the app in your browser at http://127.0.0.1:5173/\n\n## Further resources\n\n### Other demo apps\n\nFor another amazing demo app, check out [Verba](https://github.com/weaviate/Verba)!\n\n### Learn more about Weaviate\n\nCheck out the [Quickstart guide](https://weaviate.io/developers/weaviate/quickstart) to get started with Weaviate in just 20 or so minutes.\n\n### How do vectors work?\n\nThis blog post explains how [vectorization works](https://weaviate.io/blog/vector-embeddings-explained). It's a great read!\n\nWe also have [this app](https://huggingface.co/spaces/jphwang/colorful_vectors) to visually explain how vectorization can represent meaning and similarity.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweaviate-tutorials%2Fdemo-quizbuddai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweaviate-tutorials%2Fdemo-quizbuddai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweaviate-tutorials%2Fdemo-quizbuddai/lists"}