khoj/tests
Debanjum Singh Solanky 8ca39a436c Use llama.cpp for offline chat models
- Benefits of moving to llama-cpp-python from gpt4all:
  - Support for all GGUF format chat models
  - Support for AMD, Nvidia, Mac, Vulcan GPU machines (instead of just Vulcan, Mac)
  - Supports models with more capabilities like tools, schema
    enforcement, speculative ddecoding, image gen etc.
- Upgrade default chat model, prompt size, tokenizer for new supported
  chat models

- Load offline chat model when present on disk without requiring internet
  - Load model onto GPU if not disabled and device has GPU
  - Load model onto CPU if loading model onto GPU fails
  - Create helper function to check and load model from disk, when model
    glob is present on disk.

    `Llama.from_pretrained' needs internet to get repo info from
    HuggingFace. This isn't required, if the model is already downloaded

    Didn't find any existing HF or llama.cpp method that looked for model
    glob on disk without internet
2024-03-26 22:33:01 +05:30
..
data Update the default configuration for the AppConfig 2023-11-17 19:26:31 -08:00
__init__.py Move tests out to project root. Use absolute import in project 2021-09-30 04:12:14 -07:00
conftest.py Short-circuit API rate limiter for unauthenticated user 2024-01-12 00:23:50 +05:30
helpers.py Use llama.cpp for offline chat models 2024-03-26 22:33:01 +05:30
test_cli.py Add isort to the pre-commit configuration and apply it to the whole project (#595) 2023-12-28 18:04:02 +05:30
test_client.py Short-circuit API rate limiter for unauthenticated users (#607) 2024-01-17 00:59:52 +05:30
test_conversation_utils.py Handle truncation when single long non-system chat message 2024-03-15 15:58:39 +05:30
test_date_filter.py Add isort to the pre-commit configuration and apply it to the whole project (#595) 2023-12-28 18:04:02 +05:30
test_file_filter.py [Multi-User Part 1]: Enable storage of settings for plaintext files based on user account (#498) 2023-10-26 09:42:29 -07:00
test_helpers.py Create chat actor for directly reading webpages based on user message 2024-03-14 14:58:37 +05:30
test_image_search.py Add isort to the pre-commit configuration and apply it to the whole project (#595) 2023-12-28 18:04:02 +05:30
test_markdown_to_entries.py Add isort to the pre-commit configuration and apply it to the whole project (#595) 2023-12-28 18:04:02 +05:30
test_multiple_users.py Add isort to the pre-commit configuration and apply it to the whole project (#595) 2023-12-28 18:04:02 +05:30
test_offline_chat_actors.py Use llama.cpp for offline chat models 2024-03-26 22:33:01 +05:30
test_offline_chat_director.py Use llama.cpp for offline chat models 2024-03-26 22:33:01 +05:30
test_openai_chat_actors.py Test select webpage as data source and extract web urls chat actors 2024-03-24 15:46:29 +05:30
test_openai_chat_director.py Dedupe query in notes prompt. Improve OAI chat actor, director tests 2024-03-14 01:22:33 +05:30
test_org_to_entries.py Add isort to the pre-commit configuration and apply it to the whole project (#595) 2023-12-28 18:04:02 +05:30
test_orgnode.py Add isort to the pre-commit configuration and apply it to the whole project (#595) 2023-12-28 18:04:02 +05:30
test_pdf_to_entries.py Add isort to the pre-commit configuration and apply it to the whole project (#595) 2023-12-28 18:04:02 +05:30
test_plaintext_to_entries.py Add isort to the pre-commit configuration and apply it to the whole project (#595) 2023-12-28 18:04:02 +05:30
test_rawconfig.py Add isort to the pre-commit configuration and apply it to the whole project (#595) 2023-12-28 18:04:02 +05:30
test_text_search.py Add isort to the pre-commit configuration and apply it to the whole project (#595) 2023-12-28 18:04:02 +05:30
test_word_filter.py Fix test word filter 2023-11-19 13:14:58 -08:00