khoj/tests
sabaimran 44f8f20ea7
Miscellaneous bugs and fixes for chat sessions (#646)
* Display given_name field only if it is not None

* Add default slugs in the migration script

* Ensure that updated_at is saved appropriately, make sure most recent chat is returned for default history

* Remove the bin button from the chat interface, given deletion is handled in the drop-down menus

* Refresh the side panel when a new chat is created

* Improveme tool retrieval prompt, don't let /online fail, and improve parsing of extract questions

* Fix ending chat response by offline chat on hitting a stop phrase

Previously the whole phrase wouldn't be in the same response chunk, so
chat response wouldn't stop on hitting a stop phrase

Now use a queue to keep track of last 3 chunks, and to stop responding
when hit a stop phrase

* Make chat on Obsidian backward compatible post chat session API updates

- Make chat on Obsidian get chat history from
  `responseJson.response.chat' when available (i.e when using new api)
- Else fallback to loading chat history from
  responseJson.response (i.e when using old api)

* Fix detecting success of indexing update in khoj.el

When khoj.el attempts to index on a Khoj server served behind an https
endpoint, the success reponse status contains plist with certs. This
doesn't mean the update failed.

Look for :errors key in status instead to determine if indexing API
call failed. This fixes detecting indexing API call success on the
Khoj Emacs client, even for Khoj servers running behind SSL/HTTPS

* Fix the mechanism for populating notes references in the conversation primer for both offline and online chat

* Return conversation.default when empty list for dynamic prompt selection, send all cmds in telemetry

* Fix making chat on Obsidian backward compatible post chat session API updates

New API always has conversation_id set, not `chat' which can be unset
when chat session is empty.

So use conversation_id to decide whether to get chat logs from
`responseJson.response.chat' or `responseJson.response' instead

---------

Co-authored-by: Debanjum Singh Solanky <debanjum@gmail.com>
2024-02-20 13:55:35 -08:00
..
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 Handle subscribe renew date, langchain, pydantic & logger.warn warnings 2024-01-12 01:46:52 +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 Add isort to the pre-commit configuration and apply it to the whole project (#595) 2023-12-28 18:04:02 +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_gpt4all_chat_actors.py Fix actor, director tests using freeze time by ignoring transformers package 2024-02-06 03:00:48 +05:30
test_gpt4all_chat_director.py Miscellaneous bugs and fixes for chat sessions (#646) 2024-02-20 13:55:35 -08:00
test_helpers.py Scrape results from Serper results using Olostep (#627) 2024-01-29 14:16:50 +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_openai_chat_actors.py Fix actor, director tests using freeze time by ignoring transformers package 2024-02-06 03:00:48 +05:30
test_openai_chat_director.py Miscellaneous bugs and fixes for chat sessions (#646) 2024-02-20 13:55:35 -08:00
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