Giter Site home page Giter Site logo

libraryofcelsus / basic-qdrant-upload-and-search-example Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 13 KB

Example code on how to upload and search a Qdrant Vector Database for Ai Chatbot Retrieval Frameworks

Home Page: https://www.libraryofcelsus.com/research/

License: MIT License

Python 100.00%
ai chatbot oobabooga qdrant vector-database gpt

basic-qdrant-upload-and-search-example's Introduction

Basic-Qdrant-Upload-and-Search-Example

Example code on how to upload and search a Qdrant Vector Database

If you find this code useful, consider checking out my main Ai Assistant project: https://github.com/libraryofcelsus/Aetherius_AI_Assistant

If you want more code tutorials like this, follow me on github and youtube: https://www.youtube.com/@LibraryofCelsus

(Channel isn't launched yet, I have multiple scripts like this written, but am still working on a video production format. Subscribe for its Launch!)

In-Depth Code Tutorials in a documentation format available at: https://www.libraryofcelsus.com/research/public/code-tutorials/

Window's Installation

  1. If using Qdrant Cloud copy their Api key and Url to the corresponding .txt files.
    Qdrant Cloud Link: https://qdrant.to/cloud
    To use a local Qdrant server, first install Docker: https://www.docker.com/, then see: https://github.com/qdrant/qdrant/blob/master/QUICK_START.md
    Once the local Qdrant server is running, it should be auto detected by the script.
  2. Install Git
  3. Install Python 3.10.6, Make sure you add it to PATH
  4. Open Git Bash Program
  5. Run git clone: git clone https://github.com/libraryofcelsus/Basic-Qdrant-Upload-and-Search-Example
  6. Open the Command Line as admin and navigate to the project install folder with cd
  7. Create a virtual environment: python -m venv venv
  8. Activate the virtual enviornment with: .\venv\Scripts\activate
  9. Install the requirements with pip install -r requirements.txt
  10. Edit and set your username and chatbot name in the .txt files
  11. Edit and set your main prompt and greeting in the .txt files
  12. For Oobabooga: Install the Oobabooga Web-Ui. This can be done with a one-click installer found on their Github page: https://github.com/oobabooga/text-generation-webui. Then launch the Web-Ui and navigate to the sessions tab, click both Api boxes and then click apply and restart. Now navigate to the models tab and enter: "TheBloke/Llama-2-7b-Chat-GPTQ" or "TheBloke/Llama-2-13B-chat-GPTQ". (If using cpu use the GMML Version) Once the model is downloaded, change the Model loader to ExLlama and set the gpu-split parameter to .5gb under your GPU's limit. Next set the max_seq_len to 4096.
  13. For OpenAI: Add your OpenAi Api Key to key_openai.txt
  14. Run the chatbot with python Script_Name.py

*Note, you will need to run .\venv\Scripts\activate every time you exit the command line to reactivate the virtual enviornment.


My Ai research is self-funded, consider supporting me if you find it useful :)

Buy Me a Coffee at ko-fi.com


Contact

Discord: libraryofcelsus -> Old Username Style: Celsus#0262

MEGA Chat: https://mega.nz/C!pmNmEIZQ

Email: [email protected]

basic-qdrant-upload-and-search-example's People

Contributors

libraryofcelsus avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.